/**
 * Kampio — shared mobile-first responsive utilities
 * Loaded site-wide (public, owner, admin).
 */

/* ── Prevent accidental horizontal scroll ─────────────────────── */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ── Table scroll wrappers ──────────────────────────────────── */
.kampio-table-wrap,
.owner-table-wrap,
.adm-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    scrollbar-width: thin;
}

.kampio-table-wrap table,
.owner-table-wrap table,
.adm-table-wrap table {
    min-width: 0;
}

/* ── Touch-friendly targets (public nav + generic controls) ─── */
@media (max-width: 1199px) {
    .tmc-mobile-menu-btn {
        min-width: 44px !important;
        min-height: 44px !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
        padding: 0 !important;
    }

    .tmc-mobile-menu-btn:hover {
        background: rgba(15, 45, 58, 0.06) !important;
    }

    .tmc-mobile-menu.open .tmc-nav-link,
    .mobile-lang-toggle,
    .mobile-lang-opt {
        min-height: 44px;
    }
}

/* ── Public search / filter forms ───────────────────────────── */
@media (max-width: 768px) {
    .kampio-search-form,
    .home-search-form,
    .campings-search-bar,
    .cmp-explore-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .kampio-search-form input,
    .kampio-search-form select,
    .home-search-form input,
    .home-search-form select,
    .campings-search-bar input,
    .campings-search-bar select {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        box-sizing: border-box;
    }

    .kampio-search-form button,
    .home-search-form button,
    .campings-search-bar button {
        width: 100%;
        min-height: 44px;
    }
}

/* ── Camping detail mobile CTA ──────────────────────────────── */
@media (max-width: 600px) {
    .cd-mobile-hero-book {
        min-height: 44px !important;
        padding: 10px 18px !important;
    }

    .cd-bsh-close-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ── Account dashboard horizontal tabs ──────────────────────── */
@media (max-width: 768px) {
    .account-tab {
        min-height: 44px;
    }
}

/* ── Forum mobile touch targets ─────────────────────────────── */
@media (max-width: 768px) {
    .forum-action-btn,
    .forum-topic-vote-btn,
    .forum-filter-chip,
    .forum-compose-btn {
        min-height: 44px;
    }

    .forum-topic-meta,
    .forum-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ── Trip planner wizard ────────────────────────────────────── */
@media (max-width: 768px) {
    .trip-wizard-nav button,
    .trip-wizard-step-btn,
    .ptw-nav-btn {
        min-height: 44px;
    }
}

/* ── Safe area for fixed bottom bars ────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .kampio-fixed-bottom,
    .cd-sticky-book,
    .host-bottom-bar,
    .owner-mnav {
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--kampio-fixed-bottom-pad, 0px));
    }
}
