/* ==========================================================================
   TUTOR LAB - ROLE CHOICE PAGE
   ========================================================================== */

:root {
    --tl-brand-blue: #0d2e57;
    --tl-brand-yellow: #fec10d;
    --tl-text-dark: #0f172a;
    --tl-text-soft: #94a3b8;
    --tl-text-light: #e2e8f0;
    --tl-bg-page: #f0f2f5;
    --tl-bg-card-light: #ffffff;
    --tl-border-light: #e2e8f0;
    --tl-radius-md: 12px;
    --tl-radius-lg: 24px;
    --tl-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tutor-lab-role-choice-page {
    padding: 40px 20px;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--tl-bg-page);
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.role-choice-container {
    width: 100%;
    max-width: 900px;
    text-align: center;
    margin: 0 auto;
}

.role-choice-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.role-choice-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.role-choice-logo-fallback {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 800;
    color: var(--tl-brand-blue);
}

.role-choice-logo-fallback i {
    color: var(--tl-brand-yellow);
    font-size: 32px;
}

.role-choice-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--tl-text-dark);
    margin: 0 0 10px 0;
    letter-spacing: -1.5px;
}

.role-choice-header p {
    font-size: 1.1rem;
    color: var(--tl-text-soft);
    margin: 0 auto 50px;
    max-width: 550px;
}

.role-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.role-card {
    background: var(--tl-bg-card-light);
    border-radius: var(--tl-radius-lg);
    padding: 40px 30px;
    border: 2px solid var(--tl-border-light);
    transition: var(--tl-transition);
    cursor: pointer;
}

.role-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0, 46, 91, 0.15);
}

.student-card:hover {
    border-color: #4338ca;
}

.teacher-card:hover {
    border-color: var(--tl-brand-yellow);
}

.role-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    transition: var(--tl-transition);
}

.student-card .role-icon {
    background: linear-gradient(135deg, #eef2ff, #ddd6fe);
    color: #4338ca;
}

.teacher-card .role-icon {
    background: linear-gradient(135deg, #fef3c7, #fde047);
    color: var(--tl-brand-blue);
}

.role-card:hover .role-icon {
    transform: scale(1.1) rotate(5deg);
}

.role-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--tl-text-dark);
    margin: 0 0 10px;
}

.role-card p {
    font-size: 1rem;
    color: var(--tl-text-soft);
    margin: 0 0 25px;
    line-height: 1.6;
}

.role-btn {
    width: 100%;
    padding: 16px 24px;
    border-radius: var(--tl-radius-md);
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--tl-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.role-btn:hover {
    transform: translateY(-3px);
}

.student-btn {
    background: #4338ca;
    color: white;
}

.student-btn:hover {
    background: #3730a3;
}

.teacher-btn {
    background: var(--tl-brand-yellow);
    color: var(--tl-brand-blue);
}

.teacher-btn:hover {
    background: #ffcf40;
}

.login-link-container {
    margin-top: 30px;
    margin-bottom: 20px;
}

.login-link-container p {
    color: var(--tl-text-soft);
    font-size: 1rem;
}

.login-link {
    color: var(--tl-brand-blue);
    font-weight: 600;
    text-decoration: none;
}

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

.back-to-site-link {
    color: var(--tl-text-soft);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.back-to-site-link:hover {
    color: var(--tl-text-dark);
}

/* ==========================================================================
   INVITE MODE STYLES
   ========================================================================== */

.invite-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.invite-badge i {
    font-size: 1.1rem;
}

.role-cards-container.single-card {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto 40px;
}

.role-card.invited {
    border: 2px solid #22c55e;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.role-card.invited .role-icon {
    background: linear-gradient(135deg, #d1fae5, #bbf7d0);
    color: #15803d;
}

.role-card.invited .role-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.role-card.invited .role-btn:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

/* ==========================================================================
   TEACHER REQUEST MODAL
   ========================================================================== */

.teacher-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.teacher-modal.is-visible {
    opacity: 1;
    pointer-events: all;
}

.teacher-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.teacher-modal-content {
    position: relative;
    background: white;
    border-radius: var(--tl-radius-lg);
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.teacher-modal.is-visible .teacher-modal-content {
    transform: scale(1);
}

.teacher-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--tl-text-soft);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--tl-transition);
}

.teacher-modal-close:hover {
    background: var(--tl-bg-page);
    color: var(--tl-text-dark);
}

.teacher-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.teacher-form-logo {
    max-width: 150px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

.teacher-form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--tl-text-dark);
    margin: 0 0 10px;
}

