/* Auth Page Styles */

/* Gradient Background */
.gradient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.gradient-svg {
    width: 100%;
    height: 100%;
}

/* Navigation */
.auth-nav {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

.back-link {
    color: #6B3E2A;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: #2C1810;
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Auth Card */
.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 440px;
    padding: 3rem;
    margin-bottom: 3rem;
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    font-size: 2rem;
    font-weight: 700;
    color: #2C1810;
    margin-bottom: 0.5rem;
}

.auth-logo-img {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.auth-tagline {
    color: #6B3E2A;
    font-size: 1rem;
}

/* Tab Navigation */
.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #E5DDD5;
}

.tab-button {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #A68B76;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.tab-button.active {
    color: #2C1810;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #FFD700;
}

/* Forms */
.auth-form-container {
    animation: fadeIn 0.3s ease;
}

.auth-form-container.hidden {
    display: none;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Google Button */
.google-auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: white;
    border: 1px solid #E5DDD5;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #2C1810;
    cursor: pointer;
    transition: all 0.2s;
}

.google-auth-button:hover {
    background: #FAFAFA;
    border-color: #D4C4B0;
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #A68B76;
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5DDD5;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #2C1810;
}

.form-group input {
    padding: 0.875rem 1rem;
    border: 1px solid #E5DDD5;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #87CEEB;
}

.form-help {
    font-size: 12px;
    color: #A68B76;
}

/* Remember Me / Forgot Password */
.form-remember {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    color: #6B3E2A;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.forgot-link {
    font-size: 14px;
    color: #87CEEB;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Submit Button */
.auth-submit-button {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

/* Footer */
.auth-footer {
    text-align: center;
    font-size: 12px;
    color: #A68B76;
    margin-top: 1.5rem;
}

.auth-footer a {
    color: #87CEEB;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Consent Section */
.consent-section {
    margin: 1.5rem 0 1rem;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 14px;
    color: #6B3E2A;
}

.consent-item input[type="checkbox"] {
    margin-top: 3px;
    min-width: 16px;
    min-height: 16px;
    accent-color: #6B46C1;
}

.consent-item a {
    color: #87CEEB;
}

.consent-item a:hover {
    text-decoration: underline;
}

/* Consent Buttons (Scrollwrap triggers) */
.consent-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem;
}

.consent-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: #FAFAFA;
    border: 1px solid #E5DDD5;
    border-radius: 8px;
    font-size: 14px;
    color: #2C1810;
    cursor: pointer;
    transition: all 0.2s;
}

.consent-btn:hover:not(.consent-btn--completed) {
    background: #F5F5F5;
    border-color: #D4C4B0;
}

.consent-btn--completed {
    background: #F0FDF4;
    border-color: #86EFAC;
    cursor: default;
}

.consent-btn__text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.consent-btn__status {
    font-size: 1.25rem;
}

.consent-btn__arrow {
    color: #A68B76;
    transition: transform 0.2s;
}

.consent-btn:hover:not(.consent-btn--completed) .consent-btn__arrow {
    transform: translateX(4px);
}

/* Consent Modal (Scrollwrap) */
.consent-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.consent-modal--active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.consent-modal__container {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.consent-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #E5DDD5;
}

.consent-modal__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2C1810;
    margin: 0;
}

.consent-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #A68B76;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.consent-modal__close:hover {
    color: #2C1810;
}

.consent-modal__content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    font-size: 14px;
    line-height: 1.7;
    color: #4B5563;
}

