/**
 * Enhanced Authentication Forms Styling
 * Modern, clean design for login and signup pages with Bootstrap 5
 */

/* ============================================
 Base Auth Page Styling
 ============================================ */
body.auth-page {
 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
 min-height: 100vh;
 display: flex;
 align-items: center;
 padding: 2rem 0;
 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Multi-tenant background gradients */
body.auth-page.dnaromance {
 background: linear-gradient(135deg, #0F75BD 0%, #F72C93 50%, #0F75BD 100%);
}

body.auth-page.datemetrix {
 background: linear-gradient(135deg, #673AB7 0%, #9C27B0 100%);
}

body.auth-page.genepool {
 background: linear-gradient(135deg, #00897B 0%, #00BFA5 100%);
}

body.auth-page.wellmatched {
 background: linear-gradient(135deg, #1976D2 0%, #42A5F5 100%);
}

body.auth-page.generecovery {
 background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
}

body.auth-page.heritablehealth {
 background: linear-gradient(135deg, #0288D1 0%, #03A9F4 100%);
}

/* Site-specific button colors */
body.auth-page.dnaromance .auth-form .btn-primary {
 background: linear-gradient(135deg, #0F75BD 0%, #1E88E5 100%);
}

body.auth-page.datemetrix .auth-form .btn-primary {
 background: linear-gradient(135deg, #673AB7 0%, #7B1FA2 100%);
}

body.auth-page.genepool .auth-form .btn-primary {
 background: linear-gradient(135deg, #00897B 0%, #00ACC1 100%);
}

body.auth-page.wellmatched .auth-form .btn-primary {
 background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
}

/* Site-specific link colors */
body.auth-page.dnaromance .auth-link {
 color: #0F75BD;
}

body.auth-page.datemetrix .auth-link {
 color: #673AB7;
}

body.auth-page.genepool .auth-link {
 color: #00897B;
}

body.auth-page.wellmatched .auth-link {
 color: #1976D2;
}

/* ============================================
 Card Container Styling
 ============================================ */
.auth-card {
 background: rgba(255, 255, 255, 0.95);
 backdrop-filter: blur(10px);
 border: none;
 border-radius: 1.5rem;
 box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
 overflow: hidden;
 transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
 transform: translateY(-5px);
 box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.auth-card .card-body {
 padding: 3rem;
}

@media (max-width: 576px) {
 .auth-card .card-body {
 padding: 2rem 1.5rem;
 }
}

/* ============================================
 Logo and Title Styling
 ============================================ */
.auth-logo {
 display: inline-block;
 margin-bottom: 2rem;
 transition: transform 0.3s ease;
}

.auth-logo:hover {
 transform: scale(1.05);
}

.auth-logo img {
 height: 60px;
 width: auto;
}

.auth-title {
 font-size: 2rem;
 font-weight: 700;
 color: #2c3e50;
 margin-bottom: 0.5rem;
 letter-spacing: -0.5px;
}

.auth-subtitle {
 font-size: 1.1rem;
 color: #7f8c8d;
 margin-bottom: 2rem;
}

/* ============================================
 Form Field Styling
 ============================================ */
.auth-form .form-label {
 font-weight: 600;
 color: #495057;
 margin-bottom: 0.5rem;
 font-size: 0.95rem;
 text-transform: uppercase;
 letter-spacing: 0.5px;
}

.auth-form .form-control,
.auth-form .form-select {
 border: 2px solid #e1e8ed;
 border-radius: 0.75rem;
 padding: 0.875rem 1.25rem;
 font-size: 1rem;
 transition: all 0.3s ease;
 background-color: #f8f9fa;
}

.auth-form .form-control:focus,
.auth-form .form-select:focus {
 border-color: #667eea;
 background-color: #ffffff;
 box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.auth-form .form-control::placeholder {
 color: #adb5bd;
 font-style: italic;
}

/* Input group styling */
.auth-form .input-group {
 position: relative;
}

.auth-form .input-group-text {
 background-color: #f8f9fa;
 border: 2px solid #e1e8ed;
 border-radius: 0.75rem 0 0 0.75rem;
 color: #667eea;
}

/* ============================================
 Checkbox and Radio Styling
 ============================================ */
.auth-form .form-check {
 padding-left: 2rem;
 margin-bottom: 1rem;
}

.auth-form .form-check-input {
 width: 1.25rem;
 height: 1.25rem;
 margin-top: 0.125rem;
 border: 2px solid #dee2e6;
 cursor: pointer;
}

.auth-form .form-check-input:checked {
 background-color: #667eea;
 border-color: #667eea;
}

.auth-form .form-check-label {
 font-weight: 500;
 color: #495057;
 cursor: pointer;
 user-select: none;
}

/* Sexual preference checkboxes layout */
.sexual-preference-group {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
 gap: 1rem;
 padding: 1rem;
 background-color: #f8f9fa;
 border-radius: 0.75rem;
 margin-bottom: 1.5rem;
}

/* ============================================
 Button Styling
 ============================================ */
.auth-form .btn-primary {
 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
 border: none;
 border-radius: 0.75rem;
 padding: 0.875rem 2rem;
 font-size: 1.125rem;
 font-weight: 600;
 text-transform: uppercase;
 letter-spacing: 0.5px;
 transition: all 0.3s ease;
 position: relative;
 overflow: hidden;
}

.auth-form .btn-primary:hover {
 transform: translateY(-2px);
 box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.auth-form .btn-primary:active {
 transform: translateY(0);
}

/* Social login buttons */
.social-login-btn {
 border: 2px solid #e1e8ed;
 border-radius: 0.75rem;
 padding: 0.875rem 1.5rem;
 font-size: 1rem;
 font-weight: 600;
 transition: all 0.3s ease;
 position: relative;
 overflow: hidden;
 background-color: #ffffff;
}

.social-login-btn:hover {
 border-color: #667eea;
 background-color: #f8f9fa;
 transform: translateY(-2px);
 box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-login-btn img {
 height: 1.5rem;
 width: auto;
 margin-right: 0.75rem;
}

/* ============================================
 Divider Styling
 ============================================ */
.auth-divider {
 position: relative;
 text-align: center;
 margin: 2rem 0;
}

.auth-divider::before {
 content: '';
 position: absolute;
 top: 50%;
 left: 0;
 right: 0;
 height: 1px;
 background-color: #dee2e6;
}

.auth-divider span {
 background-color: white;
 padding: 0 1rem;
 position: relative;
 color: #6c757d;
 font-weight: 500;
}

/* ============================================
 Link Styling
 ============================================ */
.auth-form .auth-link {
 color: #667eea;
 text-decoration: none;
 font-weight: 600;
 transition: all 0.3s ease;
 position: relative;
}

.auth-form .auth-link:hover {
 color: #764ba2;
}

.auth-form .auth-link::after {
 content: '';
 position: absolute;
 bottom: -2px;
 left: 0;
 width: 0;
 height: 2px;
 background-color: #764ba2;
 transition: width 0.3s ease;
}

.auth-form .auth-link:hover::after {
 width: 100%;
}

/* ============================================
 Error and Validation Styling
 ============================================ */
.auth-form .invalid-feedback {
 display: block;
 font-size: 0.875rem;
 margin-top: 0.5rem;
 padding: 0.5rem;
 background-color: #fee;
 border-left: 3px solid #dc3545;
 border-radius: 0.25rem;
}

.auth-form .form-control.is-invalid {
 border-color: #dc3545;
 background-image: none;
}

.auth-form .form-control.is-valid {
 border-color: #28a745;
 background-image: none;
}

/* ============================================
 Password Requirements Styling
 ============================================ */
.password-requirements {
 background-color: #f8f9fa;
 border: 1px solid #dee2e6;
 border-radius: 0.75rem;
 padding: 1rem;
 margin-top: 0.75rem;
 font-size: 0.875rem;
}

.password-requirement {
 color: #6c757d;
 padding: 0.375rem 0;
 display: flex;
 align-items: center;
 transition: color 0.3s ease;
}

.password-requirement::before {
 content: "○";
 margin-right: 0.75rem;
 font-weight: bold;
 font-size: 1.1rem;
 width: 1.25rem;
 text-align: center;
}

.password-requirement.valid {
 color: #28a745;
}

.password-requirement.valid::before {
 content: "✓";
 color: #28a745;
}

.password-requirement.invalid {
 color: #dc3545;
}

.password-requirement.invalid::before {
 content: "✗";
 color: #dc3545;
}

/* ============================================
 Responsive Adjustments
 ============================================ */
@media (max-width: 576px) {
 .auth-title {
 font-size: 1.75rem;
 }
 
 .auth-subtitle {
 font-size: 1rem;
 }
 
 .auth-form .btn-primary {
 font-size: 1rem;
 padding: 0.75rem 1.5rem;
 }
 
 .social-login-btn {
 font-size: 0.9rem;
 padding: 0.75rem 1rem;
 }
 
 .sexual-preference-group {
 grid-template-columns: 1fr;
 }
}

/* ============================================
 Loading State
 ============================================ */
.auth-form .btn-primary.loading {
 color: transparent;
}

.auth-form .btn-primary.loading::after {
 content: '';
 position: absolute;
 width: 1.25rem;
 height: 1.25rem;
 top: 50%;
 left: 50%;
 margin-left: -0.625rem;
 margin-top: -0.625rem;
 border: 2px solid #ffffff;
 border-radius: 50%;
 border-top-color: transparent;
 animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
 to {
 transform: rotate(360deg);
 }
}

/* ============================================
 Footer Links
 ============================================ */
.auth-footer {
 margin-top: 2rem;
 padding-top: 2rem;
 border-top: 1px solid #e1e8ed;
 text-align: center;
}

.auth-footer a {
 color: #6c757d;
 text-decoration: none;
 margin: 0 1rem;
 font-size: 0.9rem;
 transition: color 0.3s ease;
}

.auth-footer a:hover {
 color: #667eea;
}

/* ============================================
 Animation Classes
 ============================================ */
@keyframes fadeInUp {
 from {
 opacity: 0;
 transform: translateY(20px);
 }
 to {
 opacity: 1;
 transform: translateY(0);
 }
}

.auth-card {
 animation: fadeInUp 0.5s ease-out;
}

.auth-form .form-group {
 animation: fadeInUp 0.5s ease-out;
 animation-fill-mode: both;
}

.auth-form .form-group:nth-child(1) { animation-delay: 0.1s; }
.auth-form .form-group:nth-child(2) { animation-delay: 0.2s; }
.auth-form .form-group:nth-child(3) { animation-delay: 0.3s; }
.auth-form .form-group:nth-child(4) { animation-delay: 0.4s; }
.auth-form .form-group:nth-child(5) { animation-delay: 0.5s; }