/**
 * MadBot - Menu Dropdown Styles
 * Profile menu button and dropdown
 */

/* ==========================================================================
   MENU BUTTON (Oval ⋮)
   ========================================================================== */

#profileMenuBtn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-color, rgba(255,255,255,0.05));
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    color: var(--text-muted, #9ca3af);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 1000;
    line-height: 1;
}

#profileMenuBtn:hover {
    background: var(--card-hover, rgba(255,255,255,0.1));
}

.light-mode #profileMenuBtn {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #64748B;
}

.light-mode #profileMenuBtn:hover {
    background: #F1F5F9;
}

/* User initial - brand color for logged-in users */
#profileMenuBtn.user-initial {
    color: var(--primary-color, #6366F1);
    font-weight: 600;
}

.light-mode #profileMenuBtn.user-initial {
    color: var(--primary-color, #6366F1);
}

/* ==========================================================================
   DROPDOWN MENU
   ========================================================================== */

#profileMenu {
    display: none;
    position: fixed;
    top: 58px;
    right: 20px;
    background: var(--surface-color, #1a1a24);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 12px;
    padding: 4px;
    min-width: 200px;
    box-shadow: 0 8px 24px var(--shadow-color, rgba(0,0,0,0.5));
    z-index: 1001;
}

#profileMenu.show {
    display: block;
}

/* Menu Items */
#profileMenu button,
#profileMenu a.menu-custom-link,
#profileMenu span.menu-item-current {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-color, #f3f4f6);
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    transition: background 0.2s;
    text-decoration: none;
    font-family: inherit;
    box-sizing: border-box;
}

/* SVG icons in menu */
#profileMenu button > svg,
#profileMenu a.menu-custom-link > svg,
#profileMenu span.menu-item-current > svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-right: 10px;
}

/* Current page item (disabled state) */
#profileMenu span.menu-item-current {
    cursor: default;
    opacity: 0.5;
}

#profileMenu button:hover,
#profileMenu a.menu-custom-link:hover {
    background: var(--card-hover, rgba(255,255,255,0.1));
}

/* Menu Separator */
.menu-separator {
    height: 2px;
    min-height: 2px;
    max-height: 2px;
    background: rgba(255,255,255,0.1);
    margin: 4px 8px;
    flex-shrink: 0;
    border: none;
    padding: 0;
}

.light-mode .menu-separator {
    background: rgba(0,0,0,0.1);
}

/* ==========================================================================
   LIGHT MODE
   ========================================================================== */

.light-mode #profileMenu {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.light-mode #profileMenu button,
.light-mode #profileMenu a.menu-custom-link,
.light-mode #profileMenu span.menu-item-current {
    color: #1E293B;
}

.light-mode #profileMenu button:hover,
.light-mode #profileMenu a.menu-custom-link:hover {
    background: #F1F5F9;
}

/* ==========================================================================
   THEME TOGGLE IN MENU
   ========================================================================== */

/* Show the mode you'll switch TO */
.theme-menu-light,
.theme-menu-dark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.theme-menu-dark {
    display: none;
}

.light-mode .theme-menu-light {
    display: none;
}

.light-mode .theme-menu-dark {
    display: inline-flex;
}