.consent-modal__content h1,
.consent-modal__content h2,
.consent-modal__content h3 {
    color: #2C1810;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.consent-modal__content h1 { font-size: 1.5rem; }
.consent-modal__content h2 { font-size: 1.25rem; }
.consent-modal__content h3 { font-size: 1.1rem; }

.consent-modal__content h1:first-child,
.consent-modal__content h2:first-child {
    margin-top: 0;
}

.consent-modal__content p {
    margin-bottom: 1rem;
}

.consent-modal__content ul,
.consent-modal__content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.consent-modal__content li {
    margin-bottom: 0.5rem;
}

.consent-modal__scroll-hint {
    text-align: center;
    padding: 0.75rem;
    background: #FEF3C7;
    color: #92400E;
    font-size: 13px;
    font-weight: 500;
    border-top: 1px solid #FCD34D;
}

.consent-modal__scroll-hint--hidden {
    display: none;
}

.consent-modal__footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #E5DDD5;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.consent-modal__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 14px;
    color: #2C1810;
}

.consent-modal__checkbox input {
    margin-top: 2px;
    min-width: 18px;
    min-height: 18px;
    accent-color: #6B46C1;
}

.consent-modal__checkbox label {
    cursor: pointer;
    line-height: 1.4;
}

.consent-modal__actions {
    display: flex;
    gap: 0.75rem;
}

.consent-modal__btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.consent-modal__btn--cancel {
    background: white;
    border: 1px solid #E5DDD5;
    color: #6B3E2A;
}

.consent-modal__btn--cancel:hover {
    background: #FAFAFA;
    border-color: #D4C4B0;
}

.consent-modal__btn--agree {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: none;
    color: white;
}

.consent-modal__btn--agree:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.consent-modal__btn--agree:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Mobile modal adjustments */
@media (max-width: 640px) {
    .consent-modal--active {
        padding: 0;
        align-items: flex-end;
    }

    .consent-modal__container {
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
    }

    .consent-modal__content {
        padding: 1rem;
    }

    .consent-modal__footer {
        padding: 1rem;
    }

    .consent-modal__actions {
        flex-direction: column;
    }
}

