/* ============================================
   PWA FIX - PREVENZIONE OVERFLOW E BROWSER UI
   ============================================ */

/* FORZA PREVENZIONE OVERFLOW ORIZZONTALE */
html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative !important;
}

body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative !important;
}

/* TUTTI GLI ELEMENTI */
* {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* CONTAINER E ROW */
.container,
.container-fluid,
.row,
[class*="col-"] {
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* TABELLE */
table,
.table,
.table-responsive {
    max-width: 100% !important;
    width: 100% !important;
    table-layout: auto !important;
    overflow-x: auto !important;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

th, td {
    max-width: 200px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* CARD E CONTENUTI */
.card,
.card-body,
.card-header,
.mobile-page-card {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* FORM */
form,
input,
textarea,
select,
button {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* IMMAGINI E MEDIA */
img,
svg,
video,
iframe {
    max-width: 100% !important;
    height: auto !important;
}

/* NASCONDI ELEMENTI BROWSER IN STANDALONE */
body.standalone *,
html.standalone * {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* PREVENI SCROLL ORIZZONTALE */
@media (max-width: 768px) {
    * {
        max-width: 100vw !important;
    }
    
    .container,
    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

