/* ============================================================================
   av-header-menu.css — Modulo CSS estratto da av.html
   AIVEK Vision — Generato automaticamente
   ============================================================================ */

/* ========================================
   HEADER EXPANDABLE MENU (Mobile)
   ======================================== */
.header-menu-expanded {
    display: none;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-top: 0;
    margin-top: 0;
    border-top: none;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                padding-top 0.3s ease,
                margin-top 0.3s ease;
}

.chat-header.menu-open .header-menu-expanded {
    max-height: 400px;
    opacity: 1;
    padding-top: 16px;
    margin-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive: Workspaces in portrait via header hamburger,
   in Studio Lite landscape via + menu (hide from hamburger) */
@media (max-width: 896px) and (orientation: landscape) {
    .header-menu-item.ws-entry {
        display: none !important;
    }
}

.header-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.header-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.header-menu-item:hover,
.header-menu-item:active {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.02);
}

.header-menu-item i {
    font-size: 18px;
    opacity: 0.95;
}

.header-menu-item span {
    line-height: 1.2;
}

/* Header top row - keeps logo and button aligned */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Header right actions container */
.header-right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* User menu button & dropdown */
.user-menu-wrapper {
    position: relative;
}
.user-menu-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #e8eaed;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}
.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}
.user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    padding: 6px 0;
    animation: userMenuIn 0.15s ease-out;
}
.user-menu-dropdown.open {
    display: block;
}
@keyframes userMenuIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.user-menu-header {
    padding: 10px 16px 8px;
    font-size: 12px;
    color: #9aa0a6;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
}
.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: #e8eaed;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    text-align: left;
}
.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}
.user-menu-item i {
    width: 16px;
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
}
.user-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}
.user-menu-logout {
    color: #f87171;
}
.user-menu-logout:hover {
    background: rgba(248, 113, 113, 0.1);
}

/* Menu button rotation when open */
.chat-header.menu-open .menu-button i {
    transform: rotate(90deg);
}
.menu-button i {
    transition: transform 0.3s ease;
}

.chat-header::before {
    z-index: 0;
}
.chat-header .header-top-row,
.chat-header .header-menu-expanded {
    position: relative;
    z-index: 1;
}

/* Mobile: show expanded menu, hide dropdown */
@media (max-width: 768px) {
    /* Match header height to footer when closed */
    .chat-header {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 20px !important;
        border-radius: 50px !important;
        transition: box-shadow 0.3s ease, padding 0.3s ease, border-radius 0.3s ease !important;
    }
    
    /* Keep pseudo-element border-radius consistent */
    .chat-header::before {
        border-radius: inherit !important;
    }
    
    /* Smaller logo on mobile to match footer height */
    .chat-header .main-logo {
        font-size: 1.1rem;
    }
    
    /* Smaller menu button to match */
    .chat-header .menu-button {
        width: 38px;
        height: 38px;
    }
    
    .header-menu-expanded {
        display: block;
    }
    
    /* Hide the old dropdown on mobile for av.html */
    #menuDropdown {
        display: none !important;
    }
    
    .chat-header.menu-open {
        padding-bottom: 16px;
    }
    
    /* Welcome modal responsive padding */
    .welcome-modal .modal-content {
        padding-bottom: 24px;
    }
    .welcome-actions {
        padding: 20px 20px 25px 20px;
    }
    .premium-section {
        padding-bottom: 30px;
    }
}

/* Desktop: hide expanded menu, use dropdown */
@media (min-width: 769px) {
    .header-menu-expanded {
        display: none !important;
    }
}

