/*
 * Base Variables & CF7 Global Overrides
 * This file serves as the foundation for all modular quote-form-*.css files.
 */

:root {
    --quote-blue: #274586;
    --quote-pink: #ff00cb;
    --quote-pink-light: #fff5f9;
    --quote-green: #166534;
    --quote-green-bg: #f0fdf4;
    --quote-green-accent: #185a3a;
    --quote-green-border: #bbf7d0;
    --quote-red: #d63638;
    --quote-yellow: #ffc107;
    --quote-yellow-bg: #fff8e1;
    --quote-yellow-dark: #b08900;
    --quote-yellow-border: #ffe082;
    --quote-border: #e0e0e0;
    --quote-border-light: #eeeeee;
    --quote-border-medium: #dddddd;
    --quote-border-grey: #cccccc;
    --quote-bg: #ffffff;
    --quote-bg-alt: #f8f9fb;
    --quote-text-dark: #333333;
    --quote-text-muted: #64748b;
    --quote-text-grey: #666666;
    --quote-text-light: #999999;
    --quote-text-dim: #888888;
    --quote-radius: 12px;
    --quote-shadow: 0 10px 30px var(--quote-black-alpha-05);
    --quote-shadow-small: 0 4px 12px var(--quote-black-alpha-10);
    --quote-blue-shadow: 0 4px 12px var(--quote-blue-alpha-40);

    --quote-white: #ffffff;
    --quote-hero-accent: #1a305e;

    --quote-white-alpha-10: rgba(255, 255, 255, 0.1);
    --quote-white-alpha-20: rgba(255, 255, 255, 0.2);
    --quote-white-alpha-40: rgba(255, 255, 255, 0.4);
    --quote-black-alpha-05: rgba(0, 0, 0, 0.05);
    --quote-black-alpha-10: rgba(0, 0, 0, 0.1);
    --quote-blue-alpha-40: rgba(39, 69, 134, 0.4);
}

/* CF7 Suppression - Global to all form views */
.quote-calculator .wpcf7-response-output.wpcf7-display-none,
.quote-calculator .wpcf7-response-output {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.quote-calculator .wpcf7-spinner {
    display: none !important;
    visibility: hidden !important;
}

/* Shared Functional Components (Timers/Countdowns used in multiple modules) */
.timer-countdown {
    font-family: monospace;
    font-weight: bold;
}

.quote-expiry-timer {
    font-size: 0.9rem;
    color: var(--quote-pink);
}

.hidden-view {
    display: none !important;
}

/* Loading State for Buttons */
.wpcf7-submit.loading {
    position: relative;
    pointer-events: none;
    /* Prevent further clicks */
    opacity: 0.7;
}

.wpcf7-submit.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    /* Adjust size as needed */
    height: 16px;
    /* Adjust size as needed */
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
    vertical-align: middle;
}

/* Specific targeting for the checkout container to avoid body-level conflicts */
div.woocommerce-checkout:not(body) {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--quote-bg);
    padding: 40px;
    border: 1px solid var(--quote-border);
    border-radius: var(--quote-radius);
    box-shadow: var(--quote-shadow);
    /* Reset compression if applied by body styles */
    width: 100%;
    box-sizing: border-box;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Functional Helpers */
.max-savings-achieved {
    color: var(--quote-green-accent);
    background: var(--quote-green-bg);
    padding: 2px 8px;
    border-radius: 4px;
}
