html {
    max-width: 100%;
    overflow-x: clip;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    overflow-x: clip;
}

img,
video,
canvas,
iframe,
svg {
    max-width: 100%;
}

img,
video {
    height: auto;
}

button,
input,
select,
textarea {
    max-width: 100%;
    font: inherit;
}

textarea,
pre,
code,
td,
th,
p,
a,
strong,
small {
    overflow-wrap: anywhere;
}

table {
    max-width: 100%;
}

.table-responsive,
.table-wrap,
.table-container,
.admin-table-wrap,
.booking-request {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.events-modal,
.modal,
[role="dialog"] {
    max-height: 100vh;
    max-height: 100dvh;
}

.events-modal-content,
.modal-content {
    max-width: min(100%, 960px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    overscroll-behavior: contain;
}

@media (min-width: 1920px) {
    .page,
    .page-container,
    .content-container,
    .your-events-content {
        width: min(1860px, calc(100% - 96px)) !important;
        max-width: 1860px !important;
        margin-inline: auto;
    }

    .main-content {
        padding-inline: clamp(40px, 3vw, 84px);
    }

    .userui-navbar {
        padding-inline: clamp(24px, 2vw, 48px);
    }

    .detail {
        gap: clamp(28px, 2.2vw, 56px);
    }

    .events-modal-content,
    .modal-content {
        max-width: min(1100px, calc(100vw - 64px));
    }
}

@media (max-width: 1100px) {
    .main-content {
        min-width: 0;
    }

    .detail {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .gallery,
    .info,
    .card,
    .panel,
    .content-card {
        min-width: 0;
    }

    .main-image {
        max-height: 62vh;
    }
}

@media (max-width: 760px) {
    .main-content {
        padding-inline: 18px !important;
    }

    .userui-navbar {
        align-items: stretch;
    }

    .userui-nav-links {
        min-width: 0;
        width: 100%;
        justify-content: center;
    }

    .events-modal-content,
    .modal-content {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100dvh - 24px);
        margin: 12px;
    }

    .actions,
    .form-actions,
    .modal-actions {
        flex-wrap: wrap;
    }

    input,
    select,
    textarea {
        min-width: 0;
    }
}

@media (max-width: 520px) {
    .page,
    .page-container,
    .content-container,
    .your-events-content {
        width: 100% !important;
        max-width: 100% !important;
        padding-inline: 16px !important;
    }

    .grid,
    .cards-grid,
    .services-grid,
    .settings-grid,
    .admin-cards {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .detail {
        padding: 18px !important;
    }

    h1 {
        font-size: clamp(26px, 8vw, 36px);
    }

    .events-modal-content,
    .modal-content {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        max-height: calc(100dvh - 16px);
        margin: 8px;
    }
}
