/* ─── Search Mode Tabs ─────────────────────────────────────────────────────── */

.search-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.search-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: rgba(255, 255, 255, 0.55);
    font-family: var(--font-ui, 'DM Sans', sans-serif);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}

.search-tab:hover {
    color: rgba(255, 255, 255, 0.85);
}

.search-tab.is-active {
    color: var(--color-accent-green, #00ed64);
    border-bottom-color: var(--color-accent-green, #00ed64);
}

.search-tab svg {
    flex-shrink: 0;
    opacity: 0.75;
    transition: opacity 0.15s;
}

.search-tab.is-active svg,
.search-tab:hover svg {
    opacity: 1;
}

/* ─── Shared search form layout ────────────────────────────────────────────── */

.search-form__row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.search-form__location,
.search-form__address {
    flex: 1 1 280px;
    min-width: 0;
}

.search-form__date {
    flex: 0 1 230px;
    min-width: 0;
}

.search-form__btn {
    flex-shrink: 0;
}

/* Input wrapper — needed for positioning suggestions / GPS button */
.search-input-wrap {
    position: relative;
}

.search-input-wrap--with-icon .search-input {
    padding-right: 2.75rem;
}

/* GPS icon button inside address input */
.search-input__icon-btn {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    transition: color 0.15s;
    line-height: 0;
}

.search-input__icon-btn:hover {
    color: var(--color-accent-green, #00ed64);
}

.search-input__icon-btn.is-loading {
    animation: spin-gps 0.8s linear infinite;
}

@keyframes spin-gps {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Shared text input style for search forms */
.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-ui, 'DM Sans', sans-serif);
    font-size: 0.9375rem;
    transition: border-color 0.15s, background 0.15s;
    -webkit-appearance: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-accent-green, #00ed64);
    background: rgba(255, 255, 255, 0.11);
}

/* ─── Radius slider row ─────────────────────────────────────────────────────── */

.search-form-point__radius-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.875rem;
    flex-wrap: wrap;
}

.search-form-point__radius-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    white-space: nowrap;
    min-width: 90px;
}

.search-form-point__slider-wrap {
    flex: 1;
    min-width: 200px;
}

.search-form-point__slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    display: block;
}

.search-form-point__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-accent-green, #00ed64);
    cursor: pointer;
    border: 2px solid var(--color-bg, #001e2b);
    box-shadow: 0 0 0 3px rgba(0, 237, 100, 0.25);
}

.search-form-point__slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-accent-green, #00ed64);
    cursor: pointer;
    border: 2px solid var(--color-bg, #001e2b);
}

.search-form-point__slider-stops {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.35);
    padding: 0 2px;
    user-select: none;
}

/* ─── Point-mode feedback message ──────────────────────────────────────────── */

.cg-point-feedback {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
    min-height: 1.25em;
}

.cg-point-feedback--error {
    color: #ff7875;
}

/* ─── List / Map view toggle ────────────────────────────────────────────────── */

.search-map-toggle {
    display: inline-flex;
    gap: 0;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0, 30, 43, 0.2);
}

.search-map-toggle__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.375rem 0.875rem;
    background: #fff;
    border: none;
    color: rgba(0, 30, 43, 0.6);
    font-family: var(--font-ui, 'DM Sans', sans-serif);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.search-map-toggle__btn + .search-map-toggle__btn {
    border-left: 1px solid rgba(0, 30, 43, 0.2);
}

.search-map-toggle__btn.is-active,
.search-map-toggle__btn[aria-pressed="true"] {
    background: var(--color-primary-green, #00684a);
    color: #fff;
}

.search-map-toggle__btn:not(.is-active):hover {
    background: #f0fdf4;
    color: var(--color-forest-dark, #001e2b);
}

/* ─── Autocomplete suggestions dropdown ─────────────────────────────────────── */

.search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #0d2e3f;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.search-suggestions__item {
    padding: 0.625rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-ui, 'DM Sans', sans-serif);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background 0.1s;
}

.search-suggestions__item:hover,
.search-suggestions__item--active {
    background: rgba(255, 255, 255, 0.09);
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .search-tab {
        font-size: 0.875rem;
        padding: 0.5rem 0.875rem;
    }

    .search-form__row {
        flex-direction: column;
    }

    .search-form__location,
    .search-form__address,
    .search-form__date {
        flex-basis: auto;
        width: 100%;
    }

    .search-form__btn {
        width: 100%;
    }

    .search-form-point__radius-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-form-point__slider-wrap {
        width: 100%;
    }
}
