/* =============================================================
   KFC33 — ORDER CONFIRMATION (pre-order checkout) PAGE
   Page-specific styling, loaded after core.css.

   This file serves the "Confirmation" page: the order summary
   (City / Area / Product / Total / Payment), the WooCommerce
   payment-method list (wallet top-up + crypto), the "Book product"
   place-order CTA, and the booking-cancel + URL-safety notices.

   SSOT: shared chrome (header, footer, .content, .general-ttl, the
   .payment-form submit button, .btn family, fields, tokens) lives in
   core.css. Only page-unique rules live here. Everything is
   token-based so it tracks the light + dark themes automatically.
   ============================================================= */

/* -------------------------------------------------------------
   Page layout wrapper
   .content is centered (text-align:center) by core; the order
   block reads better as a left-aligned receipt, so we constrain
   width, center the block, and reset alignment inside it.
   ------------------------------------------------------------- */
.order-details-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(1.1rem, 4vw, 1.6rem);
    text-align: left;
}

/* Staggered entrance for the summary card (respects reduced motion) */
@media (prefers-reduced-motion: no-preference) {
    .order-details-container {
        animation: oc-rise 0.5s var(--ease) both;
    }
}

@keyframes oc-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* -------------------------------------------------------------
   Order summary — the "receipt" card
   Markup: <ul class="order-details"><li><b>Label</b>: <span>value</span></li>
   The list also contains an empty <li></li> spacer we hide.
   ------------------------------------------------------------- */
.order-details {
    list-style: none;
    margin: 0;
    padding: clamp(1.1rem, 4vw, 1.6rem) clamp(1.1rem, 4vw, 1.75rem);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    background: var(--c-panel);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-soft);
}

.order-details li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--c-line);
    font-family: var(--font-body);
    font-size: clamp(0.92rem, 2.6vw, 1rem);
    line-height: 1.4;
    color: var(--c-ink-soft);
}

.order-details li:first-child {
    padding-top: 0;
}

.order-details li:last-child,
.order-details li:has(+ li:empty) {
    border-bottom: none;
}

/* Hide the trailing empty <li></li> the source ships with */
.order-details li:empty {
    display: none;
    padding: 0;
    border: none;
}

.order-details li b {
    font-weight: 600;
    color: var(--c-ink-soft);
    white-space: nowrap;
}

/* Value column — pushed to the right, strong ink, wraps safely on
   narrow screens (no overflow at 360px). */
.order-details li span {
    margin-left: auto;
    text-align: right;
    font-weight: 600;
    color: var(--c-ink);
    overflow-wrap: anywhere;
}

/* -------------------------------------------------------------
   Checkout form / payment block
   ------------------------------------------------------------- */
.order-details-container .payment-form.checkout {
    margin: 0;
    text-align: left;
}

.woocommerce-checkout-review-order {
    width: 100%;
}

/* -------------------------------------------------------------
   Payment method list
   The two <li> ship with inline display:none and are revealed by
   site.js; we style them so they read as selectable cards whenever
   they ARE shown, without fighting the inline default.
   ------------------------------------------------------------- */
.wc_payment_methods {
    list-style: none;
    /* No bottom margin: the .place-order row owns the gap below this
       list. The two payment <li> ship with inline display:none, so when
       they stay hidden this list collapses and only that single gap
       remains above the CTA. */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.wc_payment_methods:empty {
    display: none;
}

.wc_payment_method {
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    background: var(--c-field-bg);
    transition: border-color var(--t-fast) var(--ease),
        background var(--t-fast) var(--ease);
}

.wc_payment_method:hover {
    border-color: var(--c-line-strong);
    background: var(--c-hover-tint);
}

/* The radio input that selects a method */
.wc_payment_method > .input-radio {
    accent-color: var(--c-accent);
    width: 1.05rem;
    height: 1.05rem;
    margin: 0.95rem 0 0 0.95rem;
    cursor: pointer;
    flex-shrink: 0;
}

.wc_payment_method > label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    padding: 0.85rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--c-ink);
    cursor: pointer;
}

.wc_payment_method > label b {
    font-weight: 600;
    color: var(--c-ink-soft);
}

