/* Authentication Pages Styles */

/* Ensure consistent font family with main site */
.auth-card,
.auth-card * {
    font-family: 'Arial', sans-serif;
}

.auth-main {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 1rem;
}

.auth-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    border: 1px solid #e1e5e9;
}

.auth-card h2 {
    color: #2c5aa0;
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    font-weight: 500;
    font-family: 'Arial', sans-serif;
}

.auth-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-family: 'Arial', sans-serif;
}

.register-notice {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-family: 'Arial', sans-serif;
}

.register-notice a {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Arial', sans-serif;
}

.register-notice a:hover {
    text-decoration: underline;
}

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

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

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
    font-family: 'Arial', sans-serif;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.phone-input-group {
    display: flex;
    gap: 0.5rem;
}

.phone-input-group select {
    flex: 0 0 140px;
}

.phone-input-group input {
    flex: 1;
}

.verification-group {
    display: flex;
    gap: 0.5rem;
}

.verification-group input {
    flex: 1;
}

.send-code-btn {
    background: #2c5aa0;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Arial', sans-serif;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.send-code-btn:hover:not(:disabled) {
    background: #1a365d;
}

.send-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.code-timer {
    color: #666;
    font-size: 0.85rem;
    font-family: 'Arial', sans-serif;
    margin-top: 0.3rem;
}

.form-help {
    color: #666;
    font-size: 0.85rem;
    font-family: 'Arial', sans-serif;
    margin-top: 0.3rem;
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    font-family: 'Arial', sans-serif;
    margin-top: 0.3rem;
    padding: 0.5rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 3px;
}

.success-message {
    color: #155724;
    font-size: 0.85rem;
    font-family: 'Arial', sans-serif;
    margin-top: 0.3rem;
    padding: 0.5rem;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 3px;
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Arial', sans-serif;
    line-height: 1.4;
}

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

.checkbox-label a {
    color: #2c5aa0;
    text-decoration: none;
    font-family: 'Arial', sans-serif;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.auth-submit-btn {
    background: linear-gradient(135deg, #2c5aa0, #1a365d);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Arial', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.auth-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1a365d, #2c5aa0);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.3);
}

.auth-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e1e5e9;
}

.auth-links a {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Arial', sans-serif;
}

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

.forgot-password {
    color: #666;
    font-size: 0.9rem;
    font-family: 'Arial', sans-serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .phone-input-group {
        flex-direction: column;
    }
    
    .phone-input-group select {
        flex: none;
    }
    
    .verification-group {
        flex-direction: column;
    }
    
    .send-code-btn {
        width: 100%;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Validation States */
.form-group.error input,
.form-group.error select {
    border-color: #dc3545;
}

.form-group.success input,
.form-group.success select {
    border-color: #28a745;
}

.form-group.error input:focus,
.form-group.error select:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group.success input:focus,
.form-group.success select:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}
