/* Theme-owned coupon presentation for WooCommerce Checkout and Fast Cart. */
.bistrodistro-checkout-coupon {
    width: 100%;
    margin: 18px 0 4px;
}

.bistrodistro-checkout-coupon .woocommerce-form-coupon-toggle {
    margin: 0;
}

.woocommerce-form-coupon-toggle .woocommerce-info,
.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info,
.woocommerce-form-coupon-toggle .wc-block-components-notice-banner.is-info {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 15px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-size: 15px;
    line-height: 1.45;
    box-shadow: none;
}

.woocommerce-form-coupon-toggle .woocommerce-info::before {
    display: none;
}

.woocommerce-form-coupon-toggle .wc-block-components-notice-banner.is-info > svg {
    display: none;
}

.woocommerce-form-coupon-toggle .wc-block-components-notice-banner__content {
    display: contents;
}

.bistrodistro-coupon-message-icon {
    display: block;
    width: 22px;
    height: 22px;
    background: var(--wp--preset--color--primary, #1a73e8);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='M3.75 7.5A2.25 2.25 0 0 1 6 5.25h12A2.25 2.25 0 0 1 20.25 7.5v1.125a2.625 2.625 0 0 0 0 5.25V15A2.25 2.25 0 0 1 18 17.25H6A2.25 2.25 0 0 1 3.75 15v-1.125a2.625 2.625 0 0 0 0-5.25V7.5ZM12 8.25v.008m0 3.742v.008m0 3.742v.008'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='M3.75 7.5A2.25 2.25 0 0 1 6 5.25h12A2.25 2.25 0 0 1 20.25 7.5v1.125a2.625 2.625 0 0 0 0 5.25V15A2.25 2.25 0 0 1 18 17.25H6A2.25 2.25 0 0 1 3.75 15v-1.125a2.625 2.625 0 0 0 0-5.25V7.5ZM12 8.25v.008m0 3.742v.008m0 3.742v.008'/%3E%3C/svg%3E") center / contain no-repeat;
}

.bistrodistro-coupon-message-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.bistrodistro-checkout-coupon__toggle {
    width: 100%;
    appearance: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, border-radius 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.woocommerce-form-coupon-toggle .bistrodistro-checkout-coupon__toggle[aria-expanded="true"] {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.bistrodistro-checkout-coupon__toggle:hover,
.bistrodistro-checkout-coupon__toggle:focus-visible {
    border-color: color-mix(in srgb, var(--wp--preset--color--primary, #1a73e8) 36%, #cbd5e1);
    background: color-mix(in srgb, var(--wp--preset--color--primary, #1a73e8) 3%, #f8fafc);
    outline: none;
}

.bistrodistro-checkout-coupon__toggle:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--primary, #1a73e8) 16%, transparent);
}

.bistrodistro-checkout-coupon__toggle-cta {
    flex: 0 0 auto;
    color: var(--wp--preset--color--primary, #1a73e8);
    font-weight: 650;
}

.bistrodistro-checkout-coupon__toggle:hover .bistrodistro-checkout-coupon__toggle-cta,
.bistrodistro-checkout-coupon__toggle:focus-visible .bistrodistro-checkout-coupon__toggle-cta {
    text-decoration: underline;
}

.bistrodistro-checkout-coupon__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin: -1px 0 0;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.bistrodistro-checkout-coupon__form[hidden] {
    display: none !important;
}

.bistrodistro-checkout-coupon__form .form-row {
    float: none;
    width: auto !important;
    margin: 0 !important;
    padding: 0;
}

.bistrodistro-checkout-coupon__form .form-row-first {
    width: 100% !important;
}

.bistrodistro-checkout-coupon__form input.input-text {
    box-sizing: border-box;
    width: 100% !important;
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0 14px !important;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 16px;
    line-height: 46px !important;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.bistrodistro-checkout-coupon__form input.input-text:focus {
    border-color: var(--wp--preset--color--primary, #1a73e8);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.18);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--primary, #1a73e8) 18%, transparent);
}

.bistrodistro-checkout-coupon__form input.input-text::placeholder {
    color: #64748b !important;
    opacity: 1 !important;
}

.bistrodistro-checkout-coupon__form button[name="apply_coupon"] {
    min-height: 48px;
    margin: 0;
    padding: 11px 20px;
    border: 1px solid var(--wp--preset--color--primary, #1a73e8);
    border-radius: 10px;
    background: var(--wp--preset--color--primary, #1a73e8);
    color: #fff;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.bistrodistro-checkout-coupon__form button[name="apply_coupon"]:disabled {
    cursor: wait;
    opacity: 0.65;
}

.bistrodistro-checkout-coupon__error {
    grid-column: 1 / -1;
    color: #b42318;
    font-size: 14px;
    line-height: 1.4;
}

.bistrodistro-checkout-coupon__form input.has-error {
    border-color: #b42318;
}

.bistrodistro-checkout-coupon__notices:empty {
    display: none;
}

.bistrodistro-checkout-coupon__notices .wc-block-components-notice-banner,
.bistrodistro-checkout-coupon__notices .woocommerce-message {
    margin: 12px 0 0;
    padding: 14px 16px;
    border: 1px solid #86d6a5;
    border-radius: 12px;
    background: #f0fbf4;
    color: #245c3a;
    font-size: 15px;
    line-height: 1.45;
    box-shadow: none;
}

.wc-fast-cart .wfc-coupon {
    max-width: none;
    margin: 4px 0 2px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.wc-fast-cart .wfc-coupon__inner-contents {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.wc-fast-cart .wfc-coupon input.input-text[type="text"] {
    height: 48px;
    min-width: 0;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 16px;
    box-shadow: none;
}

.wc-fast-cart .wfc-coupon input.input-text[type="text"]:focus {
    border-color: var(--wp--preset--color--primary, #1a73e8);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.18);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--primary, #1a73e8) 18%, transparent);
}

.wc-fast-cart .wfc-coupon button.wfc-button[name="apply_coupon"] {
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--wp--preset--color--primary, #1a73e8);
    border-radius: 10px;
    background: var(--wp--preset--color--primary, #1a73e8);
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.wc-fast-cart .woocommerce-notices-wrapper {
    display: block;
}

.wc-fast-cart .woocommerce-notices-wrapper:empty {
    display: none;
}

.wc-fast-cart .wc-block-components-notice-banner {
    margin: 12px 0 0;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e3a5f;
    font-size: 14px;
    line-height: 1.45;
}

.wc-fast-cart .wc-block-components-notice-banner.is-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

/* Applied coupon row in Checkout and Fast Cart. */
.woocommerce-checkout-review-order-table tr.cart-discount,
.wc-fast-cart .wfc-cart-totals__table tr.cart-discount {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.woocommerce-checkout-review-order-table tr.cart-discount > th,
.woocommerce-checkout-review-order-table tr.cart-discount > td,
.wc-fast-cart .wfc-cart-totals__table tr.cart-discount > th,
.wc-fast-cart .wfc-cart-totals__table tr.cart-discount > td {
    box-sizing: border-box;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #334155;
    font-size: 15px !important;
    line-height: 1.35 !important;
    vertical-align: middle;
}

.woocommerce-checkout-review-order-table tr.cart-discount > th,
.wc-fast-cart .wfc-cart-totals__table tr.cart-discount > th {
    padding-right: 12px !important;
    padding-left: 0 !important;
    font-weight: 650;
    text-align: left;
    word-break: break-word;
}

.woocommerce-checkout-review-order-table tr.cart-discount > td,
.wc-fast-cart .wfc-cart-totals__table tr.cart-discount > td {
    padding-right: 0 !important;
    padding-left: 12px !important;
    font-weight: 650;
    text-align: right;
    white-space: nowrap;
}

.woocommerce-checkout-review-order-table .bistrodistro-coupon-cell-content,
.wc-fast-cart .wfc-cart-totals__table .bistrodistro-coupon-cell-content {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.woocommerce-checkout-review-order-table .bistrodistro-coupon-discount-amount,
.wc-fast-cart .wfc-cart-totals__table .bistrodistro-coupon-discount-amount {
    flex: 0 0 auto;
    color: #208355;
}

.woocommerce-checkout-review-order-table .woocommerce-remove-coupon,
.wc-fast-cart .wfc-cart-totals__table .woocommerce-remove-coupon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    flex: 0 0 34px;
    border: 1px solid #cbd3d0;
    border-radius: 8px;
    background: #fff;
    color: #68746f;
    font-size: 0;
    line-height: 1;
    text-decoration: none;
    vertical-align: middle;
    transform: none !important;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.woocommerce-checkout-review-order-table .woocommerce-remove-coupon::before,
.wc-fast-cart .wfc-cart-totals__table .woocommerce-remove-coupon::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='m9 10.5.375 7.5m5.625-7.5L14.625 18M4.5 7.5h15m-10.125 0V5.625c0-.621.504-1.125 1.125-1.125h3c.621 0 1.125.504 1.125 1.125V7.5m3 0-.525 11.156a1.5 1.5 0 0 1-1.498 1.43H8.398a1.5 1.5 0 0 1-1.498-1.43L6.375 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='m9 10.5.375 7.5m5.625-7.5L14.625 18M4.5 7.5h15m-10.125 0V5.625c0-.621.504-1.125 1.125-1.125h3c.621 0 1.125.504 1.125 1.125V7.5m3 0-.525 11.156a1.5 1.5 0 0 1-1.498 1.43H8.398a1.5 1.5 0 0 1-1.498-1.43L6.375 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.woocommerce-checkout-review-order-table .woocommerce-remove-coupon:hover,
.woocommerce-checkout-review-order-table .woocommerce-remove-coupon:focus-visible,
.wc-fast-cart .wfc-cart-totals__table .woocommerce-remove-coupon:hover,
.wc-fast-cart .wfc-cart-totals__table .woocommerce-remove-coupon:focus-visible {
    border-color: #aebbb6;
    background: #edf1ef;
    color: #33413b;
    outline: none;
}

.woocommerce-checkout-review-order-table .woocommerce-remove-coupon:focus-visible,
.wc-fast-cart .wfc-cart-totals__table .woocommerce-remove-coupon:focus-visible {
    box-shadow: 0 0 0 3px rgba(104, 116, 111, 0.18);
}

.wc-fast-cart .wfc-coupon button.wfc-button[name="apply_coupon"]:hover,
.wc-fast-cart .wfc-coupon button.wfc-button[name="apply_coupon"]:focus-visible,
.bistrodistro-checkout-coupon__form button[name="apply_coupon"]:hover,
.bistrodistro-checkout-coupon__form button[name="apply_coupon"]:focus-visible {
    filter: brightness(0.92);
}

@media (max-width: 560px) {
    .bistrodistro-coupon-message-text {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .bistrodistro-checkout-coupon__form,
    .wc-fast-cart .wfc-coupon__inner-contents {
        grid-template-columns: 1fr;
    }

    .bistrodistro-checkout-coupon__form button[name="apply_coupon"],
    .wc-fast-cart .wfc-coupon button.wfc-button[name="apply_coupon"] {
        width: 100%;
    }

    .wc-fast-cart .wfc-coupon {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bistrodistro-checkout-coupon__form input.input-text,
    .woocommerce-checkout-review-order-table .woocommerce-remove-coupon,
    .wc-fast-cart .wfc-cart-totals__table .woocommerce-remove-coupon {
        transition: none;
    }
}
