/* FullMoon MMO - Gothic Sidebar Navigation
 * Bloodmoon-inspired vertical menu buttons for landscape HUD.
 * Replaces the flat mobile navbar with ornate gothic buttons.
 */

/* =====================================================
   LANDSCAPE SIDEBAR — Gothic Buttons
   ===================================================== */
@media (min-width: 768px) {
    body.hud-layout-landscape .navbar {
        top: 56px;
        left: 14px;
        bottom: 56px;
        width: 220px;
        max-width: none;
        height: auto;
        padding: 12px 8px;
        border-right: 2px solid #3d2f35;
        border-top: 0;
        flex-direction: column;
        justify-content: flex-start;
        gap: 0;
        background:
            linear-gradient(180deg,
                rgba(18,12,16,0.97) 0%,
                rgba(12,8,10,0.98) 100%);
        backdrop-filter: blur(8px);
        box-shadow:
            inset -1px 0 0 rgba(212,175,55,0.08),
            4px 0 30px rgba(0,0,0,0.6);
        transform: none;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: thin;
        scrollbar-color: rgba(212,175,55,0.2) transparent;
    }

    /* Webkit scrollbar for the sidebar */
    body.hud-layout-landscape .navbar::-webkit-scrollbar {
        width: 5px;
    }
    body.hud-layout-landscape .navbar::-webkit-scrollbar-track {
        background: transparent;
    }
    body.hud-layout-landscape .navbar::-webkit-scrollbar-thumb {
        background: rgba(212,175,55,0.2);
        border-radius: 3px;
    }
    body.hud-layout-landscape .navbar::-webkit-scrollbar-thumb:hover {
        background: rgba(212,175,55,0.35);
    }

    body.hud-layout-landscape .navbar::before {
        content: '';
        position: absolute;
        top: 0;
        right: -1px;
        bottom: 0;
        width: 1px;
        height: 100%;
        background: linear-gradient(180deg, transparent, rgba(212,175,55,0.15) 30%, rgba(212,175,55,0.15) 70%, transparent);
        opacity: 0.5;
    }

    /* --- Sidebar resource counters --- */
    body.hud-layout-landscape .navbar .sidebar-resources {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 0 4px 10px;
        margin-bottom: 6px;
        border-bottom: 1px solid rgba(212,175,55,0.1);
    }

    body.hud-layout-landscape .navbar .sidebar-resource {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        font-weight: 700;
        color: #c8b898;
    }

    body.hud-layout-landscape .navbar .sidebar-resource__icon {
        width: 16px;
        text-align: center;
    }

    body.hud-layout-landscape .navbar .sidebar-resource--gold {
        color: #d4af37;
    }

    body.hud-layout-landscape .navbar .sidebar-resource--blood {
        color: #c83030;
    }

    /* --- Separator line between nav groups --- */
    body.hud-layout-landscape .navbar__separator {
        display: block;
        height: 1px;
        margin: 8px 4px;
        background: linear-gradient(90deg, transparent, rgba(212,175,55,0.15), transparent);
        border: none;
    }

    /* --- Gothic Navigation Buttons --- */
    body.hud-layout-landscape .navbar__item {
        width: 100%;
        min-height: 0;
        max-height: none;
        height: auto;
        flex: 0 0 auto;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        padding: 9px 12px;
        border-radius: 4px;
        border: 1px solid rgba(80,60,70,0.4);
        background:
            linear-gradient(180deg,
                rgba(45,32,38,0.7) 0%,
                rgba(28,18,24,0.8) 100%);
        color: rgba(200,180,160,0.85);
        text-decoration: none;
        transition: all 180ms ease;
        position: relative;
        overflow: hidden;
        margin-bottom: 2px;
    }

    /* Inner metallic sheen */
    body.hud-layout-landscape .navbar__item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.06) 50%, transparent 90%);
    }

    /* Hover state */
    body.hud-layout-landscape .navbar__item:hover {
        background:
            linear-gradient(180deg,
                rgba(60,42,50,0.8) 0%,
                rgba(38,25,32,0.9) 100%);
        border-color: rgba(212,175,55,0.25);
        color: #e0d0c0;
        box-shadow: 0 0 12px rgba(212,175,55,0.1);
    }

    /* Active state */
    body.hud-layout-landscape .navbar__item--active {
        background:
            linear-gradient(180deg,
                rgba(80,50,55,0.85) 0%,
                rgba(50,28,35,0.9) 100%);
        border-color: rgba(212,175,55,0.4);
        color: #d4af37;
        box-shadow:
            0 0 14px rgba(212,175,55,0.15),
            inset 0 0 8px rgba(212,175,55,0.06);
    }

    body.hud-layout-landscape .navbar__item--active::after {
        content: '';
        position: absolute;
        left: 0;
        top: 15%;
        bottom: 15%;
        width: 3px;
        background: linear-gradient(180deg, transparent, #d4af37, transparent);
        border-radius: 0 2px 2px 0;
    }

    body.hud-layout-landscape .navbar__item--active::before {
        background: linear-gradient(90deg, transparent 5%, rgba(212,175,55,0.12) 50%, transparent 95%);
    }

    /* Ready pulse (activity complete) */
    body.hud-layout-landscape .navbar__item--ready {
        border-color: rgba(255,231,155,0.5);
        color: #ffe79b;
        box-shadow:
            0 0 18px rgba(255,231,155,0.2),
            inset 0 0 8px rgba(255,231,155,0.06);
        animation: sidebarReadyPulse 1.6s ease-in-out infinite;
    }

    /* Icon styling */
    body.hud-layout-landscape .navbar__icon {
        font-size: 1.15rem;
        width: 22px;
        text-align: center;
        flex-shrink: 0;
        transform: none;
    }

    body.hud-layout-landscape .navbar__item--active .navbar__icon {
        transform: none;
        text-shadow: 0 0 6px rgba(212,175,55,0.4);
    }

    /* Label styling */
    body.hud-layout-landscape .navbar__label {
        font-family: var(--font-family-display, 'Cinzel', serif);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Badge */
    body.hud-layout-landscape .navbar__badge {
        position: absolute;
        top: 4px;
        right: 6px;
        left: auto;
        min-width: 16px;
        height: 16px;
    }

    /* ==================================================
       SUBNAVBAR — Gothic style horizontal tabs at bottom
       ================================================== */
    body.hud-layout-landscape .subnavbar {
        left: calc(14px + 220px);
        right: 14px;
        bottom: 56px;
        max-width: none;
        width: auto;
        transform: none;
        border-top: 2px solid #3d2f35;
        background:
            linear-gradient(0deg,
                rgba(18,12,16,0.97) 0%,
                rgba(12,8,10,0.95) 100%);
        box-shadow:
            inset 0 1px 0 rgba(212,175,55,0.08),
            0 -4px 20px rgba(0,0,0,0.5);
    }

    body.hud-layout-landscape .subnavbar::before {
        content: '';
        position: absolute;
        top: -1px;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(212,175,55,0.15), transparent);
        opacity: 0.5;
    }

    body.hud-layout-landscape .subnavbar__item {
        background:
            linear-gradient(180deg,
                rgba(45,32,38,0.5) 0%,
                rgba(28,18,24,0.6) 100%);
        border: 1px solid rgba(80,60,70,0.3);
        border-radius: 4px;
        font-family: var(--font-family-display, 'Cinzel', serif);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: rgba(200,180,160,0.7);
        transition: all 180ms ease;
    }

    body.hud-layout-landscape .subnavbar__item:hover {
        background:
            linear-gradient(180deg,
                rgba(60,42,50,0.6) 0%,
                rgba(38,25,32,0.7) 100%);
        border-color: rgba(212,175,55,0.2);
        color: #e0d0c0;
    }

    body.hud-layout-landscape .subnavbar__item--active {
        background:
            linear-gradient(180deg,
                rgba(80,50,55,0.7) 0%,
                rgba(50,28,35,0.8) 100%);
        border-color: rgba(212,175,55,0.4);
        color: #d4af37;
        box-shadow: 0 0 10px rgba(212,175,55,0.12);
    }

    body.hud-layout-landscape .subnavbar__item--ready {
        border-color: rgba(255,231,155,0.5);
        color: #ffe79b;
        box-shadow: 0 0 14px rgba(255,231,155,0.18);
        animation: sidebarReadyPulse 1.6s ease-in-out infinite;
    }

    @keyframes sidebarReadyPulse {
        0%, 100% { filter: brightness(1); }
        50% { filter: brightness(1.15); }
    }
}
