/* Tabelle responsive: niente scroll orizzontale, contenuto che va a capo */
.wy-table-responsive {
    overflow: visible !important;
}
.wy-table-responsive table {
    width: 100% !important;
    table-layout: fixed !important;
    margin-bottom: 1em;
}
.wy-table-responsive table td,
.wy-table-responsive table th {
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    vertical-align: top;
    padding: 6px 8px;
}
.wy-table-responsive table code.literal,
.wy-table-responsive table tt.literal {
    white-space: normal !important;
    word-break: break-word;
}

/* ubxconfig: spazio extra tra figure e sotto i titoli di sezione */
div.figure, figure {
    margin-top: 2em !important;
    margin-bottom: 2em !important;
}
h2, h3 {
    margin-top: 1.6em !important;
}

/* Disabilita il link nel footer "Built with Sphinx using a theme provided by Read the Docs" */
.rst-footer-buttons + p a, .rst-versions + footer a[href*='sphinx-doc.org'],
footer p a[href*='sphinx-doc.org'], footer p a[href*='readthedocs.org'],
.footer a[href*='sphinx-doc.org'], .footer a[href*='readthedocs.org'] {
    pointer-events: none;
    color: inherit !important;
    text-decoration: none !important;
    cursor: default;
}

/* ---- Selettore di lingua in basso, nello stile QGIS: si apre verso l'alto ---- */
.rst-versions { transition: bottom .25s ease; }

.rst-versions .rst-current-version {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: 11px 12px;
    background-color: #2b2b2b;
    color: #fcfcfc !important;
    text-align: center;
    transition: background-color .15s ease;
}
.rst-versions .rst-current-version:hover { background-color: #383838; }
.rst-versions .rst-current-version .fa-globe { color: #b9b9b9; font-size: 1.05em; }
.rst-versions .rst-current-version .ms2-corrente {
    color: #27ae60;
    font-weight: 700;
    letter-spacing: .04em;
}
.rst-versions .rst-current-version .ms2-freccia {
    color: #b9b9b9;
    font-size: .9em;
    transition: transform .25s ease;
}
/* quando il riquadro e' aperto la freccia si gira verso il basso */
.rst-versions.shift-up .rst-current-version .ms2-freccia { transform: rotate(180deg); }

.rst-versions .rst-other-versions {
    background-color: #3c3c3c;
    padding: 14px 12px;
    border-top: 1px solid #4f4f4f;
}
.rst-versions .ms2-lingue {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5em;
}
.rst-versions .ms2-lingue a {
    padding: 4px 12px;
    border-radius: 3px;
    background-color: #4a4a4a;
    color: #e2e2e2;
    font-size: .95em;
    letter-spacing: .04em;
    transition: background-color .15s ease, color .15s ease;
}
.rst-versions .ms2-lingue a:hover { background-color: #27ae60; color: #fff; }
.rst-versions .ms2-lingue a.attuale {
    background-color: #27ae60;
    color: #fff;
    font-weight: 700;
}

/* il menu laterale finisce sopra il riquadro, non sotto */
.wy-side-scroll { padding-bottom: 3.5em; }

/* su telefono il tema nasconde il riquadro: qui resta visibile, a tutta larghezza */
@media screen and (max-width: 768px) {
    .rst-versions {
        display: block !important;
        width: 100%;
    }
    /* spazio in fondo alla pagina e al menu, cosi' il riquadro non copre le ultime voci */
    .wy-nav-content { padding-bottom: 4em; }
    .wy-side-scroll { padding-bottom: 3.5em; }
}

/* ---- Arabo: scrittura da destra a sinistra ---- */
html[lang="ar"] .wy-nav-content, html[lang="ar"] .rst-content,
html[lang="ar"] .wy-menu-vertical, html[lang="ar"] .wy-breadcrumbs {
    direction: rtl;
    text-align: right;
}
html[lang="ar"] .rst-content ul, html[lang="ar"] .rst-content ol {
    padding-right: 1.5em;
    padding-left: 0;
}
html[lang="ar"] .wy-menu-vertical li.toctree-l1 a,
html[lang="ar"] .wy-menu-vertical li.toctree-l2 a { padding-right: 1.618em; }
/* comandi, codice, nomi di file e coordinate restano da sinistra a destra */
html[lang="ar"] pre, html[lang="ar"] code, html[lang="ar"] .highlight,
html[lang="ar"] tt.literal { direction: ltr; text-align: left; }
html[lang="ar"] .rst-versions .ms2-lingue { direction: ltr; }
