/**
 * Suvremeniji, usklađen izgled sažetka košarice na tri mjesta:
 *   - #blockcart-modal   → "Proizvod dodan" modal
 *   - #blockcart-content → padajuća mini-košarica (header dropdown)
 *   - .cart-summary / .cart-detailed-totals → stranica košarice
 * Učitava se preko ps_shoppingcart (hookDisplayHeader) na svim stranicama.
 */

/* ---- Zajedničke oznake retka "Dostava" ---- */
.wspay-shipping-pending {
    color: #6c757d;
    font-style: italic;
    font-weight: 400;
    white-space: normal;
}

.wspay-free-shipping {
    color: #0a7d34;
    font-weight: 600;
    white-space: nowrap;
}

/* ---- Okvir "do besplatne dostave" (sve tri košarice) ---- */
#blockcart-modal .iqitfreedeliverycount,
#blockcart-content .iqitfreedeliverycount,
.cart-summary .iqitfreedeliverycount {
    border-radius: 8px;
    border: none;
    padding: 12px 14px;
    margin-top: 1rem;
}

#blockcart-modal .iqitfreedeliverycount-title,
#blockcart-content .iqitfreedeliverycount-title,
.cart-summary .iqitfreedeliverycount-title {
    margin-bottom: .5rem;
}

#blockcart-modal .iqitfreedeliverycount ul,
#blockcart-content .iqitfreedeliverycount ul,
.cart-summary .iqitfreedeliverycount ul {
    margin: 0;
    padding-left: 1.1rem;
}

#blockcart-modal .iqitfreedeliverycount li,
#blockcart-content .iqitfreedeliverycount li,
.cart-summary .iqitfreedeliverycount li {
    margin: .15rem 0;
}

/* ============================================================== */
/* 1) MODAL "Proizvod dodan"                                      */
/* ============================================================== */
#blockcart-modal .modal-content {
    border: none;
    border-radius: 0;
}

#blockcart-modal .modal-header {
    border-bottom: 1px solid #eee;
}

#blockcart-modal .cart-content {
    padding-top: .5rem;
}

#blockcart-modal .cart-products-count {
    color: #6c757d;
    font-size: .95rem;
    margin-bottom: .35rem;
}

#blockcart-modal .cart-subtotals {
    margin-top: .75rem;
    border-top: 1px solid #eee;
}

#blockcart-modal .cart-subtotals > div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem 1rem;
    padding: .5rem 0;
    margin: 0;
    border-bottom: 1px solid #f1f1f1;
}

#blockcart-modal .cart-subtotals > div > strong {
    font-weight: 500;
    color: #6c757d;
    margin: 0;
}

#blockcart-modal .cart-subtotals > div > .value {
    text-align: right;
    white-space: nowrap;
    color: #212529;
    font-weight: 500;
    margin: 0;
}

#blockcart-modal .cart-subtotals > div > div {
    flex: 0 0 100%;
    margin: 0;
}

#blockcart-modal .blockcart-total-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin: .5rem 0 0;
    padding-top: .6rem;
    border-top: 2px solid #212529;
}

#blockcart-modal .blockcart-total-line::before,
#blockcart-modal .blockcart-total-line::after {
    display: none;
    content: none;
}

#blockcart-modal .blockcart-total-line strong {
    font-weight: 600;
    color: #212529;
    font-size: 1.05rem;
    margin: 0;
}

#blockcart-modal .blockcart-total-line .value {
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
    font-size: 1.1rem;
    color: #212529;
}

#blockcart-modal .cart-content-btn .btn {
    border-radius: 6px;
}

/* ============================================================== */
/* 2) DROPDOWN mini-košarica (header)                            */
/* ============================================================== */
#blockcart-content .cart-subtotals {
    margin-top: .5rem;
    border-top: 1px solid #eee;
}

#blockcart-content .cart-subtotals .cart-summary-line {
    padding: .45rem 0;
    margin: 0;
    border-bottom: 1px solid #f1f1f1;
    overflow: hidden; /* obuhvati float vrijednosti da crta ide punom širinom */
}

#blockcart-content .cart-subtotals .cart-summary-line .label {
    color: #6c757d;
    font-weight: 500;
}

#blockcart-content .cart-subtotals .cart-summary-line .value {
    float: right;
    text-align: right;
    color: #212529;
    font-weight: 500;
}

#blockcart-content .cart-totals {
    margin-top: .5rem;
    padding-top: .6rem;
    border-top: 2px solid #212529;
}

#blockcart-content .cart-totals .clearfix .label {
    font-weight: 600;
    color: #212529;
}

#blockcart-content .cart-totals .clearfix .value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #212529;
}

#blockcart-content .cart-buttons .btn {
    border-radius: 6px;
}

/* ============================================================== */
/* 3) Stranica košarice                                           */
/* ============================================================== */
.cart-detailed-subtotals .cart-summary-line {
    padding: .5rem 0;
    margin: 0;
    border-bottom: 1px solid #f1f1f1;
    overflow: hidden;
}

.cart-detailed-subtotals .cart-summary-line .label {
    color: #6c757d;
}

.cart-summary-totals .cart-total {
    margin-top: .4rem;
    padding-top: .6rem;
    border-top: 2px solid #212529;
}

.cart-summary .cart-detailed-actions .btn,
.checkout.cart-detailed-actions .btn,
.cart-summary .cart-buttons .btn {
    border-radius: 6px;
}
