/* Authentication UI Styles for Pro Coach Studio - Dark Mode Optimized */

/* Root variables for consistent theming */
:root {
    --auth-text-color: #e2e8f0;
    --auth-text-muted: #94a3b8;
    --auth-bg-primary: #1e293b;
    --auth-bg-secondary: #334155;
    --auth-border-color: #475569;
    --auth-accent-color: #3b82f6;
    --auth-accent-hover: #2563eb;
    --auth-success-bg: #064e3b;
    --auth-success-border: #047857;
    --auth-success-text: #10b981;
    --auth-error-bg: #7f1d1d;
    --auth-error-border: #dc2626;
    --auth-error-text: #f87171;
    --auth-warning-bg: #78350f;
    --auth-warning-border: #d97706;
    --auth-warning-text: #fbbf24;
}

/* Email verification prompt */
.email-verification-prompt {
    position: relative;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--auth-warning-bg);
    border: 1px solid var(--auth-warning-border);
    color: var(--auth-warning-text);
}

.email-verification-prompt .alert-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.email-verification-prompt .alert-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.email-verification-prompt .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease;
}

.email-verification-prompt .btn-outline-primary {
    color: var(--auth-accent-color);
    border-color: var(--auth-accent-color);
    background: transparent;
}

.email-verification-prompt .btn-outline-primary:hover {
    background-color: var(--auth-accent-color);
    color: white;
}

.email-verification-prompt .btn-outline-secondary {
    color: var(--auth-text-muted);
    border-color: var(--auth-border-color);
    background: transparent;
}

.email-verification-prompt .btn-outline-secondary:hover {
    background-color: var(--auth-bg-secondary);
    color: var(--auth-text-color);
}

/* User info display */
.user-profile {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    background-color: var(--auth-bg-secondary);
    border-radius: 4px;
    border: 1px solid var(--auth-border-color);
}

.user-email {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-text-color);
}

.user-name {
    font-size: 0.875rem;
    color: var(--auth-text-muted);
}

.email-unverified {
    font-size: 0.75rem;
    color: var(--auth-error-text);
    font-weight: 500;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 10000;
    max-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.toast-success {
    background-color: var(--auth-success-bg);
    border: 1px solid var(--auth-success-border);
    color: var(--auth-success-text);
}

.toast-error {
    background-color: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    color: var(--auth-error-text);
}

.toast-info {
    background-color: var(--auth-bg-secondary);
    border: 1px solid var(--auth-border-color);
    color: var(--auth-text-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Auth-required content styling */
[data-auth-required] {
    transition: opacity 0.3s ease;
}

[data-guest-only] {
    transition: opacity 0.3s ease;
}

/* Loading states */
.auth-loading {
    opacity: 0.6;
    pointer-events: none;
}

.auth-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--auth-bg-secondary);
    border-top: 2px solid var(--auth-accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced form styling for dark mode */
.auth-form {
    max-width: 650px; /* Increased from 520px */
    margin: 0 auto;
    padding: 2rem;
    background: var(--auth-bg-primary);
    border-radius: 12px;
    border: 1px solid var(--auth-border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--auth-text-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.auth-form .form-control {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--auth-border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--auth-bg-secondary);
    color: var(--auth-text-color);
    transition: all 0.2s ease;
}

.auth-form .form-control::placeholder {
    color: var(--auth-text-muted);
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--auth-accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: var(--auth-bg-primary);
}

.auth-form .form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--auth-text-muted);
}

.auth-form .checkbox-group {
    margin: 1.5rem 0;
    text-align: center;
}

.auth-form .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--auth-text-muted);
    line-height: 1.5;
    text-align: left;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

.auth-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    margin-top: 0.1rem;
    accent-color: var(--auth-accent-color);
    cursor: pointer;
}

.auth-form .auth-link {
    color: var(--auth-accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-form .auth-link:hover {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

.auth-button {
    width: 100%;
    padding: 0.875rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-button.primary {
    background: linear-gradient(135deg, var(--auth-accent-color) 0%, var(--auth-accent-hover) 100%);
    color: white;
}

.auth-button.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--auth-accent-hover) 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.auth-button:disabled {
    background-color: var(--auth-bg-secondary);
    color: var(--auth-text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Message styles */
.auth-messages {
    margin-bottom: 1.5rem;
}

.success-message {
    background-color: var(--auth-success-bg);
    color: var(--auth-success-text);
    border: 1px solid var(--auth-success-border);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.error-message {
    background-color: var(--auth-error-bg);
    color: var(--auth-error-text);
    border: 1px solid var(--auth-error-border);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.info-message {
    background-color: var(--auth-bg-secondary);
    color: var(--auth-text-color);
    border: 1px solid var(--auth-border-color);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.auth-link-button {
    background: none;
    border: none;
    color: var(--auth-accent-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
    margin: 0;
}

.auth-link-button:hover {
    color: var(--auth-accent-hover);
}

.resend-verification-btn {
    background: var(--auth-warning-bg);
    color: var(--auth-warning-text);
    border: 1px solid var(--auth-warning-border);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.resend-verification-btn:hover {
    background: var(--auth-warning-border);
    transform: translateY(-1px);
}

.resend-verification-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .email-verification-prompt {
        margin: 0.5rem;
        padding: 0.75rem;
    }
    
    .email-verification-prompt .alert-actions {
        flex-direction: column;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .auth-form {
        margin: 0 1rem;
        padding: 1.5rem;
        max-width: 100%;
    }
}

/* Enhanced responsive design for better form handling on larger screens */
@media (min-width: 769px) {
    .auth-form {
        max-width: 650px;
        padding: 2.5rem;
    }
    
    .auth-form .form-control {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .auth-form .checkbox-label {
        max-width: 450px;
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    .auth-form {
        max-width: 700px;
        padding: 3rem;
    }
    
    .auth-form .form-control {
        padding: 1.1rem;
    }
}

/* Email Verification Page Specific Styles */
.verification-info {
    text-align: center;
    margin-bottom: 2rem;
}

.email-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--auth-bg-secondary);
    border: 1px solid var(--auth-border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.email-display i {
    color: var(--auth-accent-color);
    font-size: 1.1rem;
}

.verification-message {
    color: var(--auth-text-muted);
    line-height: 1.6;
}

.resend-cooldown {
    text-align: center;
    margin-top: 1rem;
}

.resend-cooldown i {
    margin-right: 0.25rem;
}

/* Enhanced alert styles for verification page */
.alert {
    border-radius: 8px;
    border: 1px solid;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--auth-text-color);
}

.alert-success {
    background-color: var(--auth-success-bg);
    border-color: var(--auth-success-border);
    color: var(--auth-success-text);
}

.alert-danger {
    background-color: var(--auth-error-bg);
    border-color: var(--auth-error-border);
    color: var(--auth-error-text);
}

.alert ul {
    margin: 0.5rem 0 0 1rem;
    padding-left: 0;
}

.alert li {
    margin-bottom: 0.25rem;
}

/* Button enhancements for verification page */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn i {
    margin-right: 0.5rem;
}