/* Journey Progress */
.journey-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.step-icon {
    font-size: 1.5rem;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.step-label {
    font-size: 11px;
    color: #A68B76;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.progress-step.completed .step-icon,
.progress-step.current .step-icon {
    opacity: 1;
}

.progress-step.current .step-label {
    opacity: 1;
    color: #FFD700;
    font-weight: 600;
}

.progress-line {
    width: 40px;
    height: 2px;
    background: #E5DDD5;
    transition: background 0.3s;
}

.progress-line.completed {
    background: #FFD700;
}

.progress-line.active {
    background: linear-gradient(90deg, #FFD700 0%, #E5DDD5 100%);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   WIZARD STAGES - Signup Flow
   ============================================ */

/* Stage Visibility */
.wizard-stage {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wizard-stage.active {
    display: block;
}

/* Stage Header */
.wizard-stage-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.wizard-stage-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.wizard-stage-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2C1810;
    margin-bottom: 0.5rem;
}

.wizard-stage-description {
    color: #6B3E2A;
    font-size: 0.95rem;
}

/* Top Stepper */
.wizard-stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.wizard-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E5DDD5;
    color: #A68B76;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.wizard-step.active .wizard-step-circle {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.wizard-step.completed .wizard-step-circle {
    background: #10B981;
    color: white;
}

.wizard-step-label {
    font-size: 10px;
    color: #A68B76;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.wizard-step.active .wizard-step-label {
    color: #2C1810;
    font-weight: 600;
}

.wizard-step.completed .wizard-step-label {
    color: #10B981;
}

.wizard-step-line {
    width: 50px;
    height: 2px;
    background: #E5DDD5;
    margin: 0 8px;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.wizard-step-line.completed {
    background: #10B981;
}

/* Policy Scroll Container */
.policy-scroll-container {
    background: #F9FAFB;
    border: 1px solid #E5DDD5;
    border-radius: 8px;
    padding: 1.25rem;
    max-height: 280px;
    overflow-y: auto;
    font-size: 14px;
    color: #4B5563;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.policy-scroll-container h1,
.policy-scroll-container h2,
.policy-scroll-container h3 {
    color: #2C1810;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.policy-scroll-container h1:first-child,
.policy-scroll-container h2:first-child {
    margin-top: 0;
}

.policy-scroll-container h1 { font-size: 1.25rem; }
.policy-scroll-container h2 { font-size: 1.1rem; }
.policy-scroll-container h3 { font-size: 1rem; }

.policy-scroll-container p {
    margin-bottom: 0.75rem;
}

.policy-scroll-container ul,
.policy-scroll-container ol {
    margin-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.policy-scroll-container li {
    margin-bottom: 0.35rem;
}

/* Scroll Progress Indicator */
.scroll-progress {
    height: 3px;
    background: #E5DDD5;
    border-radius: 2px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.scroll-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #10B981);
    width: 0%;
    transition: width 0.1s ease;
}

.scroll-status {
    font-size: 12px;
    color: #A68B76;
    text-align: center;
    margin-bottom: 0.75rem;
}

.scroll-status.complete {
    color: #10B981;
    font-weight: 500;
}

/* Scroll Hint */
.wizard-scroll-hint {
    background: #FEF3C7;
    color: #92400E;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.wizard-scroll-hint.hidden {
    display: none;
}

.wizard-scroll-hint-icon {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* Consent Checkbox */
.wizard-consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #FAFAFA;
    border: 1px solid #E5DDD5;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.wizard-consent-checkbox:hover:not(.locked) {
    border-color: #D4C4B0;
}

.wizard-consent-checkbox.checked {
    background: #F0FDF4;
    border-color: #86EFAC;
}

.wizard-consent-checkbox.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.wizard-consent-checkbox.locked input {
    pointer-events: none;
}

.wizard-consent-checkbox input {
    margin-top: 2px;
    min-width: 20px;
    min-height: 20px;
    accent-color: #10B981;
    cursor: pointer;
}

.wizard-consent-checkbox span {
    font-size: 14px;
    color: #2C1810;
    line-height: 1.4;
}

/* Navigation Buttons */
.wizard-nav-buttons {
    display: flex;
    gap: 1rem;
}

.wizard-nav-buttons .infitwin-button:first-child {
    flex: 0.7;
}

.wizard-nav-buttons .infitwin-button:last-child {
    flex: 1.3;
}

/* Stage Subtitle */
.wizard-stage-subtitle {
    color: #6B3E2A;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1rem;
}

/* Scroll Hint (inline) */
.scroll-hint {
    color: #92400E;
    font-size: 12px;
    margin-top: 0.5rem;
    animation: bounce 1s infinite;
}

/* Consent Checkbox Label */
.consent-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 14px;
    color: #2C1810;
    line-height: 1.4;
}

.consent-checkbox-label .checkmark {
    display: none; /* Using native checkbox */
}

/* Success Screen */
.success-screen {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    font-size: 4rem;
    color: #10B981;
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.success-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #10B981;
    margin-bottom: 0.5rem;
}

.success-message {
    color: #2C1810;
    margin-bottom: 0.5rem;
}

.success-redirect {
    color: #6B3E2A;
    font-size: 0.9rem;
}

/* Unlocked state for consent */
.wizard-consent-checkbox.unlocked {
    opacity: 1;
    cursor: pointer;
}

/* Login Prompt */
.wizard-login-prompt {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5DDD5;
    font-size: 14px;
    color: #6B3E2A;
}

.wizard-login-prompt a {
    color: #FF8C00;
    font-weight: 500;
    text-decoration: none;
}

.wizard-login-prompt a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-card {
        padding: 2rem;
    }

    .journey-progress {
        transform: scale(0.8);
    }

    /* Wizard Responsive */
    .wizard-stepper {
        transform: scale(0.85);
    }

    .wizard-step-line {
        width: 30px;
    }

    .policy-scroll-container {
        max-height: 220px;
        padding: 1rem;
    }

    .wizard-nav-buttons {
        flex-direction: column;
    }

    .wizard-nav-buttons .infitwin-button:first-child,
    .wizard-nav-buttons .infitwin-button:last-child {
        flex: 1;
    }
}