/* ========================================================================== 
   AUTHENTICATION UI STYLES
   Auth modal, user dropdown, and related components
   ========================================================================== */

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal.hidden {
    display: none;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.auth-modal-content {
    position: relative;
    z-index: 1;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    transition: color 0.2s;
}

.auth-modal-close:hover {
    color: rgba(255, 255, 255, 1);
}

.auth-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
}

.auth-modal-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 24px 0;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    color: #ff6b6b;
    font-size: 13px;
}

.auth-error.hidden {
    display: none;
}

.auth-input-group {
    margin-bottom: 16px;
}

.auth-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.auth-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-input:focus {
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.auth-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.auth-btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

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

.auth-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    position: relative;
    background: rgba(31, 41, 55, 0.95);
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    text-transform: uppercase;
}

.auth-btn-google {
    width: 100%;
    background: white;
    color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn-google:hover {
    background: #f8f8f8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 50;
}

.user-dropdown.hidden {
    display: none;
}

.user-dropdown-header {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-dropdown-email {
    font-size: 13px;
    color: white;
    margin: 0 0 4px 0;
    font-weight: 500;
    word-break: break-all;
}

.user-dropdown-plan {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.user-dropdown-item {
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .auth-modal-content {
        padding: 24px;
        max-width: 100%;
    }

    .auth-buttons {
        grid-template-columns: 1fr;
    }

    .user-dropdown {
        left: auto;
        right: 0;
    }
}