/*
 * Owl B&B: mobile polish (7 Oct 2026, Dave's "really tidy the mobile side" pass).
 *
 * Loaded last on every front-end page (OwlBB_Mobile), so these rules win over
 * the theme and the per-page stylesheets without !important where possible.
 * Everything here is inside a max-width query: desktop is untouched.
 *
 *   ≤ 768px  tablets and large phones
 *   ≤ 600px  phones (the main target, designed at 390px)
 *   ≤ 380px  small phones (iPhone SE / mini)
 */

/* ══ Header ══════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
    /* "Log in" lives in the menu too, so the header only needs the
       Become a Host button and the burger. Stops the burger being cut off. */
    .owlbb-header .owlbb-header-login { display: none; }

    .owlbb-header .owlbb-header-actions { gap: 8px; flex-shrink: 0; }

    .owlbb-header .owlbb-header-cta {
        padding: 0.55rem 0.95rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .owlbb-header .owlbb-menu-toggle {
        width: 42px;
        height: 42px;
        flex-shrink: 0;
    }

    /* Announcement bar: one tidy line where it fits, two at most. */
    .owlbb-ab__slide {
        font-size: 12px;
        line-height: 1.35;
        padding-left: 4px;
        padding-right: 4px;
    }
}

@media (max-width: 380px) {
    .owlbb-header .owlbb-header-cta { padding: 0.5rem 0.75rem; font-size: 0.8rem; }
}

/* ══ Homepage hero ═══════════════════════════════════════════════════ */

