/*
Theme Name: SI AGID PA Theme
Theme URI: https://horizon.sinetinformatica.it
Author: Simone Villa
Author URI: https://sinetinformatica.it
Description: SI AGID PA Theme
Version: 2.0.3

*/

/* WordPress Core
-------------------------------------------------------------- */
.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

a img.alignnone {
    margin: 5px 20px 20px 0;
}

a img.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%;
    /* Image does not overflow the content area */
    padding: 5px 3px 10px;
    text-align: center;
}

.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}

.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}

.wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    margin: 0;
    padding: 0 4px 5px;
}

/* Text meant only for screen readers. */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
    /* Many screen reader and browser combinations announce broken words as they would appear visually. */
}

.screen-reader-text:focus {
    background-color: #eee;
    clip: auto !important;
    clip-path: none;
    color: #444;
    display: block;
    font-size: 1em;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
    /* Above WP toolbar. */
}

.it-header-slim-wrapper .it-header-slim-wrapper-content #headerSlimMenu a span {
    color: #fff;
}

#search-modal,
#spid-modal {
    z-index: 99999;
}

#spid-modal .modal-dialog {
    max-width: 100%;
    margin: 0;
    height: 100vh;
}

#spid-modal .modal-title {
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .06);
    padding: 1.125rem 1.5rem;
    font-weight: 600;
    line-height: 1.5;
    color: #455a64;
    margin-bottom: 4.375rem;
}

@media (min-width: 768px) {
    #spid-modal .modal-title {
        box-shadow: none;
        justify-content: space-between;
        line-height: 1.1;
    }
}

/* RL */

.callout li {
    font-family: Lora, Georgia, serif;
    font-size: .889rem;
    color: #5b6f82;
}

.callout-inner.nessuna-previsione,
.callout:not(.callout-highlight):not(.callout-more) .callout-title.nessuna-previsione::before {
    border-color: #636363 !important;
}

.callout-inner.codice-verde,
.callout:not(.callout-highlight):not(.callout-more) .callout-title.codice-verde::before {
    border-color: #47AE45 !important;
}

.callout-inner.codice-giallo,
.callout:not(.callout-highlight):not(.callout-more) .callout-title.codice-giallo::before {
    border-color: #F3E600 !important;
}

.callout-inner.codice-arancione,
.callout:not(.callout-highlight):not(.callout-more) .callout-title.codice-arancione::before {
    border-color: #F49819 !important;
}

.callout-inner.codice-rosso,
.callout:not(.callout-highlight):not(.callout-more) .callout-title.codice-rosso::before {
    border-color: #E52621 !important;
}

#protezione-civile .callout:not(.callout-highlight):not(.callout-more) .callout-title::before {
    width: 2.222rem;
}

.logo-e015,
.logoRL {
    height: 40px;
}

.logo-dpc {
    height: 110px;
}

/*.card dd,
.card ol,
.card ul,*/
#footer dd,
#footer ol,
#footer ul {
    margin: 0;
    padding: 0;
    list-style: none
}

.logo-company {
    height: 85px;
}

#ultimi-messaggi-list .card-teaser-info,
#messaggi-list .card-teaser-info {
    border-left: 8px solid #06c;
}

/** FORM BUILDER CSS */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-number input[type=text] {
    display: unset;
}

.input-number.input-number-currency input[type="text"],
.input-number.input-number-percentage input[type="text"] {
    padding-left: 40px;
}

.input-number button,
.cmp-input .clean-input {
    display: none;
}

.card .card-calendar {
    max-height: 110px !important;
}

/* Fix formato elenco puntati in testi */
ul,
ol,
dl {
    font-size: unset !important;
    line-height: unset !important;
}

.datepicker td .datepicker th {
    width: 40px !important;
    height: 40px !important;
}

/* Home calendar splide icons left and right */
.home .splide__arrow,
.site .splide__arrow {
    background: #0000;
    border: 0;
    color: #e5eeee;
    cursor: pointer;
    position: absolute;
    top: 50%;
}

.home .splide__arrow:disabled,
.site .splide__arrow:disabled {
    opacity: .3;
}

.home .splide__arrow--prev,
.site .splide__arrow--prev {
    left: -2.5rem;
    transform: scaleX(-1) translateY(-50%);
}

.home .splide__arrow--next,
.site .splide__arrow--next {
    right: -2.5rem;
    transform: translateY(-50%);
}

.home .splide__arrow svg,
.site .splide__arrow svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: square;
    stroke-width: 8px;
    height: 2.2rem;
    vertical-align: middle;
    width: 2.2rem;
}

