/* Header styles — extracted from header.blade.php inline <style> */
/* All header layout, components, and responsive rules live here.  */

/* ---- Row layout ---- */
.header-top-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    align-content: space-around;
    position: relative;
    min-height: 2.5rem;
    gap: 0.75rem;
    padding: 0 0.5rem;
}

.header-top-left,
.header-top-right {
    flex: 1 1 0;
    min-width: 0;
}

.header-top-left {
    text-align: left;
}

.header-top-right {
    text-align: right;
}

.header-top-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    max-width: min(60vw, 42rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-nav-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: center;
    align-content: space-around;
    font-size: 100%;
    margin-top: 0.5vh;
    padding-top: 0.5vh;
    margin-bottom: 0.5vh;
    border-top: 1px solid rgb(190, 220, 235);
}

/* ---- Dropdown containers ---- */
.header-dropdown-container {
    position: relative;
    display: inline-block;
}

.header-popup-menu {
    position: fixed;
    z-index: 1000;
    display: none;
    background: #fff;
    border: 1px solid #bcd;
    padding: 6px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-height: min(70vh, 32rem);
    overflow: auto;
}

.header-user-menu-popup {
    min-width: 28em;
    max-width: min(92vw, 38em);
}

.header-contacts-menu-popup {
    min-width: 24em;
    max-width: min(92vw, 36em);
}

.header-popup-menu-classic {
    background-color: rgb(220, 235, 240);
    border-style: outset;
    border-color: rgb(210, 235, 245);
    border-width: 2px;
    border-radius: 7px;
}

.header-user-trigger {
    display: inline-block;
    vertical-align: middle;
}

.header-language-trigger {
    vertical-align: middle;
}

.header-language-menu-popup {
    min-width: 3.2em;
}

.header-language-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-language-item {
    margin: 0.2em 0;
}

/* ---- Version / release badge ---- */
.header-release-badge {
    display: inline-block;
    padding: 0.05em 0.35em;
    border-radius: 0.25em;
    font-weight: 700;
}

.header-dev-release-badge {
    background: #fff3a5;
    border: 1px solid #c6a900;
    color: #4f4300;
}

.header-debug-dot {
    display: inline-block;
    width: 0.55em;
    height: 0.55em;
    border-radius: 50%;
    background: #cc1f1a;
    vertical-align: middle;
    margin-right: 0.35em;
}

/* ---- Hamburger button (hidden on desktop) ---- */
.header-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    flex-shrink: 0;
    line-height: 0;
}

.header-hamburger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: rgb(80, 110, 130);
    margin: 4px 0;
    border-radius: 2px;
}

/* ---- Responsive: ≤ 500px — hamburger + vertical nav ---- */
@media (max-width: 500px) {
    .header-top-row {
        padding-right: 0.2rem;
    }

    .header-top-center {
        position: static;
        transform: none;
        flex: 1 1 auto;
        text-align: center;
        max-width: none;
    }

    .header-hamburger {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .header-sponsor {
        display: none;
    }

    .header-nav-row {
        display: none;
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 0.6em;
    }

    .header-nav-row.is-open {
        display: flex;
    }

    .header-nav-row > div,
    .header-nav-row > .header-dropdown-container {
        padding: 0.3em 0;
    }
}

/* ---- Responsive: ≤ 300px — hide app title ---- */
@media (max-width: 300px) {
    .header-title-text {
        display: none;
    }
}
