/* Shared responsive safeguards. This file is intentionally loaded after page styles. */
html {
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    max-width: 100%;
}

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

.arcus-content,
.arcus-topbar > *,
.arcus-header-actions,
.arcus-account-box,
.auth-main,
.auth-stage,
.auth-view,
.auth-view-shell,
.auth-grid > *,
.auth-input-wrap {
    min-width: 0;
}

.arcus-app :is(h1, h2, h3, h4, h5, h6, p, a, button, label, th, td, dd),
.auth-body :is(h1, h2, h3, h4, h5, h6, p, a, button, label) {
    overflow-wrap: anywhere;
}

.arcus-app :is(input, select, textarea, button),
.auth-body :is(input, select, textarea, button) {
    max-width: 100%;
}

.arcus-table-wrap,
.table-responsive {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    /* The mobile header remains in document flow so its variable height never covers content. */
    .arcus-site-header {
        position: sticky;
    }

    .arcus-content {
        padding-top: 1rem;
    }

    .arcus-header-shell {
        width: 100%;
    }

    .arcus-topbar-right,
    .arcus-header-actions,
    .arcus-account-box,
    .arcus-account-box > ul {
        flex-wrap: wrap;
    }

    .arcus-header-actions > *,
    .arcus-topbar-right > * {
        max-width: 100%;
    }

    .arcus-category-nav-tabs {
        scrollbar-width: thin;
        overscroll-behavior-inline: contain;
    }

    .arcus-app :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
    .auth-body :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
        font-size: 16px;
    }

    :is(.arcus-admin-body, .admin-dashboard-page, .auditpub-page, .admin-publicar-page,
        .staff-page, .ac-page, .au-page, .av-page, .widget-admin-shell,
        .widget-edit-shell, .hv-page, .ex-page, .pd-page, .cart-page, .cartx-page,
        .cp-page, .cpx-page, .manage-page, .vendedor-body) {
        max-width: 100%;
    }

    :is(.arcus-admin-head, .arcus-form-actions, .admin-dashboard-hero,
        .admin-dashboard-brand, .auditpub-hero__meta, .auditpub-detail-hero__actions,
        .staff-hero__actions, .ac-header, .ac-toolbar, .au-head, .av-head,
        .widget-admin-hero, .widget-admin-hero__actions, .hv-header__row,
        .hv-actions, .ex-header, .ex-toolbar, .cart-header, .cartx-hero,
        .cpx-hero, .manage-card__head) {
        flex-wrap: wrap;
    }

    .arcus-actions,
    .arcus-action-menu,
    .dropdown-menu {
        max-width: calc(100vw - 2rem);
    }
}

@media (max-width: 480px) {
    .arcus-header-shell {
        padding-inline: 0.65rem;
    }

    .arcus-content {
        padding-inline: 0;
    }

    .arcus-user-dropdown,
    .arcus-account-dropdown,
    .dropdown-menu {
        max-width: calc(100vw - 1.25rem);
    }
}

@media (pointer: coarse) {
    .arcus-app :is(button, .btn, a.dropdown-item),
    .auth-body :is(button, .auth-inline-link, .auth-bottom-links a) {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-body *,
    .auth-body *::before,
    .auth-body *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