.teacher-form-header p {
    font-size: 1rem;
    color: var(--tl-text-soft);
    margin: 0;
}

/* Google Sign In */
.google-signin-container {
    margin-bottom: 30px;
}

.google-signin-btn {
    width: 100%;
    padding: 14px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: var(--tl-radius-md);
    font-size: 1rem;
    font-weight: 600;
    color: var(--tl-text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--tl-transition);
}

.google-signin-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.google-signin-btn.google-signed-in {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
    cursor: default;
    transform: none;
}

.google-signin-btn.google-signed-in:hover {
    background: #f0fdf4;
    border-color: #86efac;
    transform: none;
}

.divider-text {
    text-align: center;
    margin: 20px 0;
    color: var(--tl-text-soft);
    font-size: 0.9rem;
    position: relative;
}

.divider-text::before,
.divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--tl-border-light);
}

.divider-text::before {
    left: 0;
}

.divider-text::after {
    right: 0;
}

/* Form Styles */
.teacher-request-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.teacher-request-form .form-field {
    text-align: left;
    margin-bottom: 20px;
}

.teacher-request-form .form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--tl-text-dark);
    font-size: 0.95rem;
}

.teacher-request-form .form-field input {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border: 2px solid var(--tl-border-light);
    border-radius: var(--tl-radius-md);
    background: white;
    color: var(--tl-text-dark);
    transition: var(--tl-transition);
}

.teacher-request-form .form-field input:focus {
    border-color: var(--tl-brand-yellow);
    outline: none;
    box-shadow: 0 0 0 4px rgba(254, 193, 13, 0.1);
}

.teacher-request-form .privacy-field {
    margin-top: 10px;
}

.privacy-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.privacy-label input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
    flex-shrink: 0;
}

.privacy-label span {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--tl-text-soft);
}

.privacy-label a {
    color: var(--tl-brand-blue);
    font-weight: 600;
}

.teacher-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 14px 24px;
    border-radius: var(--tl-radius-md);
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--tl-transition);
}

.btn-primary {
    background: var(--tl-brand-yellow);
    color: var(--tl-brand-blue);
}

.btn-primary:hover {
    background: #ffcf40;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--tl-bg-page);
    color: var(--tl-text-dark);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Success Feedback */
.teacher-form-feedback {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 5rem;
    color: #22c55e;
    margin-bottom: 20px;
}

.teacher-form-feedback h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--tl-text-dark);
    margin: 0 0 15px;
}

.teacher-form-feedback p {
    font-size: 1rem;
    color: var(--tl-text-soft);
    margin: 0 0 30px;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tutor-lab-role-choice-page {
        padding: 30px 15px;
    }

    .role-choice-logo {
        max-width: 150px;
        margin-bottom: 20px;
    }

    .role-choice-header h1 {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .role-choice-header p {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .role-cards-container {
        gap: 20px;
        grid-template-columns: 1fr;
    }

    .role-card {
        padding: 30px 25px;
    }

    .role-icon {
        width: 70px;
        height: 70px;
        font-size: 35px;
    }

    .teacher-modal-content {
        padding: 30px 20px;
        width: 95%;
    }

    .teacher-request-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

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

    .teacher-form-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .role-card h3 {
        font-size: 1.5rem;
    }

    .role-card p {
        font-size: 0.95rem;
    }

    .role-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
}
