/**
 * Configurator Lead Capture — Styles v2.1.0
 * ==========================================
 * Loaded by the plugin itself (no child theme dependency).
 *
 * The hero landing section HTML is in the WordPress page editor
 * (server-rendered for instant loading). These styles make it look right.
 */

/* ==========================================================================
   CONFIGURATOR V2.1 — Flow changes (hide elements)
   ========================================================================== */

/* 1. HIDE all original Step 0 content (form, headings, sub-text, CTA,
      Get Started button). The hero in the page editor replaces it. */
.visualiser.start[data-step-num="0"] .block-wrapper > .row {
    display: none !important;
}
.visualiser.start[data-step-num="0"] form.container-fluid {
    display: none !important;
}

/* 1b. HIDE the page-editor hero once the configurator moves past step 0.
       The JS also does a slideUp on click, but this CSS rule is a safety
       net in case JS is slow or the user navigates back. */
body:has(.visualiser.start:not(.active)) #clc-hero {
    display: none !important;
}

/* 2. HIDE the price display throughout the configurator
      Admin still receives the price in the email. */
.static-box .col.price,
.static-box .col.col-12.col-md-3.price {
    display: none !important;
}

/* 3. HIDE the "Add to Basket" button on the review page */
.review-actions .add-to-basket {
    display: none !important;
}

/* 4. HIDE the original "Request installation price" email button */
.review-actions .configurator-email {
    display: none !important;
}

/* 5. HIDE the review-email-message div (not needed in new flow) */
.review-email-message {
    display: none !important;
}


/* ==========================================================================
   HERO LANDING SECTION (rendered by the page editor)
   ========================================================================== */

#clc-hero {
    padding: 10px 0 20px;
}

.clc-hero-label {
    display: inline-block;
    background: #f0ecf5;
    color: #331558;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.clc-hero-layout {
    display: flex;
    gap: 28px;
    margin-bottom: 28px;
    align-items: flex-start;
}

.clc-hero-text {
    flex: 1;
    min-width: 0;
}

.clc-hero-img {
    width: 280px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
}

.clc-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 240px;
}

.clc-hero-h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a0a2e;
    line-height: 1.25;
    margin: 0 0 8px;
}

.clc-hero-h1 span {
    color: #331558;
}

.clc-hero-sub {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 16px;
}

.clc-hero-trust {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.clc-hero-stars {
    color: #C8962E;
    font-size: 18px;
    letter-spacing: 1px;
}

.clc-hero-rating {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.clc-hero-rating a {
    color: #331558;
    text-decoration: underline;
}

/* Gold CTA button */
.clc-hero-btn {
    display: inline-block;
    background-color: #C8962E !important;
    color: #FFFFFF !important;
    border: none !important;
    padding: 18px 44px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    cursor: pointer;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(200, 150, 46, 0.35);
    transition: all 0.25s ease;
}

.clc-hero-btn:hover {
    background-color: #b5851f !important;
    box-shadow: 0 6px 20px rgba(200, 150, 46, 0.45);
    transform: translateY(-1px);
}

.clc-hero-btn:active {
    transform: translateY(0);
}

.clc-hero-btn i {
    margin-left: 8px;
}

.clc-hero-hint {
    font-size: 13px;
    color: #888;
    margin-top: 10px;
}

/* 3-step process bar */
.clc-hero-steps {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: #f9f7fc;
    border-radius: 12px;
    border: 1px solid #e8e0f0;
    margin-bottom: 28px;
}

.clc-hero-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.clc-hero-step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #331558;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.clc-hero-step-title {
    font-size: 14px;
    font-weight: 700;
    color: #331558;
    margin: 0 0 4px;
}

.clc-hero-step-desc {
    font-size: 12px;
    color: #777;
    margin: 0;
    line-height: 1.4;
}

.clc-hero-step-arrow {
    position: absolute;
    right: -12px;
    top: 16px;
    color: #c4b3d9;
    font-size: 14px;
}

/* Customer reviews */
.clc-hero-reviews-head {
    font-size: 17px;
    font-weight: 700;
    color: #1a0a2e;
    margin: 0 0 14px;
}

.clc-hero-review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.clc-hero-review {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 16px 18px;
}

.clc-hero-review-stars {
    color: #C8962E;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.clc-hero-review-text {
    font-size: 13px;
    color: #444;
    line-height: 1.55;
    margin: 0 0 8px;
    font-style: italic;
}

.clc-hero-review-name {
    font-size: 12px;
    color: #666;
    margin: 0;
    font-weight: 600;
}

.clc-hero-review-name span {
    font-weight: 400;
    color: #aaa;
}

/* Trust badges */
.clc-hero-badges {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e8e0f0;
    flex-wrap: wrap;
}

.clc-hero-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.clc-hero-badge i {
    font-size: 15px;
    color: #331558;
}


/* ==========================================================================
   QUOTE SECTION — CTA Button + Contact Form
   ========================================================================== */

#clc-quote-section {
    max-width: 640px;
    margin: 30px auto 20px;
    padding: 0 15px;
}

