/* BARAMA_HERO_SEARCH_V1123
 * Two-row compact Hero Search composition.
 * <1200px: Row 1 = query + Advanced icon; Row 2 = Offer + Location + Search.
 * >=1200px remains governed by the accepted desktop Hero search baseline.
 */
@media (max-width: 1199px) {
    .market-searchbar.barama-search-v115 {
        display: grid !important;
        grid-template-columns: minmax(130px, .90fr) minmax(190px, 1.28fr) minmax(130px, .82fr) 48px !important;
        grid-template-areas:
            "query query query advanced"
            "offer location search search" !important;
        align-items: stretch !important;
        width: min(100%, 820px) !important;
        max-width: 820px !important;
        gap: 0 !important;
        padding: 10px !important;
        overflow: visible !important;
    }

    .market-searchbar.barama-search-v115 > * {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .market-searchbar.barama-search-v115 > .market-searchbar__query {
        grid-area: query !important;
        min-height: 60px !important;
        padding: 0 12px !important;
        border: 0 !important;
        border-bottom: 1px solid rgba(148, 163, 184, .18) !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .market-searchbar.barama-search-v115 > .market-searchbar__query input {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 60px !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        text-overflow: ellipsis !important;
    }

    .market-searchbar.barama-search-v115 > .barama-home-advanced {
        grid-area: advanced !important;
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        min-height: 60px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-bottom: 1px solid rgba(148, 163, 184, .18) !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: inset 1px 0 0 rgba(148, 163, 184, .18) !important;
        display: grid !important;
        place-items: center !important;
    }

    .market-searchbar.barama-search-v115 > .barama-home-advanced span {
        display: none !important;
    }

    .market-searchbar.barama-search-v115 > .barama-home-advanced svg {
        width: 20px !important;
        height: 20px !important;
    }

    .market-searchbar.barama-search-v115 > label:not(.market-searchbar__query) {
        grid-area: offer !important;
        display: flex !important;
        align-items: center !important;
        min-height: 60px !important;
        margin: 0 !important;
        padding: 0 14px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .market-searchbar.barama-search-v115 > label:not(.market-searchbar__query) select,
    .market-searchbar.barama-search-v115 > label:not(.market-searchbar__query) .form-select {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 60px !important;
        margin: 0 !important;
        padding: 0 24px 0 0 !important;
        border: 0 !important;
        outline: 0 !important;
        border-radius: 0 !important;
        background-color: transparent !important;
        box-shadow: none !important;
        color: #f8fafc !important;
        font-weight: 650 !important;
        white-space: nowrap !important;
    }

    .market-searchbar.barama-search-v115 > .barama-public-location-picker {
        grid-area: location !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 60px !important;
        margin: 0 !important;
        padding: 0 14px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: inset 1px 0 0 rgba(148, 163, 184, .18) !important;
    }

    .market-searchbar.barama-search-v115 > .barama-public-location-picker .barama-public-location-picker__trigger {
        display: grid !important;
        grid-template-columns: 20px minmax(max-content, 1fr) 16px !important;
        align-items: center !important;
        column-gap: 9px !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 60px !important;
        padding: 0 !important;
        border: 0 !important;
        outline: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #f8fafc !important;
    }

    .market-searchbar.barama-search-v115 > .barama-public-location-picker .barama-public-location-picker__label {
        min-width: max-content !important;
        width: auto !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
        font-weight: 650 !important;
    }

    .market-searchbar.barama-search-v115 > button[type="submit"] {
        grid-area: search !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 50px !important;
        margin: 5px 0 5px 8px !important;
        padding: 0 16px !important;
        border: 0 !important;
        border-radius: 13px !important;
        background: linear-gradient(180deg, #2f6bff, #2457ea) !important;
        color: #fff !important;
        box-shadow: 0 10px 24px rgba(37, 88, 235, .18) !important;
        white-space: nowrap !important;
    }

    .market-searchbar.barama-search-v115 > .market-searchbar__query::before,
    .market-searchbar.barama-search-v115 > .market-searchbar__query::after,
    .market-searchbar.barama-search-v115 > label::before,
    .market-searchbar.barama-search-v115 > label::after,
    .market-searchbar.barama-search-v115 > .barama-public-location-picker::before,
    .market-searchbar.barama-search-v115 > .barama-public-location-picker::after,
    .market-searchbar.barama-search-v115 > .barama-home-advanced::before,
    .market-searchbar.barama-search-v115 > .barama-home-advanced::after,
    .market-searchbar.barama-search-v115 > button[type="submit"]::before,
    .market-searchbar.barama-search-v115 > button[type="submit"]::after {
        content: none !important;
        display: none !important;
    }
}

/* Tablet/iPad family: give Location the dominant share and keep all text visible. */
@media (min-width: 641px) and (max-width: 1199px) {
    .market-searchbar.barama-search-v115 {
        grid-template-columns: minmax(150px, .92fr) minmax(230px, 1.35fr) minmax(128px, .78fr) 48px !important;
    }

    .market-searchbar.barama-search-v115 > .barama-public-location-picker .barama-public-location-picker__label {
        font-size: 1rem !important;
    }
}

/* Phones keep the same two-row information architecture with tighter proportions. */
@media (max-width: 640px) {
    .market-searchbar.barama-search-v115 {
        grid-template-columns: minmax(82px, .82fr) minmax(120px, 1.20fr) minmax(80px, .72fr) 42px !important;
        padding: 8px !important;
        border-radius: 18px !important;
    }

    .market-searchbar.barama-search-v115 > .market-searchbar__query,
    .market-searchbar.barama-search-v115 > .market-searchbar__query input,
    .market-searchbar.barama-search-v115 > .barama-home-advanced {
        min-height: 56px !important;
    }

    .market-searchbar.barama-search-v115 > .barama-home-advanced {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
    }

    .market-searchbar.barama-search-v115 > label:not(.market-searchbar__query),
    .market-searchbar.barama-search-v115 > .barama-public-location-picker,
    .market-searchbar.barama-search-v115 > label:not(.market-searchbar__query) select,
    .market-searchbar.barama-search-v115 > .barama-public-location-picker .barama-public-location-picker__trigger {
        min-height: 56px !important;
    }

    .market-searchbar.barama-search-v115 > label:not(.market-searchbar__query),
    .market-searchbar.barama-search-v115 > .barama-public-location-picker {
        padding-inline: 10px !important;
    }

    .market-searchbar.barama-search-v115 > .barama-public-location-picker .barama-public-location-picker__trigger {
        grid-template-columns: 18px minmax(max-content, 1fr) 12px !important;
        column-gap: 6px !important;
    }

    .market-searchbar.barama-search-v115 > label:not(.market-searchbar__query) select,
    .market-searchbar.barama-search-v115 > .barama-public-location-picker .barama-public-location-picker__label,
    .market-searchbar.barama-search-v115 > button[type="submit"] {
        font-size: clamp(13px, 3.7vw, 15px) !important;
    }

    .market-searchbar.barama-search-v115 > button[type="submit"] {
        min-height: 48px !important;
        margin: 4px 0 4px 6px !important;
        padding-inline: 10px !important;
        border-radius: 12px !important;
    }
}

@media (max-width: 390px) {
    .market-searchbar.barama-search-v115 {
        grid-template-columns: minmax(72px, .78fr) minmax(108px, 1.22fr) minmax(72px, .70fr) 38px !important;
    }

    .market-searchbar.barama-search-v115 > .barama-home-advanced {
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
    }

    .market-searchbar.barama-search-v115 > label:not(.market-searchbar__query),
    .market-searchbar.barama-search-v115 > .barama-public-location-picker {
        padding-inline: 7px !important;
    }
}
