/* TavernWall v6.3.35 Clean Dropdown Top Navigation */

.nav-clean {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-clean > a,
.nav-clean > .notification-menu > .notification-toggle,
.nav-dropdown > summary {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    white-space: nowrap;
}

.nav-clean b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    min-height: 20px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 999px;
    background: rgba(255,217,85,.18);
    color: #ffd955;
    border: 1px solid rgba(255,217,85,.25);
    font-size: 12px;
    line-height: 1;
}

.nav-dropdown {
    position: relative;
    z-index: 30;
}

.nav-dropdown > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    padding: 9px 14px;
    border: 1px solid rgba(255,217,85,.25);
    color: #ffd955;
    background:
        linear-gradient(180deg, rgba(111,76,42,.95), rgba(62,38,22,.95));
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.nav-dropdown > summary::-webkit-details-marker {
    display: none;
}

.nav-dropdown > summary::after {
    content: "▾";
    margin-left: 7px;
    font-size: 11px;
    opacity: .85;
}

.nav-dropdown[open] > summary,
.nav-dropdown > summary:hover {
    border-color: rgba(255,217,85,.55);
    background:
        linear-gradient(180deg, rgba(135,91,49,.98), rgba(72,43,25,.98));
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid rgba(255,217,85,.32);
    border-radius: 16px;
    background:
        radial-gradient(circle at top right, rgba(255,217,85,.10), transparent 36%),
        rgba(29,16,10,.98);
    box-shadow: 0 18px 40px rgba(0,0,0,.38);
    z-index: 1000;
}

.nav-dropdown-panel a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 11px;
    color: #e8d9b4;
    text-decoration: none;
    border: 1px solid transparent;
    font-weight: 800;
}

.nav-dropdown-panel a:hover {
    border-color: rgba(255,217,85,.35);
    background: rgba(255,217,85,.08);
    color: #ffd955;
}

.nav-admin-dropdown > summary {
    border-color: rgba(255,157,85,.35);
}

.nav-profile-dropdown > summary {
    border-color: rgba(255,217,85,.42);
}

.nav-clean .notification-menu {
    position: relative;
}

.nav-clean .notification-dropdown {
    z-index: 1100;
}

/* Keep the brand from being squeezed too hard */
.topbar {
    gap: 14px;
}

.topbar .brand {
    flex: 0 0 auto;
}

.topbar .nav-clean {
    flex: 1 1 auto;
}

/* Medium screens: keep daily links, let dropdowns wrap neatly */
@media (max-width: 1120px) {
    .nav-clean {
        justify-content: flex-start;
        width: 100%;
        padding-top: 8px;
    }

    .topbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

/* Small screens: dropdown panels become full-width and easier to tap */
@media (max-width: 720px) {
    .nav-clean {
        gap: 6px;
    }

    .nav-clean > a,
    .nav-clean > .notification-menu > .notification-toggle,
    .nav-dropdown > summary {
        min-height: 36px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .nav-dropdown {
        position: static;
    }

    .nav-dropdown-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 74px;
        min-width: 0;
        max-height: calc(100vh - 96px);
        overflow: auto;
    }

    .nav-dropdown-panel a {
        min-height: 42px;
        font-size: 14px;
    }
}

/* Very small screens: make the public nav more compact */
@media (max-width: 480px) {
    .nav-clean .nav-primary {
        flex: 1 1 calc(50% - 6px);
    }

    .nav-dropdown {
        flex: 1 1 calc(50% - 6px);
    }

    .nav-dropdown > summary {
        width: 100%;
    }
}
