/* FC Cart 1.0.60 — FluentCart Thank You / Receipt presentation.
 * Ownership boundary:
 * - FluentCart owns receipt data, markup, payment state and links.
 * - FC Cart owns only the post-order receipt visual theme exposed under
 *   FC Ecom Suite > Cart Page > FC Cart > Receipt.
 * - No checkout, shipping, Square/payment-field, cart-drawer or responsive
 *   checkout geometry selectors belong in this file.
 */

/* Compact FluentCart's native success/pending banner to approximately half
 * its stock vertical footprint without fixing an absolute overall height. */
.fct-thank-you-page .fct-thank-you-page-header {
    box-sizing: border-box;
    padding: 15px 20px !important;
    border: 1px solid var(--fc-receipt-status-border, #0B6B57) !important;
    background: var(--fc-receipt-status-bg, #D4EBE1) !important;
}

.fct-thank-you-page .fct-thank-you-page-header-icon {
    width: 40px !important;
    height: 40px !important;
    margin-bottom: 8px !important;
    background: var(--fc-receipt-status-icon-bg, #0B6B57) !important;
}

.fct-thank-you-page .fct-thank-you-page-header-icon svg {
    width: 20px !important;
    height: 20px !important;
}

.fct-thank-you-page .fct-thank-you-page-header-title {
    color: var(--fc-receipt-status-text, #005447) !important;
    font-size: 1.6em !important;
    line-height: 1.05 !important;
}

/* Receipt/table theme. FluentCart remains responsible for all values and rows. */
.fct-thank-you-page .fct-thank-you-page-body {
    border-color: var(--fc-receipt-border, #0B6B57) !important;
}

.fct-thank-you-page .fct-thank-you-page-order-items {
    overflow: hidden;
    border: 1px solid var(--fc-receipt-border, #0B6B57);
    border-radius: 6px;
}

.fct-thank-you-page .fct-thank-you-page-order-items-header {
    background: var(--fc-receipt-table-header-bg, #0B6B57) !important;
}

.fct-thank-you-page .fct-thank-you-page-order-items-header-row {
    color: var(--fc-receipt-table-header-text, #FFFFFF) !important;
}

/* Keep monetary values visibly inside the themed table border. FluentCart's
 * item/header rows already use a horizontal inset; explicitly preserve that
 * inset and give the totals block the same breathing room. */
.fct-thank-you-page .fct-thank-you-page-order-items-header {
    padding-inline: 18px !important;
}

.fct-thank-you-page .fct-thank-you-page-order-items-body .fct-thank-you-page-order-items-list {
    padding-inline: 18px !important;
}

.fct-thank-you-page .fct-thank-you-page-order-items-body .fct-thank-you-page-order-items-total {
    box-sizing: border-box;
    padding-inline: 18px !important;
}

.fct-thank-you-page .fct-thank-you-page-order-items-addresses .fct-thank-you-page-order-items-addresses-ship-to h5,
.fct-thank-you-page .fct-thank-you-page-order-items-addresses .fct-thank-you-page-order-items-addresses-bill-to h5 {
    border-color: var(--fc-receipt-border, #0B6B57) !important;
}

/* FluentCart renders this footer outside .fct-thank-you-page, so it receives
 * the same 620px maximum width explicitly. This keeps the action row visually
 * attached to the receipt instead of floating below it. */
.fct-thank-you-page-footer {
    width: calc(100% - 20px);
    max-width: 620px;
    margin: 10px auto 0 !important;
    padding: 10px;
    box-sizing: border-box;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    flex-wrap: wrap;
    gap: 10px !important;
    border: 1px solid var(--fc-receipt-border, #0B6B57);
    border-radius: 8px;
    background: var(--fc-receipt-action-bg, #F2F8F6);
}

.fct-thank-you-page-footer .fct-thank-you-page-view-order-button,
.fct-thank-you-page-footer .fct-thank-you-page-download-receipt-button {
    flex: 1 1 220px;
    min-width: 0;
    min-height: 42px;
    margin: 0 !important;
    padding: 9px 14px !important;
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important;
    text-align: center;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.fct-thank-you-page-footer .fct-thank-you-page-view-order-button {
    border: 1px solid var(--fc-receipt-primary-bg, #014D41) !important;
    background: var(--fc-receipt-primary-bg, #014D41) !important;
    color: var(--fc-receipt-primary-text, #FFFFFF) !important;
}

.fct-thank-you-page-footer .fct-thank-you-page-download-receipt-button {
    border: 1px solid var(--fc-receipt-secondary-border, #014D41) !important;
    background: var(--fc-receipt-secondary-bg, #FFFFFF) !important;
    color: var(--fc-receipt-secondary-text, #014D41) !important;
}

.fct-thank-you-page-footer .fct-thank-you-page-view-order-button:hover,
.fct-thank-you-page-footer .fct-thank-you-page-view-order-button:focus-visible,
.fct-thank-you-page-footer .fct-thank-you-page-download-receipt-button:hover,
.fct-thank-you-page-footer .fct-thank-you-page-download-receipt-button:focus-visible {
    filter: brightness(0.94);
}

@media (max-width: 520px) {
    .fct-thank-you-page .fct-thank-you-page-header {
        padding-inline: 14px !important;
    }

    .fct-thank-you-page-footer .fct-thank-you-page-view-order-button,
    .fct-thank-you-page-footer .fct-thank-you-page-download-receipt-button {
        flex-basis: 100%;
    }
}