/* --- "Get a Hassle-Free Quote" CTA button --- */
#clc-quote-cta {
    text-align: center;
    padding: 20px 0;
}

.clc-btn-quote {
    display: inline-block;
    background-color: #331558;
    color: #FFFFFF;
    border: none;
    padding: 18px 40px;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 15px rgba(51, 21, 88, 0.25);
    width: 100%;
    max-width: 480px;
}

.clc-btn-quote:hover {
    background-color: #4a2078;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(51, 21, 88, 0.35);
}

.clc-btn-quote:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(51, 21, 88, 0.2);
}

.clc-quote-subtitle {
    margin: 12px 0 0;
    color: #666;
    font-size: 0.9rem;
}


/* --- Quote contact form --- */
.clc-quote-form-inner {
    background: #f9f7fc;
    border: 2px solid #e8e0f0;
    border-radius: 12px;
    padding: 30px 28px;
    margin-top: 10px;
}

.clc-form-title {
    color: #331558;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.clc-form-desc {
    color: #555;
    font-size: 0.9rem;
    margin: 0 0 22px;
    line-height: 1.5;
}

.clc-form-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.clc-form-field {
    flex: 1;
}

.clc-form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #331558;
    margin-bottom: 5px;
}

.clc-required {
    color: #c62828;
}

.clc-form-field input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #d5cce0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #333;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.clc-form-field input:focus {
    border-color: #331558;
    box-shadow: 0 0 0 3px rgba(51, 21, 88, 0.12);
    outline: none;
}

.clc-form-field input::placeholder {
    color: #aaa;
    font-size: 0.88rem;
}

/* Field error state */
.clc-field-error {
    border-color: #c62828 !important;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1) !important;
}


/* --- Submit button --- */
.clc-form-actions {
    margin-top: 22px;
    text-align: center;
}

.clc-btn-submit {
    display: inline-block;
    background-color: #331558;
    color: #FFFFFF;
    border: none;
    padding: 15px 36px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 360px;
}

.clc-btn-submit:hover {
    background-color: #4a2078;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(51, 21, 88, 0.3);
}

.clc-btn-submit:disabled {
    opacity: 0.75;
    cursor: wait;
    transform: none;
}

/* Button processing state */
.clc-processing {
    pointer-events: none !important;
}


/* --- Error messages --- */
#clc-form-errors {
    background: #fef2f2;
    border: 1px solid #e57373;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    color: #c62828;
    font-size: 0.88rem;
    line-height: 1.5;
}

#clc-form-errors p {
    margin: 4px 0;
}


/* ==========================================================================
   SPINNER ANIMATION
   ========================================================================== */

@keyframes clc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.clc-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: clc-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}


/* ==========================================================================
   CONFIRMATION BANNERS (Success / Error)
   ========================================================================== */

.clc-confirmation {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px;
    border-radius: 12px;
    margin: 20px 0;
    animation: clc-slideIn 0.4s ease-out;
}

@keyframes clc-slideIn {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Success banner */
.clc-confirmation.clc-success {
    background-color: #f0faf0;
    border: 2px solid #2e7d32;
    color: #1b5e20;
}

.clc-confirmation.clc-success .clc-confirmation-icon {
    background-color: #2e7d32;
    color: #FFFFFF;
}

/* Error banner */
.clc-confirmation.clc-error {
    background-color: #fef2f2;
    border: 2px solid #c62828;
    color: #b71c1c;
}

.clc-confirmation.clc-error .clc-confirmation-icon {
    background-color: #c62828;
    color: #FFFFFF;
}

/* Icon circle */
.clc-confirmation-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
}

/* Text content */
.clc-confirmation-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.clc-confirmation-text p {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.55;
    opacity: 0.9;
}

.clc-confirmation-text a {
    color: inherit;
    text-decoration: underline;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    /* Hero layout: stack vertically on mobile */
    .clc-hero-layout {
        flex-direction: column;
    }

    .clc-hero-img {
        width: 100%;
        max-height: 220px;
        order: -1;
    }

    .clc-hero-img img {
        min-height: 180px;
    }

    .clc-hero-h1 {
        font-size: 23px;
    }

    .clc-hero-btn {
        display: block !important;
        width: 100% !important;
        text-align: center;
        padding: 16px 24px !important;
        font-size: 16px !important;
    }

    /* Steps: stack vertically */
    .clc-hero-steps {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .clc-hero-step-arrow {
        display: none;
    }

    /* Reviews: single column */
    .clc-hero-review-grid {
        grid-template-columns: 1fr;
    }

    /* Badges: wrap to 2 columns */
    .clc-hero-badges {
        gap: 12px;
    }

    .clc-hero-badge {
        flex: 0 0 calc(50% - 6px);
    }
}

@media (max-width: 600px) {
    .clc-btn-quote {
        padding: 16px 24px;
        font-size: 1.1rem;
    }

    .clc-quote-form-inner {
        padding: 22px 18px;
    }

    .clc-confirmation {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        align-items: center;
    }
}