@media (max-width: 600px) {
    .owlbb-hero {
        padding: 2rem 1rem 1.75rem;
        min-height: 0;
    }

    .owlbb-hero__title {
        font-size: 1.95rem;
        line-height: 1.12;
        margin-bottom: 0.6rem;
    }

    .owlbb-hero__subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
        max-width: 330px;
    }

    .owlbb-hero__search { margin-top: 1.4rem; }

    /* ── The search card ──
       A clean white card of soft tiles: Where on top, Dates | Nights side by
       side, Guests with a proper stepper, then filters + a full-width Search
       button. Everything left-aligned so the eye runs straight down it. */
    .owlbb-hero__search .owlbb-hs-bar--hero {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
        padding: 10px;
        border-radius: 22px;
        background: #fff;
        box-shadow: 0 18px 50px rgba(8, 30, 36, 0.35);
    }

    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-divider { display: none; }

    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-field {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 2px;
        min-height: 58px;
        padding: 10px 14px;
        border: 1px solid #E1ECEA;
        border-bottom: 1px solid #E1ECEA;
        border-radius: 14px;
        background: #F7FBFA;
        text-align: left;
        cursor: pointer;
        transition: border-color 0.15s ease, background 0.15s ease;
    }

    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-field:focus-within,
    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-field:active {
        border-color: var(--owlbb-primary, #2BB5A8);
        background: #fff;
    }

    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-field label {
        margin: 0;
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--owlbb-dark, #153A43);
        text-align: left;
    }

    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-field input,
    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-dates-display,
    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-nights-display {
        width: 100%;
        padding: 0;
        border: 0;
        background: transparent;
        font-size: 16px; /* 16px stops iOS zooming into the field */
        line-height: 1.3;
        color: var(--owlbb-dark, #153A43);
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-field input::placeholder,
    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-dates-display,
    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-nights-display {
        color: #6B7F86;
    }

    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-field--location { grid-column: 1 / -1; }
    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-field--dates    { grid-column: 1 / 5; }
    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-field--nights   { grid-column: 5 / -1; }

    /* Guests: label left, a proper thumb-sized stepper right. */
    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-field--guests {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        cursor: default;
    }

    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-stepper {
        display: flex;
        align-items: center;
        gap: 14px;
        margin: 0;
    }

    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-stepper-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid #CFE0DD;
        background: #fff;
        font-size: 18px;
        line-height: 1;
        color: var(--owlbb-dark, #153A43);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-stepper-value {
        min-width: 16px;
        text-align: center;
        font-size: 16px;
        font-weight: 600;
        color: var(--owlbb-dark, #153A43);
    }

    /* Filters + Search on one row: square filter button, wide Search. */
    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-more {
        grid-column: 1 / 2;
        width: 100%;
        height: 52px;
        margin: 0;
        border-radius: 14px;
        border: 1px solid #E1ECEA;
        background: #fff;
    }

    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-submit {
        grid-column: 2 / -1;
        width: 100%;
        height: 52px;
        margin: 0;
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 0.01em;
    }

    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-submit::after {
        content: 'Search stays';
    }

    /* The "more options" panel opens as a tidy sheet under the card. */
    .owlbb-hero__search .owlbb-hs-bar--hero .owlbb-hs-more-panel {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
    }
}

@media (max-width: 380px) {
    .owlbb-hero__title { font-size: 1.7rem; }
    .owlbb-hero__subtitle { font-size: 0.9rem; }
}

/* ══ Homepage sections ═══════════════════════════════════════════════ */

@media (max-width: 600px) {
    .owlbb-section { padding: 2.25rem 1rem; }

    .owlbb-section__header { margin-bottom: 1.25rem; }

    .owlbb-section__header h2 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .owlbb-section__header p {
        font-size: 0.92rem;
        line-height: 1.5;
    }

    /* Locations: a neat two-up grid instead of a tall stack. */
    .owlbb-locations__grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .owlbb-location-card {
        min-height: 128px;
        border-radius: 14px;
    }

    .owlbb-location-card__content { padding: 0.8rem; }

    .owlbb-location-card__content h3 { font-size: 1rem; margin: 0; }

    .owlbb-location-card__content span { font-size: 0.78rem; }

    /* Popular stays + What's On: swipeable rows instead of a very long
       scroll. The next card peeks in so it's obvious you can swipe. */
    .owlbb-stays__grid,
    .owlbb-whatson__grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 4px 1rem 12px;
        scroll-padding: 0 1rem;
        scrollbar-width: none;
    }

    .owlbb-stays__grid::-webkit-scrollbar,
    .owlbb-whatson__grid::-webkit-scrollbar { display: none; }

    .owlbb-stays__grid > *,
    .owlbb-whatson__grid > * {
        flex: 0 0 82%;
        max-width: 82%;
        scroll-snap-align: start;
    }

    .owlbb-whatson__footer { margin-top: 1rem; }

    .owlbb-cta { padding-top: 1rem; padding-bottom: 1rem; }
}

/* ══ Footer ══════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
    /* Link groups side by side, two to a row, so the footer is half the length. */
    .owlbb-footer__groups {
        grid-template-columns: 1fr 1fr;
        column-gap: 1.25rem;
        row-gap: 1.5rem;
    }

    .owlbb-footer__group a { font-size: 0.95rem; }
}

/* ══ Search results page ═════════════════════════════════════════════ */

@media (max-width: 600px) {
    .owlbb-results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .owlbb-results-header-left,
    .owlbb-results-header-right { flex: 0 0 auto; }

    /* Row 1: Filters (wide) + grid/list/map toggle. Row 2: sort, full width,
       so "Recommended" is never cut off. */
    .owlbb-results-header-right {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .owlbb-results-header-right .owlbb-filters-mobile-toggle {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        height: 42px;
        justify-content: center;
        gap: 6px;
    }

    .owlbb-results-header-right .owlbb-view-toggle { grid-column: 2; grid-row: 1; }

    .owlbb-results-header-right .owlbb-sort {
        grid-column: 1 / -1;
        grid-row: 2;
        min-width: 0;
        gap: 6px;
    }

    .owlbb-results-header-right .owlbb-sort label { display: none; }

    .owlbb-results-header-right .owlbb-sort select {
        width: 100%;
        min-width: 0;
        height: 42px;
        font-size: 16px;
    }

    .owlbb-view-toggle .owlbb-view-btn { width: 36px; height: 34px; }
}

/* ══ Property page ═══════════════════════════════════════════════════ */

@media (max-width: 600px) {
    /* Amenities two-up rather than one long column of boxes. */
    .owlbb-amenities-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .owlbb-amenities-grid > .owlbb-amenity-item {
        min-width: 0;
        font-size: 0.88rem;
    }
}

/* ══ Forms everywhere: 16px text so iOS doesn't zoom in on focus ═══════ */

@media (max-width: 600px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    input[type="search"],
    input[type="url"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px;
    }
}

/* ══ Tick boxes on the sign-up / log-in forms: easier to hit with a thumb ══ */

@media (max-width: 600px) {
    .owlbb-checkbox input[type="checkbox"],
    input[type="checkbox"][name="terms_accepted"] {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .owlbb-checkbox { gap: 8px; align-items: center; }
}