/*BTN ACTION*/
.btn-action {
    visibility: visible;
    opacity: 1;
    transition: all .2s ease-in-out, transform .05s ease-out, visibility 0s linear, opacity .1s ease-in-out;
    transform: scale(1);
    position: fixed;
    bottom: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    text-decoration: none;
    border-radius: 50%;
    display: block;
    text-align: center;
    z-index: 1;
    transform-origin: center center;
}

.btn-action .icon {
    margin: 0;
    position: relative;
    transform: scale(0.75);
    top: 4px;
}

@media (min-width: 768px) {
    .btn-action .icon {
        transform: scale(1);
        top: 10px;
    }
}

@media (min-width: 1200px) {
    .btn-action {
        bottom: 32px;
        left: 32px;
    }
}

@media (min-width: 768px) {
    .btn-action {
        width: 56px;
        height: 56px;
    }
}

/* Cookie */
#cc-main,
.cc_div *,
.cc_div :after,
.cc_div :before,
.cc_div :hover {
    font-family: 'Titillium Web' !important;
    --cc-font-family: 'Titillium Web' !important;
}

#cc-main .pm__badge, #cc-main a, #cc-main button, #cc-main input{
    font-family: 'Titillium Web' !important;
}

.cc_div .c-bn {
    font-size: 1em !important;
}

#c-txt {
    font-size: 1 !important;
}

/* Rimuovo bandiera da leaflet*/
.leaflet-control-attribution.leaflet-control svg.leaflet-attribution-flag{
    display: none !important;
}

/* Datepicker full width */
input[type=date],
input[type=datetime-local],
input[type=time] {
    display: block !important;
    width: 100% !important;
}

/* Stili per i termini delle tassonomie nei risultati di ricerca */
.search-matching-terms {
    font-size: 0.875rem;
}

.search-matching-terms .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background-color: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #dee2e6;
}

.search-matching-terms .badge:hover {
    background-color: #e9ecef !important;
    color: #212529 !important;
}

/* Stili per i termini nelle ricerche live */
.search-matching-terms-live {
    margin-top: 0.25rem;
}

.search-matching-terms-live .search-matching-terms {
    margin-top: 0;
}

.search-matching-terms-live .badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    margin-right: 0.25rem;
    margin-bottom: 0.125rem;
}

/* Responsive per i termini delle tassonomie */
@media (max-width: 768px) {
    .search-matching-terms .badge {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.375rem;
    }
    
    .search-matching-terms-live .badge {
        font-size: 0.5625rem;
        padding: 0.0625rem 0.25rem;
    }
}

/* Stili per l'indicatore visivo dei post trovati tramite tassonomia */
.it-card-title .badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    vertical-align: middle;
}

.autocomplete-list-text .badge {
    font-size: 0.5625rem;
    padding: 0.0625rem 0.25rem;
    vertical-align: middle;
}

/* Hover effect per i badge */
.search-matching-terms .badge:hover,
.it-card-title .badge:hover,
.autocomplete-list-text .badge:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}

/* Stili per i media associati nei risultati di ricerca */
.search-matching-media {
    font-size: 0.875rem;
}

.search-matching-media .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background-color: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #dee2e6;
}

.search-matching-media .badge:hover {
    background-color: #e9ecef !important;
    color: #212529 !important;
}

/* Stili per i media nelle ricerche live */
.search-matching-media-live {
    margin-top: 0.25rem;
}

.search-matching-media-live .search-matching-media {
    margin-top: 0;
}

.search-matching-media-live .badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    margin-right: 0.25rem;
    margin-bottom: 0.125rem;
}

/* Responsive per i media associati */
@media (max-width: 768px) {
    .search-matching-media .badge {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.375rem;
    }
    
    .search-matching-media-live .badge {
        font-size: 0.5625rem;
        padding: 0.0625rem 0.25rem;
    }
}

/* Stili per i post meta nei risultati di ricerca */
.search-matching-postmeta {
    font-size: 0.875rem;
}

.search-matching-postmeta .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background-color: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffeaa7;
}

.search-matching-postmeta .badge:hover {
    background-color: #ffeaa7 !important;
    color: #6c5ce7 !important;
}

/* Stili per i post meta nelle ricerche live */
.search-matching-postmeta-live {
    margin-top: 0.25rem;
}

.search-matching-postmeta-live .search-matching-postmeta {
    margin-top: 0;
}

.search-matching-postmeta-live .badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    margin-right: 0.25rem;
    margin-bottom: 0.125rem;
}

