/*
 Theme Name:   Insurigo Child
 Theme URI:    https://prestigecarinsurance.com.au
 Description:  Child theme for Insurigo - Prestige Car Insurance
 Author:       Prestige Car Insurance
 Template:     insurigo
 Version:      1.0.0
 Text Domain:  insurigo-child
*/

/* ==========================================================================
   Multi-Step Quote Form
   ========================================================================== */

.prestige-multistep-form {
    max-width: 820px;
    margin: 0 auto 40px;
    font-family: "Epilogue", Arial, Helvetica, sans-serif;
}

/* --- Progress Bar --- */
.form-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

.form-progress::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
    cursor: default;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 3px solid #e0e0e0;
}

.step-label {
    font-size: 12px;
    color: #999;
    font-weight: 500;
    text-align: center;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.progress-step.active .step-number {
    background: #25826a;
    color: #fff;
    border-color: #25826a;
    box-shadow: 0 0 0 4px rgba(37, 130, 106, 0.15);
}

.progress-step.active .step-label {
    color: #25826a;
    font-weight: 600;
}

.progress-step.completed .step-number {
    background: #25826a;
    color: #fff;
    border-color: #25826a;
}

.progress-step.completed .step-number::after {
    content: "\2713";
    font-size: 18px;
}

.progress-step.completed .step-number span,
.progress-step.completed .step-number {
    font-size: 0;
}

.progress-step.completed .step-number::after {
    font-size: 18px;
}

.progress-step.completed .step-label {
    color: #25826a;
}

/* --- Form Steps --- */
.form-step {
    display: none;
    animation: fadeInStep 0.4s ease;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 36px 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.form-step.active {
    display: block;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h3 {
    color: #1a1a2e;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px 0;
    padding: 0;
}

.form-step h4 {
    color: #1a1a2e;
    font-size: 17px;
    font-weight: 600;
    margin: 28px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.step-description {
    color: #6B7280;
    font-size: 14px;
    margin: 0 0 24px 0;
}

/* --- Form Fields --- */
.form-step label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
}

.form-step .form-control,
.form-step input[type="text"],
.form-step input[type="email"],
.form-step input[type="tel"],
.form-step input[type="number"],
.form-step input[type="date"],
.form-step textarea,
.form-step select {
    display: block;
    width: 100%;
    padding: 10px 14px;
    margin-top: 5px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #1a1a2e;
    background: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.form-step .form-control:focus,
.form-step input:focus,
.form-step textarea:focus,
.form-step select:focus {
    outline: none;
    border-color: #25826a;
    box-shadow: 0 0 0 3px rgba(37, 130, 106, 0.12);
    background: #fff;
}

.form-step textarea {
    min-height: 80px;
    resize: vertical;
}

/* --- Grid Layouts --- */
.driver-row,
.vehicle-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}

/* --- Radio Buttons --- */
.form-step .wpcf7-radio {
    display: flex;
    gap: 16px;
    margin-top: 6px;
}

.form-step .wpcf7-list-item {
    margin: 0;
}

.form-step .wpcf7-list-item label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    margin-bottom: 0;
    cursor: pointer;
}

.form-step .wpcf7-list-item input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #25826a;
    margin: 0;
}

/* --- Driver Sections --- */
.driver-section {
    background: #f8faf9;
    border: 1px solid #e8eeeb;
    border-radius: 8px;
    padding: 16px 20px 8px;
    margin-bottom: 16px;
}

.driver-section h4 {
    margin-top: 0;
    border-bottom: none;
    font-size: 15px;
    padding-bottom: 4px;
}

/* --- Field Hints --- */
.field-hint {
    font-size: 13px;
    color: #9CA3AF;
    margin: -4px 0 12px;
    font-style: italic;
}

/* --- Declaration --- */
.declaration-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
}

.declaration-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400 !important;
    font-size: 13px !important;
    color: #374151 !important;
    line-height: 1.6;
}

.declaration-label .wpcf7-acceptance input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #25826a;
    flex-shrink: 0;
}

/* --- Navigation Buttons --- */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.btn-next,
.btn-prev {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-next {
    background: #25826a;
    color: #fff;
    margin-left: auto;
}

.btn-next:hover {
    background: #1e6b57;
    box-shadow: 0 4px 12px rgba(37, 130, 106, 0.3);
    transform: translateY(-1px);
}

.btn-prev {
    background: #f3f4f6;
    color: #374151;
}

.btn-prev:hover {
    background: #e5e7eb;
}

.form-step input[type="submit"],
.form-step .wpcf7-submit {
    background: #25826a;
    color: #fff;
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.form-step input[type="submit"]:hover,
.form-step .wpcf7-submit:hover {
    background: #1e6b57;
    box-shadow: 0 4px 16px rgba(37, 130, 106, 0.35);
    transform: translateY(-1px);
}

/* --- Validation --- */
.form-step .wpcf7-not-valid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-step .wpcf7-not-valid-tip {
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
    display: block;
}

.field-error-message {
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

/* Step validation error banner */
.step-validation-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #991b1b;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeInStep 0.3s ease;
}

.step-validation-error::before {
    content: "\26A0";
    font-size: 18px;
}

/* --- CF7 Response Messages --- */
.wpcf7 form.sent .wpcf7-response-output {
    background: #f0fdf4;
    border: 1px solid #86efac !important;
    border-radius: 12px;
    padding: 24px;
    color: #166534;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin-top: 24px;
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
    background: #fef2f2;
    border: 1px solid #fecaca !important;
    border-radius: 12px;
    padding: 24px;
    color: #991b1b;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin-top: 24px;
}

.wpcf7 form.invalid .wpcf7-response-output {
    background: #fffbeb;
    border: 1px solid #fde68a !important;
    border-radius: 12px;
    padding: 16px 24px;
    color: #92400e;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-top: 24px;
}

.wpcf7-response-output {
    margin: 24px 0 0 0 !important;
    padding: 16px 24px !important;
}

/* --- Success confirmation overlay --- */
.quote-success-message {
    text-align: center;
    padding: 48px 32px;
    animation: fadeInStep 0.5s ease;
}

.quote-success-message .success-icon {
    width: 72px;
    height: 72px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    color: #25826a;
}

.quote-success-message h3 {
    color: #166534;
    font-size: 24px;
    margin-bottom: 12px;
}

.quote-success-message p {
    color: #6B7280;
    font-size: 15px;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}

/* --- Horizontal Rule --- */
.form-step hr {
    border: none;
    border-top: 2px solid #f0f0f0;
    margin: 28px 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .prestige-multistep-form {
        padding: 0 8px;
    }

    .form-step {
        padding: 24px 18px;
    }

    .form-progress {
        gap: 4px;
        padding: 0 8px;
    }

    .form-progress::before {
        left: 40px;
        right: 40px;
    }

    .step-number {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .step-label {
        font-size: 10px;
    }

    .driver-row,
    .vehicle-info-grid,
    .options-grid {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .btn-next,
    .btn-prev {
        width: 100%;
        text-align: center;
    }

    .btn-next {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .form-step h3 {
        font-size: 19px;
    }

    .form-progress::before {
        left: 30px;
        right: 30px;
    }
}
