/* Navbar shell Worix — tipografía e iconos locales (sin CDN) */

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-300.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-700.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

#header.header.navbar,
#header.header.navbar > .container-fluid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: var(--navbar-height, 60px) !important;
    min-height: var(--navbar-height, 60px) !important;
    box-sizing: border-box !important;
}

#header.header.navbar::before,
#header.header.navbar::after,
#header.header.navbar > .container-fluid::before,
#header.header.navbar > .container-fluid::after,
#header.header.navbar .navbar-header::before,
#header.header.navbar .navbar-header::after {
    display: none !important;
    content: none !important;
}

#header.header.navbar .navbar-header {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: auto !important;
    height: 100% !important;
    margin: 0 !important;
    overflow: hidden;
}

.shell-navbar-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 0 auto !important;
    gap: 0.35rem;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    list-style: none;
}

.shell-navbar-actions > li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shell-navbar-user {
    position: relative;
}

/* Chip usuario: fila única, sin doble círculo ni bordes pesados */
.shell-navbar-user__trigger {
    -webkit-appearance: none;
    appearance: none;
    display: inline-grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.55rem;
    box-sizing: border-box;
    min-height: 2.25rem;
    max-width: 100%;
    margin: 0;
    padding: 0.3rem 0.65rem 0.3rem 0.3rem;
    border: 0;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.shell-navbar-user__trigger:hover,
.shell-navbar-user__trigger:focus {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(195, 161, 105, 0.45);
    outline: none;
    color: #fff;
}

.shell-navbar-user__avatar {
    display: grid;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    margin: 0;
    padding: 0;
    border-radius: 0.55rem;
    background: linear-gradient(145deg, rgba(195, 161, 105, 0.35), rgba(195, 161, 105, 0.12));
    color: #e8d39a;
    line-height: 0;
}

.shell-navbar-user__avatar svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    margin: 0 auto;
}

.shell-navbar-user__name {
    min-width: 0;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "Montserrat", "DM Sans", system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: inherit;
}

.shell-navbar-user__caret {
    display: grid;
    place-items: center;
    width: 0.85rem;
    height: 0.85rem;
    margin: 0;
    padding: 0;
    color: rgba(241, 245, 249, 0.45);
    line-height: 0;
    transition: color 0.18s ease, transform 0.18s ease;
}

.shell-navbar-user__trigger:hover .shell-navbar-user__caret,
.shell-navbar-user__trigger:focus .shell-navbar-user__caret,
.shell-navbar-user.open .shell-navbar-user__caret,
.shell-navbar-user.show .shell-navbar-user__caret {
    color: rgba(232, 211, 154, 0.9);
}

.shell-navbar-user__caret svg {
    width: 0.85rem;
    height: 0.85rem;
    display: block;
}

.shell-navbar-logout {
    -webkit-appearance: none;
    appearance: none;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(241, 245, 249, 0.72);
    font: inherit;
    line-height: 0;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.shell-navbar-logout:hover,
.shell-navbar-logout:focus {
    background: rgba(239, 68, 68, 0.16);
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.35);
    color: #fecaca;
    outline: none;
}

.shell-navbar-logout svg {
    width: 1.05rem;
    height: 1.05rem;
    display: block;
}

.shell-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
    overflow: hidden;
    text-decoration: none !important;
}

.shell-brand-link .brandText {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "Montserrat", "DM Sans", system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
}

/* Menú propio: no usa el dropdown de Bootstrap. */
.shell-user-menu[hidden] {
    display: none !important;
}

.shell-navbar-user > .shell-user-menu {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 1100;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
    box-sizing: border-box;
    width: min(32rem, calc(100vw - 1rem));
    max-height: min(72vh, 32rem);
    margin: 0;
    padding: 0.6rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    list-style: none;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 0.9rem;
    background: rgba(20, 23, 29, 0.98);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(14px);
    font-family: "Montserrat", "DM Sans", system-ui, sans-serif;
}

.shell-navbar-user > .shell-user-menu.is-open {
    display: grid;
}

.shell-navbar-user__trigger[aria-expanded="true"] {
    background: rgba(195, 161, 105, 0.12);
    box-shadow: inset 0 0 0 1px rgba(195, 161, 105, 0.5);
}

.shell-navbar-user__trigger[aria-expanded="true"] .shell-navbar-user__caret {
    color: #e8d39a;
    transform: rotate(180deg);
}

.shell-user-menu__item {
    position: static;
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
    cursor: pointer;
}

.shell-user-menu__item > a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    box-sizing: border-box;
    width: 100%;
    min-height: 2.65rem;
    margin: 0;
    padding: 0.6rem 0.75rem !important;
    border: 0 !important;
    border-radius: 0.65rem !important;
    background: rgba(255, 255, 255, 0.035) !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #dce2ea !important;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none !important;
    white-space: normal !important;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.shell-user-menu__item > a::after {
    content: "›";
    flex: 0 0 auto;
    color: rgba(195, 161, 105, 0.55);
    font-size: 1.05rem;
    line-height: 1;
}

.shell-user-menu__item:hover > a,
.shell-user-menu__item:focus-within > a {
    background: rgba(195, 161, 105, 0.14) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.shell-user-menu__item:active > a {
    transform: translateY(0);
}

@media (max-width: 767px) {
    #header.header.navbar > .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        gap: 0.4rem !important;
    }

    .shell-brand-link .brandText {
        font-size: 0.85rem;
    }

    .shell-navbar-user__trigger {
        column-gap: 0.4rem;
        padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    }

    .shell-navbar-user__name {
        max-width: 6.2rem;
        font-size: 0.72rem;
    }

    .shell-navbar-actions {
        gap: 0.25rem;
    }

    .shell-navbar-user > .shell-user-menu {
        position: fixed;
        top: calc(var(--navbar-height, 60px) + 0.45rem);
        right: 0.5rem;
        left: 0.5rem;
        grid-template-columns: 1fr;
        width: auto;
        max-height: calc(100dvh - var(--navbar-height, 60px) - 1rem);
        padding: 0.55rem 0.55rem max(0.65rem, env(safe-area-inset-bottom));
    }

    .shell-user-menu__item > a {
        min-height: 3rem;
        padding: 0.7rem 0.85rem !important;
        font-size: 0.88rem;
    }
}

@media (max-width: 420px) {
    .shell-navbar-user__name {
        max-width: 4.6rem;
    }
}