/* Responsive per i post meta */
@media (max-width: 768px) {
    .search-matching-postmeta .badge {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.375rem;
    }
    
    .search-matching-postmeta-live .badge {
        font-size: 0.5625rem;
        padding: 0.0625rem 0.25rem;
    }
}

@media (min-width: 1200px) {
    .back-to-top.left {
        left: 32px !important;
        right: auto !important;
    }
}

.back-to-top.left {
    left: 16px !important;
    right: auto !important;
}

/* Sposta back-to-top a sinistra quando il chatbot è attivo (evita sovrapposizione).
   Il posizionamento NON dipende da .back-to-top-show: altrimenti, alla rimozione
   della classe (chiusura), il bottone tornerebbe a destra durante la transizione
   facendo "chiudere" l'animazione in basso a destra invece che a sinistra. */
body:has(#h2o-chatbot) .back-to-top {
    left: 16px !important;
    right: auto !important;
}

@media (min-width: 1200px) {
    body:has(#h2o-chatbot) .back-to-top {
        left: 32px !important;
        right: auto !important;
    }
}

/* Gallery lightbox fullscreen */
.gallery-lightbox-trigger {
    display: block;
    cursor: pointer;
    line-height: 0;
}

.gallery-lightbox-trigger:focus-visible {
    outline: 2px solid var(--bs-primary, #0066cc);
    outline-offset: 2px;
}

.gallery-lightbox-modal .modal-content {
    background-color: rgba(0, 0, 0, 0.95);
    border: 0;
}

.gallery-lightbox-modal .modal-header {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 1rem;
}

.gallery-lightbox-modal .modal-body {
    min-height: 100vh;
}

.gallery-lightbox-modal .gallery-lightbox-carousel {
    position: relative;
}

.gallery-lightbox-modal .splide__arrows {
    display: none !important;
}

.gallery-lightbox-modal .gallery-lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 3rem 1rem 1rem;
}

.gallery-lightbox-modal .gallery-lightbox-image {
    max-height: 75vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.gallery-lightbox-modal .gallery-lightbox-caption {
    color: #fff;
    max-width: 48rem;
}

.gallery-lightbox-modal .gallery-lightbox-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.5rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.gallery-lightbox-modal .gallery-lightbox-nav,
.gallery-lightbox-modal .gallery-lightbox-autoplay {
    pointer-events: all;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    padding: 0;
}

.gallery-lightbox-modal .gallery-lightbox-nav:hover,
.gallery-lightbox-modal .gallery-lightbox-autoplay:hover {
    background: rgba(0, 102, 204, 0.85);
    border-color: rgba(255, 255, 255, 0.85);
}

.gallery-lightbox-modal .gallery-lightbox-nav:focus-visible,
.gallery-lightbox-modal .gallery-lightbox-autoplay:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.gallery-lightbox-modal .gallery-lightbox-autoplay {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.gallery-lightbox-modal .splide__toggle__pause {
    display: none;
}

.gallery-lightbox-modal .splide__toggle.is-active .splide__toggle__play,
.gallery-lightbox-modal .splide__toggle[aria-pressed="true"] .splide__toggle__play {
    display: none;
}

.gallery-lightbox-modal .splide__toggle.is-active .splide__toggle__pause,
.gallery-lightbox-modal .splide__toggle[aria-pressed="true"] .splide__toggle__pause {
    display: block;
}

.gallery-lightbox-modal .splide__toggle__play,
.gallery-lightbox-modal .splide__toggle__pause {
    width: 0;
    height: 0;
}

.gallery-lightbox-modal .splide__toggle__play {
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent #fff;
    margin-left: 3px;
}

.gallery-lightbox-modal .splide__toggle__pause {
    width: 4px;
    height: 16px;
    box-shadow: 6px 0 0 #fff, -6px 0 0 #fff;
}

.gallery-lightbox-modal .splide__pagination {
    bottom: 1rem;
}

.gallery-lightbox-modal .splide__pagination__page {
    background: rgba(255, 255, 255, 0.45);
}

.gallery-lightbox-modal .splide__pagination__page.is-active {
    background: #fff;
}

@media (min-width: 768px) {
    .gallery-lightbox-modal .gallery-lightbox-controls {
        padding: 0 1.5rem;
    }

    .gallery-lightbox-modal .gallery-lightbox-nav,
    .gallery-lightbox-modal .gallery-lightbox-autoplay {
        width: 3.25rem;
        height: 3.25rem;
    }
}
