/* ============================================
   PREMIUM AUTH PAGES STYLES
   Dark Theme with Glassmorphism
   ============================================ */

/* CSS Variables - Same as premium-home.css */
:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #0f1422;
    --bg-tertiary: #151b2e;
    --bg-glass: rgba(15, 20, 34, 0.7);
    --bg-glass-hover: rgba(15, 20, 34, 0.85);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --accent-primary: #2196f3;
    --accent-secondary: #0d47a1;
    --accent-gradient: linear-gradient(135deg, #1a237e 0%, #0d47a1 50%, #2196f3 100%);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --font-heading: 'The Year of Handicrafts', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'The Year of Handicrafts', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Premium Theme Body */
.premium-theme,
body.premium-theme {
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Auth Page Background with Gradient Orbs */
.premium-theme .auth-page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.premium-theme .auth-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.premium-theme .auth-gradient-orb.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #1a237e 0%, transparent 70%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.premium-theme .auth-gradient-orb.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #0d47a1 0%, transparent 70%);
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

.premium-theme .auth-gradient-orb.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #2196f3 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Auth Card Styles */
.premium-theme .auth-card {
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.premium-theme .auth-card:hover {
    box-shadow: 0 12px 40px rgba(33, 150, 243, 0.2);
    transform: translateY(-2px);
}

.premium-theme .auth-card .card-header {
    background: var(--accent-gradient);
    border: none;
    padding: 2rem;
    text-align: center;
}

.premium-theme .auth-card .card-header h2,
.premium-theme .auth-card .card-header h4 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0;
}

.premium-theme .auth-card .card-body {
    padding: 2.5rem;
    background: transparent;
}

/* Form Styles */
.premium-theme .form-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-family: var(--font-body);
}

.premium-theme .form-control,
.premium-theme .form-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.premium-theme .form-control:focus,
.premium-theme .form-select:focus,
.premium-theme .form-select:active,
.premium-theme .form-select:focus-visible {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent-primary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25) !important;
    outline: none !important;
}

/* Windows dropdown fix for premium theme - ensure options are dark */
.premium-theme .form-select option {
    background-color: #1e1e2e !important;
    color: var(--text-primary) !important;
    padding: 0.5rem !important;
}

.premium-theme select.form-select option:hover,
.premium-theme select.form-select option:focus,
.premium-theme select.form-select option:checked {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

/* Prevent white background override on Windows when dropdown is clicked */
.premium-theme .form-select {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
}

.premium-theme .form-select:focus,
.premium-theme .form-select:active,
.premium-theme .form-select[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
}

.premium-theme .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Input Group - Unified Field */
.premium-theme .input-group {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.premium-theme .input-group:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

.premium-theme .input-group-text {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
}

.premium-theme .input-group .form-control {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
}

.premium-theme .input-group .form-control:focus {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* RTL Support for Input Groups */
[dir="rtl"] .premium-theme .input-group {
    flex-direction: row-reverse;
}

[dir="rtl"] .premium-theme .input-group .form-control {
    border: none;
}

[dir="rtl"] .premium-theme .input-group-text {
    border: none;
}

/* Password visibility toggle inside auth input groups */
.premium-theme .input-group .password-toggle-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 0;
    font-weight: 400;
    line-height: 1.5;
    box-shadow: none;
    cursor: pointer;
}

.premium-theme .input-group .password-toggle-btn:hover,
.premium-theme .input-group .password-toggle-btn:focus,
.premium-theme .input-group .password-toggle-btn:active {
    color: var(--accent-primary);
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.premium-theme .input-group .password-toggle-btn:focus:not(:focus-visible) {
    outline: none;
}

.premium-theme .input-group .password-toggle-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}

/* Buttons */
.premium-theme .btn-primary {
    background: var(--accent-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.4);
}

.premium-theme .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(33, 150, 243, 0.6);
    color: white;
}

.premium-theme .btn-outline-primary {
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    background: transparent;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.premium-theme .btn-outline-primary:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.premium-theme .btn-outline-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: transparent;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.premium-theme .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* Alerts */
.premium-theme .alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
}

.premium-theme .alert-success {
    background: rgba(40, 167, 69, 0.2);
    color: #90ee90;
    border-left: 4px solid #28a745;
}

[dir="rtl"] .premium-theme .alert-success {
    border-left: none;
    border-right: 4px solid #28a745;
}

.premium-theme .alert-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b7a;
    border-left: 4px solid #dc3545;
}

[dir="rtl"] .premium-theme .alert-danger {
    border-left: none;
    border-right: 4px solid #dc3545;
}

.premium-theme .alert-info {
    background: rgba(23, 162, 184, 0.2);
    color: #7dd3fc;
    border-left: 4px solid #17a2b8;
}

[dir="rtl"] .premium-theme .alert-info {
    border-left: none;
    border-right: 4px solid #17a2b8;
}

/* Links */
.premium-theme a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.premium-theme a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.premium-theme .text-decoration-none:hover {
    text-decoration: none !important;
}

/* Text Visibility Improvements */
.premium-theme .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.premium-theme p {
    color: var(--text-primary);
}

.premium-theme .card-body p {
    color: var(--text-primary);
}

.premium-theme small {
    color: rgba(255, 255, 255, 0.7);
}

.premium-theme .text-center p {
    color: var(--text-primary);
}

/* OTP Input Styles */
.premium-theme .otp-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 12px !important;
}

.premium-theme .otp-input:focus {
    border-color: var(--accent-primary) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25) !important;
}

.premium-theme .otp-input.filled {
    border-color: #28a745 !important;
    background: rgba(40, 167, 69, 0.2) !important;
}

.premium-theme .otp-input.error {
    border-color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.2) !important;
}

/* Verification Result Page */
.premium-theme .verification-container {
    background: var(--bg-primary);
    min-height: 100vh;
}

.premium-theme .verification-card {
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.premium-theme .verification-icon {
    color: var(--accent-primary);
}

.premium-theme .verification-icon.success {
    color: #28a745;
}

.premium-theme .verification-icon.error {
    color: #dc3545;
}

.premium-theme .verification-icon.info {
    color: #17a2b8;
}

.premium-theme .verification-title {
    color: var(--text-primary);
}

.premium-theme .verification-message {
    color: var(--text-secondary);
}

/* Password Strength Container */
.premium-theme .password-strength-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.premium-theme .password-strength-label {
    color: var(--text-secondary);
}

.premium-theme .requirement-text {
    color: var(--text-secondary);
}

.premium-theme .requirement-text.text-success {
    color: #28a745 !important;
}

/* Form Check */
.premium-theme .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
}

.premium-theme .form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.premium-theme .form-check-label {
    color: #ffffff !important;
}

.premium-theme label[for="remember-me"] {
    color: #ffffff !important;
}

[dir="rtl"] .premium-theme .form-check-label {
    color: #ffffff !important;
}

[dir="rtl"] .premium-theme label[for="remember-me"] {
    color: #ffffff !important;
}

/* Responsive */
@media (max-width: 768px) {
    .premium-theme .auth-card .card-body {
        padding: 1.5rem;
    }
    
    .premium-theme .auth-card .card-header {
        padding: 1.5rem;
    }
}
