/* ================================================================
   Spring / Easter Theme – DamnModz
   
   Strategy: override the theme's root RGB custom properties so every
   element that references --accent-primary automatically turns green.
   Then patch the handful of hardcoded rgba(220,38,38,...) values in
   the legacy CSS bundle.
   ================================================================ */

/* ----------------------------------------------------------------
   0.  Root Variable Override (single source of truth)
   
   The theme builds ALL accent colours from these four RGB triplets.
   Swapping them here turns buttons, badges, borders, glows, links,
   checkout accents, card hovers, pagination, and every other element
   green in one shot — no selector list needed.
   ---------------------------------------------------------------- */

:root {
    /* NOTE: accent-primary-rgb overrides are in an inline <style> at
       priority 9999 in wp_head (spring-theme.php) so they always win
       the cascade against the theme's style.css. */

    /* Spring helper tokens (used by banner & petal canvas) */
    --spring-green:        #4CAF50;
    --spring-green-light:  #81C784;
    --spring-green-dark:   #388E3C;
    --spring-yellow:       #FFF176;
}

/* ----------------------------------------------------------------
   1.  Legacy Bridge hardcoded rgba(220,38,38) overrides
   
   Most theme CSS references var(--accent-primary-rgb) which we
   already swapped above.  But legacy-bridge-custom.css has bare
   rgba(220,38,38,...) values.  We patch every selector here.
   ---------------------------------------------------------------- */

/* Order total row highlight */
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.order-total {
    background: rgba(76, 175, 80, 0.12) !important;
}

/* Payment method selected label */
body.woocommerce-checkout #payment ul.wc_payment_methods > li > input.input-radio:checked + label {
    background: rgba(76, 175, 80, 0.1) !important;
    box-shadow: inset 0 0 0 1px rgba(76, 175, 80, 0.7) !important;
}

/* Payment method radio border */
body.woocommerce-checkout #payment ul.wc_payment_methods > li > input.input-radio:checked + label::before {
    border-color: rgba(76, 175, 80, 0.85) !important;
}

/* Payment box open under selected method */
body.woocommerce-checkout #payment ul.wc_payment_methods > li > input.input-radio:checked ~ .payment_box {
    background: rgba(76, 175, 80, 0.06) !important;
    box-shadow:
        inset 1px 0 0 rgba(76, 175, 80, 0.7),
        inset -1px 0 0 rgba(76, 175, 80, 0.7),
        inset 0 -1px 0 rgba(76, 175, 80, 0.7) !important;
}

/* Payment card :has() highlight */
@supports selector(:has(*)) {
    body.woocommerce-checkout #payment ul.wc_payment_methods > li:has(> input.input-radio:checked) {
        border-color: rgba(76, 175, 80, 0.7) !important;
        box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.18) !important;
    }
}

/* Place order button shadow */
body.woocommerce-checkout button.button.alt {
    box-shadow: 0 10px 26px rgba(76, 175, 80, 0.28) !important;
}

body.woocommerce-checkout button.button.alt:hover {
    box-shadow: 0 14px 34px rgba(76, 175, 80, 0.34) !important;
}

/* Cart page checkout button */
a.checkout-button.button.alt.wc-forward {
    box-shadow: 0 10px 26px rgba(76, 175, 80, 0.22) !important;
}

a.checkout-button.button.alt.wc-forward:hover {
    box-shadow: 0 14px 34px rgba(76, 175, 80, 0.3) !important;
}

/* Contact form error states */
.wpcf7-not-valid-tip,
.wpcf7 form.invalid .wpcf7-response-output {
    background: rgba(76, 175, 80, 0.1) !important;
    border: 1px solid rgba(76, 175, 80, 0.3) !important;
}

/* ----------------------------------------------------------------
   2.  Spring Banner (slim coupon strip below countdown timer)
   ---------------------------------------------------------------- */

#dmz-spring-topbar {
    position: relative;
    z-index: 1000;
}

#dmz-spring-banner {
    background: rgba(10, 10, 15, 0.95);
    border-bottom: 1px solid rgba(76, 175, 80, 0.25);
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    padding: 6px 16px;
    font-size: 12.5px;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.dmz-spring-banner__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dmz-spring-banner__inner strong {
    color: #81C784;
    font-weight: 700;
    letter-spacing: 1px;
}

.dmz-spring-banner__icon {
    font-size: 13px;
}

.dmz-spring-banner__sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
    line-height: 1;
}

/* ----------------------------------------------------------------
   3.  Logo accent
   ---------------------------------------------------------------- */

.dm-logo__accent {
    color: var(--spring-green-light) !important;
}

/* ----------------------------------------------------------------
   4.  Simple Banner spring tint
   ---------------------------------------------------------------- */

#simple-banner {
    display: none !important;
}

/* ----------------------------------------------------------------
   5.  Scrollbar spring accent (Webkit)
   ---------------------------------------------------------------- */

::-webkit-scrollbar-thumb {
    background: var(--spring-green) !important;
}

/* ----------------------------------------------------------------
   6.  Mobile tweaks
   ---------------------------------------------------------------- */

@media (max-width: 768px) {
    #dmz-spring-banner {
        font-size: 11px;
        padding: 5px 10px;
    }

    .dmz-spring-banner__sep {
        display: none;
    }

    .dmz-spring-banner__inner {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* ----------------------------------------------------------------
   7.  Falling Petals Canvas (rendered by spring-petals.js)
   ---------------------------------------------------------------- */

#dmz-spring-petals-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
}
