/* ============================================
   AI QUICKSCAN PAGE STYLES
   Enhanced with new design system
   ============================================ */

/* Section Base */
.quickscan-section {
    padding: 8rem 0 5rem 0;
    min-height: calc(100vh - 80px);
    background: var(--gradient-subtle);
}

/* Header */
.quickscan-header {
    text-align: center;
    margin-bottom: 3rem;
}

.quickscan-header h1 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
}

.quickscan-header p {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */

.progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    flex: 1;
    max-width: 200px;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 25px;
    left: calc(50% + 35px);
    width: calc(100% + 2rem - 70px);
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    transition: background 0.4s ease;
}

.progress-step.active:not(:last-child)::after,
.progress-step.completed:not(:last-child)::after {
    background: var(--gradient-primary);
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.progress-step.active .step-circle {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 14px rgba(0, 119, 182, 0.35);
    transform: scale(1.05);
}

.progress-step.completed .step-circle {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
}

.step-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    transition: color 0.3s ease;
}

.progress-step.active .step-label {
    color: var(--primary-600);
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: var(--primary-500);
}

/* ============================================
   FORM STYLES
   ============================================ */

.quickscan-form {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    max-width: 900px;
    margin: 0 auto;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

.step-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 500;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-light);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.375rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.form-description {
    font-family: 'DM Sans', sans-serif;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-field:last-child {
    margin-bottom: 0;
}

.form-field label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.9375rem 1.125rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.25s ease;
    background: white;
    color: var(--text-primary);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-muted);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.1);
}

.form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.form-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 18px;
    padding-right: 3rem;
}

/* ============================================
   CHECKBOX GRID
   ============================================ */

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
}

.checkbox-option {
    position: relative;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: white;
    transition: all 0.25s ease;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.checkbox-option:hover .checkbox-label {
    border-color: var(--primary-300);
    background: var(--primary-50);
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-label {
    border-color: var(--primary-500);
    background: var(--primary-500);
    color: white;
    font-weight: 500;
}

.checkbox-option input[type="checkbox"]:focus + .checkbox-label {
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}

/* ============================================
   GDPR CHECKBOX
   ============================================ */

.gdpr-checkbox {
    margin-top: 1.5rem;
}

.gdpr-checkbox .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.gdpr-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary-500);
}

.gdpr-checkbox a {
    color: var(--primary-600);
    text-decoration: underline;
}

.gdpr-checkbox a:hover {
    color: var(--primary-700);
}

/* ============================================
   FORM ACTIONS
   ============================================ */

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-400);
    color: var(--primary-600);
    background: var(--primary-50);
}

.btn-submit {
    min-width: 200px;
}

.btn-submit .btn-loading {
    display: none;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: inline;
}

.btn-submit.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================
   SUCCESS MESSAGE
   ============================================ */

.success-message {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 4rem 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.5s ease-out;
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 119, 182, 0.3);
}

.success-icon .material-symbols-outlined {
    font-size: 48px;
    color: white;
}

.success-message h2 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    margin: 0;
}

.success-message p {
    font-family: 'DM Sans', sans-serif;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin: 0;
    line-height: 1.7;
}

/* ============================================
   BACKGROUND IMAGE
   ============================================ */

.quickscan-with-bg {
    position: relative;
    overflow: hidden;
}

.quickscan-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.quickscan-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(2px);
}

.quickscan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(250, 251, 252, 0.92) 0%,
        rgba(244, 245, 247, 0.94) 100%);
}

.quickscan-with-bg .container {
    position: relative;
    z-index: 1;
}

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

@media (max-width: 768px) {
    .quickscan-section {
        padding: 6rem 0 3rem 0;
    }

    .quickscan-header h1 {
        font-size: 1.875rem;
    }

    .quickscan-header p {
        font-size: 1rem;
    }

    .progress-indicator {
        gap: 0.75rem;
        padding: 1.25rem 1rem;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .progress-step {
        min-width: 80px;
        max-width: 100px;
    }

    .progress-step:not(:last-child)::after {
        display: none;
    }

    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .quickscan-form {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-xl);
    }

    .step-content h2 {
        font-size: 1.5rem;
    }

    .form-section h3 {
        font-size: 1.125rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }

    .checkbox-label {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .success-message {
        padding: 3rem 1.5rem;
    }

    .success-icon {
        width: 64px;
        height: 64px;
    }

    .success-icon .material-symbols-outlined {
        font-size: 36px;
    }

    .success-message p {
        font-size: 1rem;
    }
}

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

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

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .form-step.active {
        animation: none;
    }

    .success-message {
        animation: none;
    }

    .btn,
    .checkbox-label,
    .step-circle,
    .form-field input,
    .form-field select,
    .form-field textarea {
        transition: none;
    }
}
