/* ==========================
   GLOBAL HEADER SEARCH
   One pill: filter icon (left) — text input — search icon (right). Shown
   inline in the header at desktop widths; hidden below 768px, where the
   burger menu's .panel-search-trigger opens the Filters popup directly
   instead (that popup has its own search field) — see assets/js/header-search.js.
========================== */

.header-search {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    min-width: 0;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(60, 40, 30, 0.08);
    border-radius: 999px;
    padding: 0.35rem 0.35rem 0.35rem 0.4rem;
    box-shadow: 0 6px 18px rgba(60, 40, 30, 0.04);
    transition: outline-color 0.2s ease;
}

.header-search:focus-within {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.header-search input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 0.4rem 0.3rem;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    color: var(--color-text);
}

.header-search input[type="search"]:focus {
    outline: none;
}

.header-search input[type="search"]::placeholder {
    color: var(--color-text-light);
}

.header-search__filter-btn,
.header-search__submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.15rem;
    height: 2.15rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    padding: 0;
}

.header-search__filter-btn {
    position: relative;
    background: transparent;
    color: var(--color-text);
}

.header-search__filter-btn:hover {
    background: rgba(251, 146, 60, 0.14);
    color: var(--color-accent);
}

.header-search__submit-btn {
    background: var(--color-primary);
    color: var(--color-bg);
}

.header-search__submit-btn:hover {
    background: var(--color-hover);
}

.header-search__filter-count {
    position: absolute;
    top: -0.15rem;
    right: -0.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-bg);
    font-size: 0.65rem;
    font-weight: 700;
}

/* ==========================
   SEARCH BAR WRAPPER
   Just a centering flex slot at desktop widths — the mobile-hide lives here
   too rather than on .header-search directly, so anything else dropped into
   this slot later inherits the same responsive behavior for free.
========================== */

.search-popup {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
}

@media (max-width: 768px) {
    .search-popup {
        display: none;
    }
}

/* ==========================
   BURGER-PANEL-ONLY CONTROLS
   .panel-search-trigger and .mobile-meta duplicate what's already shown
   inline at desktop (search bar, location/time) — only needed once the
   burger panel folds those away below 768px.
========================== */

/* Solid/primary, not the light bordered pill the search input itself uses —
   deliberately so this reads as a button that opens something, not as
   another text field. */
.panel-search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    align-self: stretch;
    padding: 0.7rem 0.9rem;
    border: none;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-bg);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.panel-search-trigger:hover {
    background: var(--color-hover);
}

@media (min-width: 769px) {
    .panel-search-trigger,
    .mobile-meta {
        display: none;
    }
}
