/* ============================================
   HEADER MENU
   ============================================ */

.header-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-menu-group {
    position: relative;
}

/* ============================================
   PRZYCISKI — styl chipów
   ============================================ */

.header-menu-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 10px 0 12px;
    border: 2px solid var(--color-light-gray);
    border-radius: 8px;
    background: var(--color-white);
    font-family: var(--font-condensed);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.header-menu-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.header-menu-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #999999;
    transition: transform 0.3s ease, color 0.3s ease;
}

.header-menu-btn[aria-expanded="true"] .header-menu-chevron {
    transform: rotate(180deg);
}

.header-menu-btn:hover:not(.is-active):not(.header-menu-btn--guest),
.header-menu-btn[aria-expanded="true"]:not(.is-active) {
    border-color: var(--color-primary);
}

.header-menu-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.header-menu-btn.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    font-weight: 700;
}

.header-menu-btn.is-active .header-menu-chevron {
    color: var(--color-white);
}

.header-menu-btn--guest {
    opacity: 0.45;
}

/* ============================================
   DROPDOWN — styl dropdownów filtrów
   ============================================ */

.header-menu-dropdown {
    position: fixed;
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--color-light-gray) #f5f5f5;
}

.header-menu-dropdown[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-menu-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    box-sizing: border-box;
    background: var(--color-white);
    border-bottom: 1px solid #f0f0f0;
    font-family: var(--font-condensed);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-secondary);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease;
}

.header-menu-option:last-child {
    border-bottom: none;
}

.header-menu-option:hover:not(.is-current) {
    background: #f8f8f8;
}

.header-menu-option-name {
    flex: 1;
}

.header-menu-option-count {
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: 10px;
    background: #f0f0f0;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    color: #999999;
}

.header-menu-option.is-current {
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 700;
}

.header-menu-option.is-current .header-menu-option-count {
    background: var(--color-primary-dark);
    color: var(--color-white);
}

/* ============================================
   DYMEK GOŚCIA — zawsze pod przyciskiem
   ============================================ */

.header-menu-hint {
    position: fixed;
    z-index: 10000;
    width: 400px;
    max-width: 95%;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--color-secondary);
    color: var(--color-white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.header-menu-hint.is-visible {
    opacity: 1;
    visibility: visible;
}

.header-menu-hint__arrow {
    position: absolute;
    top: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--color-secondary);
}

.header-menu-hint__text {
    margin: 0 0 12px 0;
    font-family: var(--font-condensed);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-white);
}

.header-menu-hint__actions {
    display: flex;
    gap: 8px;
}

.header-menu-hint__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 8px 16px;
    overflow: hidden;
    border: 2px solid var(--color-primary);
    border-radius: 6px;
    background: transparent;
    font-family: var(--font-condensed);
    font-size: 13px;
    font-weight: 700;
    color: var(--color-white);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.header-menu-hint__btn span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-menu-hint__btn:first-child {
    flex-shrink: 0;
}

.header-menu-hint__btn:last-child {
    flex: 1;
    min-width: 0;
}

.header-menu-hint__btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .header-menu-label {
        display: none;
    }
}

/* Logo z trójkątem zajmuje ok. 218px; reszta szerokości musi pomieścić same ikony */
@media (max-width: 519px) {
    .header-menu {
        gap: 6px;
    }

    .header-menu-btn {
        justify-content: center;
        width: 36px;
        padding: 0;
    }

    .header-menu-chevron {
        display: none;
    }
}