/* Supabase Authentication Styles */

/* Authentication Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #667eea;
    background-color: #f8f9fa;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

/* Authentication Sections */
.auth-section {
    display: none;
}

.auth-section.active {
    display: block;
}

.auth-form h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.auth-links {
    margin-top: 1rem;
    text-align: center;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Phone Authentication Links - More Prominent */
.auth-links-phone {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.auth-links-phone .phone-auth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.auth-links-phone .phone-auth-link:hover {
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-links-phone .phone-auth-link i {
    font-size: 1rem;
}

/* Divider between email and phone auth */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0 1rem 0;
    color: #6c757d;
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.auth-divider span {
    padding: 0 1rem;
    background: white;
    font-weight: 500;
}

/* Supabase Form Styles */
.supabase-form-group {
    position: relative;
    margin-bottom: 1.5rem;
    text-align: left;
}

.supabase-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.supabase-form-group input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.supabase-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.supabase-form-group i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 0.9rem;
}

/* Supabase Button Styles */
.supabase-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.supabase-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.supabase-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.supabase-btn i {
    font-size: 0.9rem;
}

/* Supabase Error/Success Messages */
.supabase-error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 1rem;
    min-height: 1.2rem;
    text-align: center;
}

.supabase-success-message {
    color: #27ae60;
    font-size: 0.9rem;
    margin-top: 1rem;
    min-height: 1.2rem;
    text-align: center;
}

/* Supabase Form Validation */
.supabase-form-group input:invalid {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.supabase-form-group input:valid {
    border-color: #28a745;
    background-color: #d4edda;
}

/* Supabase Loading States */
.supabase-loading {
    opacity: 0.7;
    pointer-events: none;
}

.supabase-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Supabase Responsive Design */
@media (max-width: 768px) {
    .auth-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: none;
        border-right: 2px solid transparent;
        text-align: center;
    }
    
    .tab-btn.active {
        border-bottom: none;
        border-right-color: #667eea;
    }
    
    .auth-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .auth-links a {
        margin: 0;
        display: block;
    }
    
    .auth-links-phone .phone-auth-link {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.25rem;
    }
    
    .auth-divider {
        margin: 1.25rem 0 0.875rem 0;
    }
}

/* Supabase Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auth-form h3 {
        color: #f8f9fa;
    }
    
    .supabase-form-group label {
        color: #f8f9fa;
    }
    
    .supabase-form-group input {
        background-color: #343a40;
        border-color: #495057;
        color: #f8f9fa;
    }
    
    .supabase-form-group input:focus {
        border-color: #667eea;
        background-color: #495057;
    }
    
    .supabase-form-group i {
        color: #adb5bd;
    }
    
    .tab-btn {
        color: #adb5bd;
    }
    
    .tab-btn:hover {
        background-color: #495057;
    }
    
    .tab-btn.active {
        color: #667eea;
    }
}
