/* Authentication Pages Styles */

/* Test Notice Banner - shared with main site */
.test-notice {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #ffffff;
    z-index: 1001;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease-out;
}

.test-notice-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.test-notice-content i {
    font-size: 1rem;
}

.test-notice-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 16px;
}

.test-notice-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.test-notice.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-section {
    min-height: 100vh;
    padding: 148px 0 40px; /* Increased top padding for test notice */
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    display: flex;
    align-items: center;
}

.auth-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 600px;
}

.auth-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Account Type Selector */
.account-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
    padding: 4px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.type-option {
    padding: 16px 12px;
    border-radius: calc(var(--border-radius) - 4px);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-weight: 500;
}

.type-option i {
    font-size: 1.5rem;
}

.type-option.active {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

.type-option:hover:not(.active) {
    color: var(--text-dark);
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Password Field */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--gray-300);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: #f56565;
}

.strength-fill.fair {
    width: 50%;
    background: #ed8936;
}

.strength-fill.good {
    width: 75%;
    background: #38b2ac;
}

.strength-fill.strong {
    width: 100%;
    background: #48bb78;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-dark);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: bold;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

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

/* Buttons */
.btn-full {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

/* Social Login */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 30px 0;
    color: var(--text-light);
    font-size: 0.875rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
    z-index: 1;
}

.auth-divider span {
    background: var(--white);
    padding: 0 16px;
    position: relative;
    z-index: 2;
}

.social-login {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.btn-social {
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    background: var(--white);
    color: var(--text-dark);
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-google:hover {
    border-color: #db4437;
    color: #db4437;
}

.btn-facebook:hover {
    border-color: #3b5998;
    color: #3b5998;
}

.btn-linkedin:hover {
    border-color: #0077b5;
    color: #0077b5;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Auth Image Side */
.auth-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border-radius: var(--border-radius);
    color: var(--white);
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.auth-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="1.5" fill="white" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="80" r="1.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="1" fill="white" opacity="0.1"/></svg>');
    background-size: 200px 200px;
    animation: float 20s ease-in-out infinite;
}

.image-content {
    text-align: center;
    padding: 40px;
    position: relative;
    z-index: 2;
}

.image-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.image-content p {
    font-size: 1.125rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.9;
}

.feature-item i {
    font-size: 1.25rem;
    width: 20px;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Teacher Fields Animation */
.teacher-fields {
    transition: all 0.3s ease;
    overflow: hidden;
}

.teacher-fields.show {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .auth-image {
        order: -1;
        min-height: 300px;
    }
    
    .image-content {
        padding: 30px;
    }
    
    .image-content h2 {
        font-size: 1.5rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .auth-section {
        padding: 80px 0 20px;
    }
    
    .auth-content {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
    
    .account-type-selector {
        grid-template-columns: 1fr;
    }
    
    .type-option {
        flex-direction: row;
        justify-content: center;
    }
    
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 0 16px;
    }
    
    .auth-content {
        padding: 24px 16px;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .image-content {
        padding: 20px;
    }
    
    .image-content h2 {
        font-size: 1.25rem;
    }
    
    .image-content p {
        font-size: 1rem;
    }
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: var(--white);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Form Validation */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #f56565;
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

.form-group.success input,
.form-group.success select,
.form-group.success textarea {
    border-color: #48bb78;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

.error-message {
    color: #f56565;
    font-size: 0.75rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.error-message i {
    font-size: 0.75rem;
}