/* =========================================
   Account Switcher Styles
   ========================================= */

/* User Icon in Navbar */
.user-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    /* Fallback for var(--primary-gradient) */
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-left: 1rem;
}

.user-icon-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Account Modal */
.account-modal {
    position: fixed;
    top: 80px;
    right: 5%;
    width: 320px;
    background: rgba(15, 23, 42, 0.9);
    /* Fallback */
    background: var(--glass-bg, rgba(15, 23, 42, 0.9));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.2, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 1200px) {
    .account-modal {
        right: calc((100vw - 1140px) / 2 + 20px);
    }
}

.account-modal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Modal Header (Current User) */
.account-modal-header {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.current-avatar {
    width: 70px;
    height: 70px;
    background: var(--primary-gradient);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    text-transform: uppercase;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.account-modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.account-modal-header p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0.3rem 0;
    font-size: 0.85rem;
}

.manage-account-link {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s;
}

.manage-account-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Other Accounts List */
.account-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.account-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
    gap: 1rem;
    text-decoration: none;
}

.account-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.account-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
}

.account-item-info {
    flex: 1;
    overflow: hidden;
}

.account-item-name {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-item-email {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* Modal Actions */
.account-actions {
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.account-action-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.8rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    background: none;
    border: none;
    cursor: pointer;
    gap: 1rem;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
}

.account-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.account-action-btn i {
    width: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.account-action-btn:hover i {
    color: white;
}

/* Modal Overlay (Background Click) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: transparent;
    display: none;
}

.modal-overlay.active {
    display: block;
}