/* ============================================================
   Across The Monde — common.css
   Phase 5B.5: Common CSS Optimization — narrowed to selectors
   genuinely used by BOTH admin and public pages (Toast,
   Scrollbar-track). Pagination/Tables/Cards/Form-control extras
   moved to app.css (admin-only; public pages never used them and
   were paying ~6.6KB of dead weight for them). Verified byte-
   identical between site.css and public.css at the live
   cascade-winning declaration. Loaded first, by both
   _Layout.cshtml and _LayoutPublic.cshtml.
   ============================================================ */

/* ── Toast notifications ─────────────────────────────── */
.atm-toast-close:hover { opacity: 1; }
.atm-toast-icon { font-size: 18px; flex-shrink: 0; }
.atm-toast-msg { flex: 1; line-height: 1.4; }
.atm-toast.error   { background:#3a1a1a; color:#f87171; border:1px solid rgba(248,113,113,.25); }
.atm-toast.success { background:#1a3a2a; color:#4ade80; border:1px solid rgba(74,222,128,.25); }
.atm-toast.warning { background:#3a2e1a; color:#fb923c; border:1px solid rgba(251,146,60,.25); }
.atm-toast.info    { background:#1a233a; color:#93c5fd; border:1px solid rgba(147,197,253,.25); }

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   Global Responsive Design System & Mobile Optimization Rules
   ============================================================ */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Responsive Image & Media Default Constraint */
img, iframe, video, embed, object {
    max-width: 100%;
}

/* Responsive Table Scroll Container */
.table-responsive-wrapper,
.table-responsive,
.dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-responsive-wrapper table,
.table-responsive table {
    width: 100% !important;
    min-width: 600px;
}

/* Global Modal Viewport Responsive Rules */
.modal {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.modal-dialog {
    width: 94%;
    max-width: 94vw;
    margin: 1rem auto;
}

@media (min-width: 576px) {
    .modal-dialog { width: 90%; max-width: 540px; }
}
@media (min-width: 768px) {
    .modal-dialog.modal-md { width: 85%; max-width: 700px; }
    .modal-dialog.modal-lg { width: 90%; max-width: 880px; }
}
@media (min-width: 992px) {
    .modal-dialog.modal-xl { width: 92%; max-width: 1140px; }
}

.modal-body {
    max-height: calc(85vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Global Touch Target Optimization for Mobile Devices */
@media (max-width: 768px) {
    button,
    .btn,
    select.form-control,
    input[type="button"],
    input[type="submit"],
    input[type="reset"] {
        min-height: 44px;
        touch-action: manipulation;
    }

    .hidden-mobile { display: none !important; }
    .stack-mobile { flex-direction: column !important; width: 100% !important; }
    .w-100-mobile { width: 100% !important; }
    .text-center-mobile { text-align: center !important; }
    .p-mobile-sm { padding: 12px !important; }
    .m-mobile-0 { margin: 0 !important; }
}


