/* ==========================================================================
   Fluent Cart — checkout page, Astra Pro dark mode
   Plugin: Fluent Cart Account Portal by ICT Shift (v1.3.3)

   Fluent Cart themes its entire checkout view with --fct-checkout-* custom
   properties (plus a handful of --fct-select-* variables) defined on :root.
   Dark mode is implemented by re-mapping every one of them onto the Astra
   global palette on the checkout root — the same approach used for the cart
   drawer (cart-drawer.css). Re-mapping the custom properties beats every
   consumer rule without a specificity fight; the shared button background
   lives in checkout.css (both schemes). No hard-coded colors; light mode is
   untouched because every rule is scoped to the dark scheme and checkout
   page.
   ========================================================================== */

html.astra-color-scheme-dark .fct-checkout {
    /* Text */
    --fct-checkout-primary-text-color: var(--ast-global-color-2);
    --fct-checkout-secondary-text-color: var(--ast-global-color-3);

    /* Form fields */
    --fct-checkout-input-bg-color: var(--ast-global-color-5);
    --fct-checkout-input-border-color: var(--ast-global-color-6);
    --fct-checkout-input-text-color: var(--ast-global-color-2);
    --fct-checkout-input-placeholder-text-color: var(--ast-global-color-3);
    --fct-checkout-input-disabled-bg-color: var(--ast-global-color-4);

    /* Borders and surfaces */
    --fct-checkout-border-color: var(--ast-global-color-6);
    --fct-checkout-active-border-color: var(--ast-global-color-7);
    --fct-checkout-summary-bg-color: var(--ast-global-color-5);
    --fct-checkout-secondary-bg-color: var(--ast-global-color-4);
    --fct-checkout-payment-method-bg-color: var(--ast-global-color-5);
    --fct-checkout-shipping-methods-bg: var(--ast-global-color-5);
    --fct-checkout-address-wrapper-bg: var(--ast-global-color-5);
    --fct-checkout-address-modal-bg: var(--ast-global-color-5);
    --fct-checkout-address-active-border-color: var(--ast-global-color-6);

    /* Primary buttons (Place order, Apply coupon) */
    --fct-checkout-btn-bg-color: var(--ast-global-color-7);
    --fct-checkout-btn-text-color: var(--ast-global-color-2);
    --fct-checkout-primary-bg-color: var(--ast-global-color-7);

    /* Radio + checkbox controls */
    --fct-checkout-radio-bg-color: var(--ast-global-color-4);
    --fct-checkout-radio-border-color: var(--ast-global-color-6);
    --fct-checkout-radio-active-bg-color: var(--ast-global-color-7);
    --fct-checkout-radio-active-border-color: var(--ast-global-color-7);
    --fct-checkout-radio-dot-bg-color: var(--ast-global-color-2);
    --fct-checkout-checkbox-bg: var(--ast-global-color-4);

    /* Select widgets */
    --fct-select-dropdown-bg: var(--ast-global-color-4);
    --fct-select-input-bg: var(--ast-global-color-5);
    --fct-select-input-text-color: var(--ast-global-color-2);
    --fct-select-option-hover-bg: var(--ast-global-color-6);
}

/* White Place order text in the dark scheme (background/hover live in
   checkout.css, shared by both schemes). */
html.astra-color-scheme-dark .fct-checkout .fct_place_order_btn {
    color: var(--ast-global-color-2);
}

/* -------------------------------------------------------------------------
   Tax summary box — hard-coded light colors FC does not expose as variables
   -------------------------------------------------------------------------
   The order-summary's collapsible tax breakdown box hard-codes a near-white
   surface (#F4F5F8); its text, row and total-border colours already follow
   the re-mapped --fct-checkout-* variables, so only the background needs
   re-mapping onto the dark summary surface. Light mode untouched: every rule
   here is scoped to the dark scheme and the checkout page.
   ========================================================================== */
html.astra-color-scheme-dark .fct-checkout .fct_tax_summary_box {
    background-color: var(--ast-global-color-5);
}

/* The small round "?" info chips hard-code white backgrounds; text and
   border already follow the re-mapped variables. Field surface keeps them
   visible without a light island. */
html.astra-color-scheme-dark .fct-checkout .fct_item_tax_hint_button {
    background-color: var(--ast-global-color-4);
}

/* Tax tooltips hard-code a white card with a light shadow. Text and border
   already follow the re-mapped variables; the shadow goes dark. */
html.astra-color-scheme-dark .fct-checkout .fct_item_tax_tooltip {
    background-color: var(--ast-global-color-4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* VAT inclusive/exclusive chips: FC pairs light-green (#EAF3DE/#3B6D11) and
   light-amber (#FAEEDA/#854F0B) chip colours that do not exist in the Astra
   palette, so both are re-mapped to the dark field surface with secondary
   text — the inclusive/exclusive distinction stays in the chip text itself.
   The .is-reversed line-through variants keep their own opacity rules. */
html.astra-color-scheme-dark .fct-checkout .fct_item_tax_badge.is-inclusive,
html.astra-color-scheme-dark .fct-checkout .fct_item_tax_badge.is-exclusive {
    background-color: var(--ast-global-color-4);
    color: var(--ast-global-color-3);
}

html.astra-color-scheme-dark .fct-checkout .fct_item_tax_badge_amount.is-inclusive,
html.astra-color-scheme-dark .fct-checkout .fct_item_tax_badge_amount.is-exclusive {
    color: var(--ast-global-color-3);
}

/* -------------------------------------------------------------------------
   VAT / tax ID input — focus state
   -------------------------------------------------------------------------
   The Fluent Cart tax field input (.fct_tax_field input[type=text]) carries
   focus:bg-white: in light mode the input is already white, but in the dark
   scheme clicking into the field turns it into a white island. Keep the field
   surface on the same var-5 as the other checkout inputs (border and the
   blue focus ring already follow the re-mapped variables). Light mode is
   untouched: the rule is scoped to the dark scheme and the checkout page.
   ========================================================================== */
html.astra-color-scheme-dark .fct-checkout .fct_tax_field input[type="text"]:focus {
    background-color: var(--ast-global-color-5);
}
