/* Shared layout behaviour for phones and tablets. */

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

body.nav-locked {
    overflow: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
svg,
video {
    max-width: 100%;
}

button,
a,
[role="button"] {
    touch-action: manipulation;
}

.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.overflow-x-auto > table {
    min-width: 40rem;
}

/* Staff / super-admin drawer: keep the footer pinned and let the nav list scroll. */
#dashboard-sidebar {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

#dashboard-sidebar nav {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

#mobile-nav {
    max-height: calc(100dvh - 4rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

@media (max-width: 639px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select,
    textarea {
        font-size: 16px !important;
    }

    .max-w-7xl.px-6,
    .max-w-6xl.px-6,
    .max-w-5xl.px-6,
    .max-w-3xl.px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .rounded-xl.p-6,
    .form-wizard-step-panel {
        padding: 1rem;
    }

    .overflow-x-auto > table th,
    .overflow-x-auto > table td {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Hero search: native datetime fields must not spill out of the card. */
.hero-search-card .hero-field {
    min-width: 0;
    overflow: hidden;
}

.hero-search-card .hero-field-control {
    min-width: 0;
    max-width: 100%;
}

.hero-search-card input[type="datetime-local"].hero-field-control {
    font-size: 16px;
}

@media (max-width: 639px) {
    .hero-search-card .rental-type-btn {
        font-size: 0.8125rem;
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .vehicle-filter-panel {
        left: 0;
        right: auto;
        max-width: calc(100vw - 2rem);
    }
}

@media (min-width: 1024px) {
    #dashboard-sidebar {
        width: 16rem;
        max-width: none;
        transform: none !important;
        height: 100vh;
        max-height: none;
    }
}
