@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Note: Root variables are inherited from the main app's CSS */

.onboarding-container {
    width: 100%;
    padding: 1.5rem 1rem; /* Mobile-first padding */
    text-align: center;
    position: relative;
    margin: 0 auto; /* Center in the wrapper */
}

.progress-container {
    position: absolute;
    top: 2rem; /* Aligns with container padding */
    left: 2rem; /* Aligns with container padding */
    right: 2rem; /* Aligns with container padding */
    width: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.progress-bar {
    flex-grow: 1;
    height: 4px;
    background-color: var(--color-charcoal-light);
    border-radius: 2px;
}
.progress-bar-fill {
    width: 20%; /* Start at step 1 of 5 */
    height: 100%;
    background-color: var(--color-teal);
    border-radius: 2px;
    transition: width 0.5s ease;
}
.progress-text {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.step-container {
    position: relative;
    margin-top: 4rem; /* Make space for progress bar */
}

.onboarding-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.onboarding-step.active {
    opacity: 1;
    pointer-events: auto;
    position: relative; /* Take up space in the document flow */
}

.logo-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.logo-icon {
    width: 48px;
    height: 48px;
    stroke: var(--color-teal);
}
.logo-text {
    font-size: 2rem;
    font-weight: 700;
    display: none; /* Hidden for now to match screenshot */
}

.headline {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    font-weight: 700;
}

.subheadline {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 40ch;
    margin: 0 auto;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 400px;
    margin-top: 2rem;
}
.auth-buttons .cta-button {
    width: 100%;
}
.secondary-auth-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
}
.secondary-auth-actions button {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-main);
    padding: 0.5rem;
}
.secondary-auth-actions button:hover {
    color: var(--color-text);
}
.secondary-auth-actions .divider {
    width: 1px;
    height: 16px;
    background-color: var(--color-text-muted);
}


.form-input {
    width: 100%;
    padding: 1rem;
    background: var(--color-charcoal-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--color-text);
    font-size: 1.1rem;
    text-align: center;
    margin: 1rem 0;
}
.form-input:focus {
    outline: none;
    border-color: var(--color-teal);
}

.navigation-buttons {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
    justify-content: center;
    margin-top: 1rem;
}

.cta-button, .back-btn {
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
    width: 100%;
}

.cta-button {
    background-color: var(--color-teal);
    color: #111;
}

.cta-button:hover {
    transform: scale(1.05);
}

.cta-button:disabled {
    background-color: #555;
    color: #888;
    cursor: not-allowed;
    transform: scale(1);
}

.back-btn {
    background-color: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-text-muted);
}
.back-btn:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--color-text);
}

.welcome-visual {
    width: 120px;
    height: 120px;
    background: var(--color-teal);
    border-radius: 50%;
    margin: 1rem 0;
    animation: pulse 4s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(95, 195, 178, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 20px rgba(95, 195, 178, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(95, 195, 178, 0); }
}

.goal-selection-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.goal-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem;
    background-color: var(--color-charcoal-light);
    border: 2px solid transparent;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    color: var(--color-text);
    font-family: var(--font-main);
}
.goal-card:hover {
    transform: scale(1.03);
}
.goal-card.selected {
    border-color: var(--color-teal);
}
.goal-card-icon {
    width: 32px;
    height: 32px;
    stroke: var(--color-teal);
    flex-shrink: 0;
}
.goal-card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.mentor-selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
}
.mentor-card {
    background: var(--color-charcoal-light);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.mentor-card:hover {
    transform: scale(1.05);
}
.mentor-card.selected {
    border-color: var(--color-teal);
    box-shadow: 0 0 15px rgba(95, 195, 178, 0.3);
}
.mentor-card .mentor-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--color-teal);
    margin: 0 auto 1rem auto;
    display: grid;
    place-items: center;
}
.mentor-card .mentor-avatar svg {
    width: 32px;
    height: 32px;
    stroke: var(--color-charcoal);
}
.mentor-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.mentor-specialty {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Mentor Confirmation Card */
.mentor-confirmation-card {
    background: var(--color-charcoal-light);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    width: 100%;
    max-width: 300px;
}
.mentor-confirmation-card .mentor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    display: grid;
    place-items: center;
}
.mentor-confirmation-card .mentor-avatar svg {
    width: 40px;
    height: 40px;
    stroke: var(--color-charcoal);
}
.mentor-confirmation-card .mentor-name {
    font-size: 1.5rem;
}
.mentor-confirmation-card .mentor-specialty {
    color: var(--color-text-muted);
}

.final-step-phase {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.final-step-phase.active {
    display: flex;
}
.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid var(--color-charcoal-light);
    border-top-color: var(--color-teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.checkmark-icon {
    width: 80px;
    height: 80px;
    stroke: var(--color-teal);
}

/* --- Media Queries for Responsiveness --- */
@media (min-width: 551px) {
    .onboarding-container {
        max-width: 550px;
        padding: 2rem; /* Restore desktop padding */
    }
}

@media (max-width: 768px) {
    .progress-container {
        top: 1.5rem;
        left: 1.5rem;
        right: 1.5rem;
    }

    .step-container {
        margin-top: 5rem; /* Increased margin to give space for progress bar */
    }

    .subheadline {
        font-size: 1rem;
    }

    .mentor-selection-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .mentor-card {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        text-align: left;
    }
    
    .mentor-avatar {
        width: 50px;
        height: 50px;
        margin: 0;
    }
    .mentor-avatar svg {
        width: 24px;
        height: 24px;
    }
}
