/* ==========================================================================
   macOS Top Menu Bar & Dropdown Menus
   ========================================================================== */

.menu-bar {
    height: 28px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    font-size: 13px;
    z-index: 9000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 1px 0 rgba(255,255,255,0.1);
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

/* In Fullscreen mode: Auto-hide top menu bar, float down on hover / top edge cursor */
body.has-fullscreen-app .menu-bar,
body:has(.window.is-maximized:not(.hidden):not(.minimized)) .menu-bar {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    z-index: 99999;
}

body.has-fullscreen-app .menu-bar.is-revealed,
body.has-fullscreen-app .menu-bar:hover,
body:has(.window.is-maximized:not(.hidden):not(.minimized)) .menu-bar.is-revealed,
body:has(.window.is-maximized:not(.hidden):not(.minimized)) .menu-bar:hover {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.menu-left, .menu-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-item {
    cursor: default;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #eee;
    transition: background 0.15s;
}

.menu-item:hover, .menu-dropdown-container.active .menu-item {
    background: rgba(255, 255, 255, 0.2);
}

.menu-item.bold {
    font-weight: 700;
}

.apple-icon {
    font-size: 16px;
    cursor: pointer;
}

.apple-title {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 2px 5px;
}

.apple-title svg {
    display: block;
    width: 16px;
    height: 18px;
    fill: currentColor;
}

.menu-icon {
    position: relative;
    cursor: default;
}

.menu-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 2100;
    border: 1px solid rgba(255,255,255,0.1);
}

.menu-icon:hover::after {
    opacity: 1;
}

.menu-time {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    cursor: default;
}

/* Menu Dropdowns */
.menu-dropdown-container {
    position: relative;
    display: inline-block;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: rgba(36, 36, 36, 0.9);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 5px;
    min-width: 200px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.15);
    z-index: 2000;
}

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

.dropdown-item {
    padding: 6px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    color: #eee;
    display: flex;
    align-items: center;
    transition: background 0.12s;
}

.dropdown-item:hover {
    background: var(--accent);
    color: white;
}

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

/* ── Dynamic per-app menus ──────────────────────────────────────────────── */

.menubar-app-menus {
    display: flex;
    align-items: center;
    gap: 15px;
}

.app-name-item {
    cursor: default;
    padding: 2px 8px;
}

/* The app name is a label, not a menu — it shouldn't offer a hover target. */
.app-name-item:hover {
    background: transparent;
}

.menu-shortcut {
    margin-left: auto;
    padding-left: 26px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 12px;
    letter-spacing: 0.4px;
}

.dropdown-item {
    display: flex;
    align-items: center;
}

.dropdown-item.disabled {
    color: rgba(255, 255, 255, 0.3);
    cursor: default;
}

.dropdown-item.disabled:hover {
    background: transparent;
}

.dropdown-item.is-static:hover {
    background: transparent;
}

.profile-item img {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

.siri-menu-icon {
    transition: transform 0.15s ease, filter 0.15s ease;
}

.siri-menu-icon:hover {
    transform: scale(1.12);
    filter: drop-shadow(0 0 6px rgba(175, 82, 222, 0.7));
}
