/* ============================= */
/* Auth Dropdown & Modal Styles  */
/* ============================= */

/* User Icon Button in Header */
.user-auth-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 50%;
    transition: background 0.3s, color 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-auth-btn:hover {
    background: var(--primary-light);
    color: var(--secondary-color);
}

.user-auth-btn .user-initial {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
}

/* Auth Dropdown Container */
.auth-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 320px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 0;
    z-index: 9999;
    display: none;
    overflow: hidden;
    animation: authDropIn 0.25s ease;
}

.auth-dropdown.show {
    display: block;
}

@keyframes authDropIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Auth Dropdown Header */
.auth-dropdown-header {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--section-alt) 100%);
    padding: 20px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.auth-dropdown-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.auth-dropdown-header p {
    margin: 5px 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Auth Form Styles */
.auth-form-body {
    padding: 24px;
}

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

.auth-form-body label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-medium);
    margin-bottom: 6px;
}

.auth-form-body input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: var(--bg-main);
}

.auth-form-body input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.auth-form-body .btn-auth-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Poppins', sans-serif;
}

.auth-form-body .btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,213,30,0.35);
}

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

/* Auth message / error */
.auth-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 14px;
    display: none;
}

.auth-message.error {
    background: #FFF0F0;
    color: #D32F2F;
    border: 1px solid #FFCDD2;
    display: block;
}

.auth-message.success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
    display: block;
}

/* Toggle link (Login ↔ Sign Up) */
.auth-toggle {
    text-align: center;
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-main);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-toggle a {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.auth-toggle a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Logged-in Profile Dropdown */
.profile-dropdown-body {
    padding: 20px 24px;
}

.profile-info {
    text-align: center;
    margin-bottom: 20px;
}

.profile-info .profile-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 auto 12px;
}

.profile-info .profile-email {
    font-size: 0.85rem;
    color: var(--text-medium);
    word-break: break-all;
}

.profile-info .profile-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-actions .btn-profile-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-dark);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.profile-actions .btn-profile-action:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.profile-actions .btn-profile-action i {
    font-size: 18px;
    color: var(--secondary-color);
}

.btn-logout {
    color: #D32F2F !important;
    border-color: #FFCDD2 !important;
}

.btn-logout:hover {
    background: #FFF0F0 !important;
}

.btn-logout i {
    color: #D32F2F !important;
}

/* Login suggestion on booking page */
.login-suggestion {
    background: var(--primary-light);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.login-suggestion i {
    color: var(--secondary-color);
    font-size: 24px;
}

.login-suggestion a {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
}

.login-suggestion a:hover {
    text-decoration: underline;
}

.logged-in-badge {
    background: #E8F5E9;
    border: 1px solid #C8E6C9;
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #2E7D32;
}

.logged-in-badge i {
    font-size: 20px;
}

/* Auth wrapper positioning in header */
.auth-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-dropdown {
        min-width: 280px;
        right: -20px;
    }
}

@media (max-width: 480px) {
    .auth-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        min-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }
}
