/* =========================================================
   ISOLETTE FRIEND CHECKOUT 2.3.0
   Customer-facing Friend benefit presentation
   ========================================================= */

.isolette-friend-checkout-status {
    display: block;
    width: 100%;
    margin: -4px 0 16px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #746A61;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: .005em;
}

.isolette-friend-checkout-status::before {
    display: inline-block;
    width: 14px;
    margin-right: 5px;
    color: #A48C68;
    text-align: center;
}

.isolette-friend-checkout-status--checking {
    color: #8A7C6F;
}

.isolette-friend-checkout-status--checking::before {
    content: "·";
}

.isolette-friend-checkout-status--success {
    color: #51463C;
    font-weight: 500;
}

.isolette-friend-checkout-status--success::before {
    content: "✓";
}


/* FRIEND BENEFIT ------------------------------------------------ */

#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-friend-benefit {
    margin: 0 0 13px !important;
    padding: 12px 14px !important;

    background: #FAF8F4 !important;
    border: 1px solid #E8E1D8 !important;

    color: #51463C !important;

    box-shadow: none !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-friend-benefit__title {
    position: relative !important;

    margin: 0 0 3px !important;
    padding-left: 18px !important;

    color: #51463C !important;

    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-friend-benefit__title::before {
    content: "✓" !important;

    position: absolute !important;
    left: 0 !important;
    top: 0 !important;

    color: #A48C68 !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-friend-benefit__copy {
    margin: 0 !important;
    padding-left: 18px !important;

    color: #7D6D5D !important;

    font-size: 10.8px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}


/* APPLIED FRIEND VOUCHER --------------------------------------- */

#form_ets_onepagecheckout
.ets-cart-voucher
.promo-name
.cart-summary-line.isolette-friend-voucher-line {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    margin: 0 !important;
    padding: 8px 0 11px !important;

    border: 0 !important;
    border-bottom: 1px solid #E8E1D8 !important;

    background: transparent !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
.promo-name
.isolette-friend-voucher-line
> .label {
    color: #51463C !important;

    font-size: 11.5px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
.promo-name
.isolette-friend-voucher-line
.float-xs-right {
    color: #51463C !important;

    font-size: 12px !important;
    font-weight: 500 !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
.promo-name
.isolette-friend-voucher-line
a[data-link-action="ets-remove-voucher"] {
    display: none !important;
}


/* OTHER PROMO CODE --------------------------------------------- */

#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-other-code-toggle {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 5px !important;

    margin: 12px 0 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;

    color: #8A7C6F !important;

    font-family: inherit !important;
    font-size: 10.8px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;

    text-align: left !important;
    text-decoration: none !important;

    cursor: pointer !important;
    box-shadow: none !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-other-code-toggle strong {
    color: #51463C !important;

    font-size: inherit !important;
    font-weight: 600 !important;

    text-decoration: underline !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 2px !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-other-code-toggle:hover strong {
    color: #302B27 !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
#promo-code.isolette-promo-code-collapsed
> .promo-code {
    display: none !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
#promo-code.isolette-promo-code-collapsed.isolette-promo-code-open
> .promo-code {
    display: block !important;

    margin-top: 10px !important;
}


/* Keep ETS's actual input/button intact when opened. */

@media (max-width: 767px) {
    .isolette-friend-checkout-status {
        margin-top: -2px;
        margin-bottom: 14px;
        font-size: 10.8px;
    }

    #form_ets_onepagecheckout
    .ets-cart-voucher
    .isolette-friend-benefit {
        padding: 11px 12px !important;
    }

    #form_ets_onepagecheckout
    .ets-cart-voucher
    .isolette-other-code-toggle {
        font-size: 10.6px !important;
    }
}


/* =========================================================
   ISOLETTE FRIEND CHECKOUT 2.3.0 — FINAL UX OVERRIDES
   ---------------------------------------------------------
   Exact ETS DOM:
   - discount total: #cart-subtotal-discount
   - voucher list: .ets-cart-voucher .promo-name
   ========================================================= */

/* Quieter concierge-style recognition message */
#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-friend-benefit {
    margin: 3px 0 8px !important;
    padding: 2px 0 2px 13px !important;

    background: transparent !important;

    border: 0 !important;
    border-left: 1px solid #A48C68 !important;

    box-shadow: none !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-friend-benefit__title {
    margin: 0 0 2px !important;
    padding-left: 0 !important;

    color: #51463C !important;

    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-friend-benefit__title::before {
    content: none !important;
    display: none !important;
}

#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-friend-benefit__copy {
    margin: 0 !important;
    padding-left: 0 !important;

    color: #7D6D5D !important;

    font-size: 10.8px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}

/*
 * When Friend discount is the only voucher, its amount is already
 * shown in #cart-subtotal-discount, so hide the duplicated voucher row.
 */
#form_ets_onepagecheckout
.ets-cart-voucher
.promo-name
.cart-summary-line.isolette-friend-voucher-line--absorbed {
    display: none !important;
}

/* If multiple vouchers exist, keep the Friend row as a breakdown. */
#form_ets_onepagecheckout
.ets-cart-voucher
.promo-name
.cart-summary-line.isolette-friend-voucher-line:not(.isolette-friend-voucher-line--absorbed) {
    display: flex !important;
    margin: 0 !important;
    padding: 7px 0 !important;

    border: 0 !important;
    border-bottom: 1px solid #EEE7DF !important;

    background: transparent !important;
}

/* The automatic Friend benefit cannot be removed accidentally. */
#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-friend-voucher-line
a[data-link-action="ets-remove-voucher"] {
    display: none !important;
}

/* Put "another code" closer to the recognition message. */
#form_ets_onepagecheckout
.ets-cart-voucher
.isolette-other-code-toggle {
    margin: 7px 0 0 !important;
}

/* Make the real summary line feel native to Isolette, not like a promo chip. */
#form_ets_onepagecheckout
#cart-subtotal-discount .label,
#form_ets_onepagecheckout
#cart-subtotal-discount .value {
    color: #51463C !important;
    font-weight: 500 !important;
}

@media (max-width: 767px) {
    #form_ets_onepagecheckout
    .ets-cart-voucher
    .isolette-friend-benefit {
        margin-top: 2px !important;
        padding-left: 11px !important;
    }
}
