/* Ripristina la riga Bootstrap */
.archivio-storico form .row {
    float: none;
    width: auto;
    margin-right: -15px;
    margin-left: -15px;
}

/* Ripristina i bottoni Bootstrap */
.archivio-storico form .btn {
    height: auto;
    padding: 6px 12px;
    border-radius: 4px;
}

/* Ripristina i float e il clearfix sulle righe del form */
.archivio-storico form .row::after {
    content: "";
    display: table;
    clear: both;
}

/* Forza gli input a riempire le colonne per allinearli al margine destro */
.archivio-storico form .col-md-4 input.form-control,
.archivio-storico form .col-sm-2 input.form-control,
.archivio-storico form .col-sm-4 input.form-control {
    width: 100% !important;
    float: left; /* previene i comportamenti inline del nuovo css */
}
/* Annulla i danni del nuovo style.css sulla classe base .btn solo per questo bottone */
.btn.read-more {
    height: auto !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    line-height: 1.42857143 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    background-color: transparent;
}

/* Stili originali recuperati per hover e focus */
.btn.read-more:hover,
.btn.read-more:focus {
    color: #333 !important;
    text-decoration: none !important;
}

/* Stili originali recuperati per lo stato active */
.btn.read-more:active,
.btn.read-more.active {
    background-image: none !important;
    outline: 0 !important;
    -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125) !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125) !important;
}
/* Forza l'uso del font Gotham annullando i vecchi !important di new-regesta.css */
body,
p,
h1, h2, h3, h4, h5, h6,
a, span, div,
input, button, select, textarea, label,
.navbar-nav li a,
.form-control,
.btn {
    font-family: "Gotham", sans-serif !important;
}
/* Ripristina il font corretto per le icone di FontAwesome 5 sovrascritte da Gotham */
.fa, .fas, .far, .fal {
    font-family: "Font Awesome 5 Free" !important;
}

.fab {
    font-family: "Font Awesome 5 Brands" !important;
}

.glyphicon {
    font-family: 'Glyphicons Halflings' !important;
}

/* ==========================================================================
   RIPRISTINO TABELLE BOOTSTRAP E REGESTA (Sovrascrittura reset 2026)
   ========================================================================== */

/* 1. Ripristina il contenitore responsive */
.table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-top: 1px solid #ddd !important;
    margin-bottom: 15px !important;
    float: none !important;
}

/* 2. Ripristina la struttura nativa della tabella */
.table-responsive table.table,
table.table {
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 20px auto !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    float: none !important;
    background-color: transparent !important;
}

/* Forza righe e celle a comportarsi come tali (annulla eventuali display: block) */
.table-responsive table.table tr {
    display: table-row !important;
    border-bottom: 1px solid #ddd !important;
}
.table-responsive table.table td,
.table-responsive table.table th {
    display: table-cell !important;
    padding: 8px !important;
    line-height: 1.42857143 !important;
    vertical-align: top !important;
    border-top: 0 !important;
    text-align: left !important; /* Evita che il testo si sposti a destra */
}

/* 3. Ripristino personalizzazioni Regesta (.labelTable, .groupTable, ecc.) */
.table-responsive table.table td.labelTable {
    padding-left: 0 !important;
    font-weight: 700 !important;
    width: 25% !important;
}
.table-responsive table.table td {
    padding-right: 0 !important;
}
.table-responsive table.table tr.groupTable {
    border: 0 !important;
    background: #efefef !important;
}
.table-responsive table.table tr.groupTable td {
    padding-left: 10px !important;
}
.table-responsive table.table tr.indentTr {
    background: #f7f7f7 !important;
}
.table-responsive table.table tr.indentTr td.labelTable {
    padding-left: 15px !important;
    color: #777 !important;
}

/* Ripristino specifico per il wrapper dei video/iframe (es. YouTube/Vimeo/PDF) */
.videoUiWrapper.videocontent {
    position: relative !important;
    width: 100% !important;
    max-width: 600px !important; /* Limite massimo impostato in precedenza */
    margin: 10px auto 30px auto !important; /* Centra il contenitore */
    height: auto !important; /* Annulla l'altezza fissa sbagliata di .thumbnail */
    padding: 0 !important;
    padding-bottom: 30% !important; /* Mantiene proporzione 16:9 per i video */
    overflow: hidden !important;
}

/* Forza l'iframe a riempire perfettamente il contenitore senza spazi vuoti */
.videoUiWrapper.videocontent iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}