/*
 Theme Name:   ItaliaWP3 Child - Archivio di Stato di Oristano
 Description:  Tema Child conforme WCAG 2.2 AA 
 Author:       Alberto Z.
 Template:     italiawp3
 Version:      2.2.0
*/

/* WCAG 2.2 Criterio 2.4.11 (Focus Not Obscured):
   Impedisce a header sticky o cookie banner di coprire l'elemento in focus */
html {
    scroll-padding-top: 130px;
}

*:focus {
    scroll-margin-top: 130px;
}

/* WCAG 2.2 Criterio 2.4.7 e 2.4.13 (Focus Appearance):
   Indicatore a doppio anello ad altissimo contrasto su sfondi chiari e scuri */
.asor-search-box .form-control:focus,
.asor-btn:focus,
.asor-btn-nav:focus,
.asor-thumb-btn:focus,
.asor-pagination ul.page-numbers a.page-numbers:focus,
.asor-result-card a:focus {
    outline: 3px solid #ff9900 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 5px #00264d !important;
    border-color: #00264d !important;
}

/* Contrasto testo secondario > 7.4:1 (WCAG 1.4.3 AA/AAA) */
.asor-text-secondary {
    color: #384c60 !important;
}

.asor-heading-section {
    color: #004080 !important;
    font-weight: 700;
}

/* Contenitore form e schede */
.asor-search-box {
    background-color: #ffffff;
    border: 1px solid #8da2b5;
    border-radius: 6px;
    overflow: hidden;
}

.asor-search-header {
    background-color: #ebf2f7;
    border-bottom: 1px solid #8da2b5;
    color: #17324d;
}

.asor-search-box label {
    color: #17324d;
    font-weight: 700;
    margin-bottom: 0.4rem;
    display: block;
}

/* WCAG 2.2 Criterio 2.5.8 (Target Size Minimum >= 24x24px, impostato a 44px) */
.asor-search-box .form-control {
    min-height: 44px;
    border: 1px solid #4a627a;
    color: #17324d;
    background-color: #ffffff;
    font-size: 1rem;
}

.asor-search-box .form-control::placeholder {
    color: #52667a;
    opacity: 1;
}

.asor-btn,
.asor-btn-nav {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    padding: 0.5rem 1.25rem;
}

/* Card dei risultati di ricerca */
.asor-result-card {
    background: #ffffff;
    border: 1px solid #8da2b5;
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.asor-result-card:hover,
.asor-result-card:focus-within {
    border-color: #004080;
    box-shadow: 0 4px 12px rgba(0, 64, 128, 0.15);
}

.asor-card-preview {
    position: relative;
    height: 180px;
    background-color: #efece6;
    border-bottom: 1px solid #b8ad99;
    overflow: hidden;
}

.asor-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.asor-badge-scansioni {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #00264d;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #ffffff;
}

/* Lista di definizione dati anagrafici e archivistici (<dl>) */
.asor-dl-scheda dt {
    color: #384c60;
    font-weight: 700;
}

.asor-dl-scheda dd {
    color: #17324d;
    margin-bottom: 0.5rem;
}

.asor-dl-row {
    border-bottom: 1px solid #dce4ec;
    padding: 0.5rem 0;
}

/* Visualizzatore Multi-Immagine sulla scheda singola */
.asor-viewer-box {
    background-color: #ffffff;
    border: 2px solid #004080;
    border-radius: 6px;
    overflow: hidden;
}

.asor-viewer-toolbar {
    background-color: #f2f8ff;
    border-bottom: 1px solid #8da2b5;
    padding: 0.75rem 1rem;
    gap: 10px;
}

.asor-scan-stage {
    background-color: #f4efe6;
    border: 1px solid #8c7a5b;
    padding: 12px;
    text-align: center;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.asor-scan-stage img {
    max-width: 100%;
    max-height: 600px;
    height: auto;
    border: 1px solid #5c4e3a;
}

/* Miniature cliccabili (Target >= 44x44px e gap 10px per WCAG 2.2 2.5.8) */
.asor-thumbs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.asor-thumb-btn {
    background: #f5f7fa;
    border: 1px solid #5c6f82;
    border-radius: 4px;
    padding: 6px;
    width: 108px;
    min-height: 80px;
    text-align: center;
    cursor: pointer;
    color: #17324d;
}

.asor-thumb-btn[aria-current="true"] {
    background-color: #e1f0ff;
    border: 3px solid #004080;
    color: #00264d;
    font-weight: 700;
}

.asor-thumb-btn img {
    width: 100%;
    height: 55px;
    object-fit: cover;
    border: 1px solid #8c7a5b;
    margin-bottom: 4px;
}

/* Paginazione accessibile conforme WCAG 2.2 2.5.8 (Target >= 44x44px) */
.asor-pagination ul.page-numbers {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.asor-pagination ul.page-numbers li {
    margin: 0;
}

.asor-pagination ul.page-numbers a.page-numbers,
.asor-pagination ul.page-numbers span.page-numbers {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #4a627a;
    border-radius: 4px;
    background-color: #ffffff;
    color: #004080;
    font-weight: 700;
    text-decoration: none;
}

.asor-pagination ul.page-numbers a.page-numbers:hover {
    background-color: #ebf2f7;
    border-color: #00264d;
}

.asor-pagination ul.page-numbers span.page-numbers.current {
    background-color: #004080;
    border-color: #00264d;
    color: #ffffff;
}