/* Public layout corrections. Loaded after the existing Vite styles. */
.page-container {
    box-sizing: border-box;
    width: 100%;
    padding-inline: 24px;
}

.page-container .row > *,
footer .col {
    min-width: 0;
}

@media (max-width: 991.98px) {
    .page-container {
        padding-inline: 16px;
    }
}

@media (max-width: 767.98px) {
    html {
        background-color: #212529;
    }

    body {
        margin: 0;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* The admin bar reserves space only when it actually exists. */
    .admin-topbar-wrapper {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        max-width: none;
        padding: 8px 16px;
        transform: none;
    }

    .page-container.py-5 {
        padding-top: 24px !important;
        padding-bottom: 24px !important;
    }

    .page-container h1 {
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .page-container .breadcrumb {
        row-gap: 4px;
        line-height: 1.5;
    }

    .page-container .breadcrumb-item {
        display: inline-flex;
        align-items: baseline;
        min-width: 0;
        max-width: 100%;
    }

    .page-container .breadcrumb-item + .breadcrumb-item::before {
        float: none;
        flex-shrink: 0;
    }

    /* The surrounding grid already provides the section spacing. */
    .page-container .trust-faq {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .page-container .specs-table-modern {
        table-layout: fixed;
        width: 100%;
    }

    .page-container .specs-table-modern td {
        overflow-wrap: anywhere;
    }

    .page-container .specs-table-modern td:first-child {
        width: 35%;
    }

    footer.bg-dark {
        padding-top: 32px !important;
        /* Keep the contact buttons over the dark footer, not a blank body strip. */
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    }

    footer > .container-lg {
        padding-inline: 16px;
    }

    footer > .container-lg > .container-lg {
        padding-inline: 0;
    }

    footer .d-flex.flex-column > .block {
        width: 100%;
        min-width: 0;
    }

    footer .block > p.w-75 {
        width: 100% !important;
        max-width: 32rem;
        margin-inline: auto;
        margin-bottom: 0;
        text-align: center;
        line-height: 1.6;
    }

    footer .row-cols-md-2 > .col {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    footer p {
        overflow-wrap: anywhere;
    }

    footer .footer-copyright {
        margin-bottom: 0;
    }

    .mobile-contact-bar {
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 46px;
    }

    .amo-chat-toggle {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }
}