.wc_payment_method > label img {
    max-height: 1.4rem;
    width: auto;
}

/* Highlight the selected method */
.wc_payment_method > .input-radio:checked + label {
    color: var(--c-ink);
}

.wc_payment_method:has(.input-radio:checked) {
    border-color: var(--c-line-strong);
    background: var(--c-hover-tint-strong);
}

/* Method "info" panel (e.g. "Pay with wallet") */
.payment_box {
    margin: 0 1rem 0.95rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--c-panel);
    color: var(--c-ink-soft);
    font-size: 0.88rem;
    line-height: 1.5;
}

.payment_box p {
    margin: 0;
}

/* Price amount inside the wallet balance label */
.woocommerce-Price-amount {
    font-weight: 700;
    color: var(--c-ink);
    white-space: nowrap;
}

/* -------------------------------------------------------------
   Wallet top-up inline control
   <span id="ab">Top up balance</span>
   <div id="wallet-radio"><span>Enter amount…</span><input …><i>Top up balance</i></div>
   ------------------------------------------------------------- */
#ab {
    display: inline-flex;
    align-items: center;
    color: var(--c-ink);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    cursor: pointer;
    font-weight: 600;
}

#wallet-radio {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.5rem;
}

#wallet-radio > span {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--c-ink-soft);
}

#WalletTopupPdCkInput {
    flex: 1 1 7rem;
    min-width: 0;
    max-width: 11rem;
    height: 2.6rem;
    padding: 0 0.85rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--c-ink);
    background: var(--c-field-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    transition: border-color var(--t-fast) var(--ease),
        box-shadow var(--t-fast) var(--ease),
        background var(--t-fast) var(--ease);
}

#WalletTopupPdCkInput::placeholder {
    color: var(--c-ink-faint);
}

#WalletTopupPdCkInput:focus {
    outline: none;
    border-color: var(--c-accent);
    background: var(--c-field-bg-focus);
    box-shadow: 0 0 0 3px var(--c-focus-ring);
}

/* The "Top up balance" affordance (<i>) — a compact ghost button */
#wallet-radio > i {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1rem;
    font-style: normal;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--c-ink);
    background: transparent;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background var(--t-fast) var(--ease),
        border-color var(--t-fast) var(--ease);
}

#wallet-radio > i:hover {
    background: var(--c-hover-tint);
    border-color: var(--c-line-hover);
}

/* -------------------------------------------------------------
   Place-order row + "Book product" CTA
   The <button id="place_order"> is a .payment-form submit, so it
   already inherits the shared primary button from core.css. We only
   own the row spacing + centring + a comfortable touch target.
   ------------------------------------------------------------- */
.form-row.place-order {
    margin-top: clamp(1.1rem, 4vw, 1.5rem);
    text-align: center;
}

.form-row.place-order #place_order {
    min-width: min(100%, 16rem);
}

/* noscript fallback copy (only visible with scripting off) */
.form-row.place-order noscript {
    display: block;
    margin-bottom: 0.85rem;
    color: var(--c-ink-soft);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* -------------------------------------------------------------
   Booking-cancel + URL-safety notices
   These sit after the order block; .content centers them already.
   ------------------------------------------------------------- */
.booking-cancel-in-notice {
    max-width: 480px;
    margin: clamp(1.25rem, 4vw, 1.75rem) auto 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    background: var(--c-panel);
    color: var(--c-ink-soft);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
    text-wrap: balance;
}

.url-notice-line1 {
    max-width: 480px;
    margin: clamp(1.1rem, 4vw, 1.6rem) auto 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--c-ink-soft);
    text-align: center;
    text-wrap: balance;
}

.url-notice-line2 {
    max-width: 480px;
    margin: 0.3rem auto 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--c-ink-muted);
    text-align: center;
    overflow-wrap: anywhere;
}

.url-notice-line2 a {
    color: var(--c-ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    transition: color var(--t-fast) var(--ease);
}

.url-notice-line2 a:hover,
.url-notice-line2 a:focus-visible {
    color: var(--c-ink);
    opacity: 0.85;
}
