/*
 * Search widget styling, shared by the landing hero and the listings page.
 * Paired with views/includes/search_widget.php and /js/SearchWidget.js.
 */

/* Small mono labels give the widget its dense, editorial feel */
.mono-label {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.12em;
    color: #94a3b8;
}

/* Compact fields: a micro label sitting above a borderless control */
.hero-field {
    border-radius: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.8);
    padding: 0.375rem 0.75rem 0.5rem;
    min-width: 0;
    transition: border-color 0.2s ease;
}
.hero-field:hover { border-color: #c7d2fe; }
.hero-field:focus-within { border-color: #818cf8; }

.hero-native-select {
    width: 100%;
    margin-top: 0.125rem;
    padding: 0 1.15rem 0 0;
    background: transparent;
    border: 0;
    outline: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
}

/* Strip CustomSelect's boxed chrome so it matches the native fields */
.hero-field .custom-select-wrapper { font-size: 0.875rem; }
.hero-field .cs-trigger {
    min-height: 0;
    padding: 0.125rem 0 0;
    background-color: transparent !important;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
    font-weight: 700;
}
.hero-field .cs-selected-value { font-size: 0.875rem; }
.hero-field .cs-selected-value.is-placeholder { font-weight: 700; color: #0f172a; }
.hero-field .cs-arrow { width: 12px; height: 12px; margin-left: 4px; }
.hero-field .cs-dropdown {
    left: -0.75rem;
    width: calc(100% + 1.5rem);
    min-width: 240px;
    text-align: left;
}

/*
 * On phones the fields are about 187px wide, so a 240px minimum pushed the
 * dropdown past the right edge and gave the whole page a horizontal scroll.
 * Track the field width there instead, and never exceed the viewport.
 */
@media (max-width: 640px) {
    .hero-field .cs-dropdown {
        min-width: 0;
        max-width: calc(100vw - 1.5rem);
    }
}

.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

[x-cloak] { display: none !important; }
