/*
Theme Name:   Design Comuni Italia Child
Description:  Tema Child per Design Comuni Italia, il tema di WordPress per i siti dei Comuni Italiani. Rispetta le linee guida di design dell’Agenzia per l’Italia digitale rilasciate dal Team per la Trasformazione Digitale. Utilizza Bootstrap Italia. Sviluppato da Boxxapps
Author:       Boxxapps
Template:     design-comuni-wordpress-theme
Version:      1.2.0
License:      AGPL 3.0 or later
Text Domain:  design_comuni_italia
*/

/*------------------------------------------
            STILI EXTRA
--------------------------------------------*/

.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. */
}


.bx-shadow-sm {
	box-shadow: 0.1rem 0.20rem 0.15rem rgba(0, 0, 0, .090) !important;
}

.bx-border-light {
	border: solid 1px #eee !important;
}

.card-text p {
	font-size: 0.9rem !important;
	color: #191919 !important;

	/* Permette il ritorno a capo normale */
	white-space: normal !important;

	/* Gestione delle parole lunghe (es. indirizzi o link) */
	overflow-wrap: anywhere;
	word-wrap: break-word;

	/* Evita che le parole normali vengano spezzate a metà */
	word-break: normal;
	hyphens: none;
}

/* Applica la stessa logica ai link dentro i paragrafi */
.card-text p a {
	display: inline-block;
	/* Aiuta il wrapping nei link */
	max-width: 100%;
	/* Impedisce al link di superare il genitore */
	overflow-wrap: anywhere;
}

ul.column-3 {
	column-count: 3;
	column-width: 200px;
}

.img-cover-h450 {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
}

.alert-gialla {
	background-color: #f8c22e !important;
}

.alert-arancione {
	background-color: #f8931c !important;
}

.alert-arancione a,
.alert-gialla a {
	color: #161616 !important;
}

.alert-rossa {
	background-color: #b10707 !important;
	color: #fff !important;
}

.alert-rossa a {
	color: #fff !important;
}

.alert-image {
	width: 64px;
	height: 64px;
}

.alert-image img {
	width: 56px;
	height: 56px;
}

.cmp-list-card-img-hr .img-fluid.img-responsive {
	width: 100%;
	height: 100%;
	-o-object-fit: cover;
	object-fit: cover;
}

@media (max-width: 991.8px) {
	.cmp-list-card-img-hr .img-fluid.img-responsive.rounded-top {
		border-top-right-radius: 4px !important;
		border-bottom-right-radius: 4px !important;
		border-top-left-radius: unset !important;
		max-height: 160px;
	}
}

@media (min-width: 768px) {
	.cmp-list-card-img-hr .img-fluid.img-responsive {
		height: auto;
		max-height: 160px;
	}

}

.btn-outline-msg-white {
	color: white !important;
	border: solid 2px white !important;
}

.btn-outline-msg-white:hover {
	color: black !important;
	background-color: white !important;
}

.btn-outline-msg-black {
	color: black !important;
	border: solid 1px black !important;
}

.btn-outline-msg-black:hover {
	color: white !important;
	background-color: black !important;
}

/* 1. Assicuriamoci che di default l'invalid feedback nelle checkbox sia nascosto quando validato */
.was-validated fieldset.js-required-checkbox-group .invalid-feedback {
    display: none;
}

.was-validated fieldset.js-required-checkbox-group:has(input:invalid) .invalid-feedback {
    display: block !important; /* Forza la visualizzazione rispetto alle regole native */
    color: #d9364f;            /* Colore errore Design Comuni (text-danger) */
    font-size: 0.875rem;       /* Dimensione feedback standard */
    margin-top: 5px;           /* Spaziatura superiore */
}

/* 3. Spaziatura per i bottoni nella schermata di successo */
.style-gap-3 { 
	gap: 1rem; 
}

/* --------------------------------------
    MODIFICHE AGLI STILI ORIGINALI 
tema child viene caricato dopo tema principale, per la regola cascading di css viene considerato l'ultima classe caricata
-----------------------------------------*/

.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	transform-origin: 0 0;
	/**/
}

/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	user-select: none;
}

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.7);
	margin: 0;
	display: none;
}

/*positio e z-index evitano che l'elemento sotto si sovrapponga e impedisca di premere sui bottoni degli avvisi*/
.home-message.red,
.home-message.red .msg svg {
	background-color: #d1344c;
	color: #fff !important;
	fill: #fff !important;
	position: relative;
	z-index: 1000;
}

.home-message.purple,
.home-message.purple .msg svg {
	background-color: #b21dd0;
	color: #fff !important;
	fill: #fff !important;
	position: relative;
	z-index: 1000;
}

.home-message.green,
.home-message .msg svg {
	background-color: #0e8a5f;
	color: #fff !important;
	fill: #fff !important;
	position: relative;
	z-index: 1000;
}

.home-message.blue,
.home-message.blue .msg svg {
	background-color: #0d00ff;
	color: #fff !important;
	fill: #fff !important;
	position: relative;
	z-index: 1000;
}

.home-message.yellow,
.home-message.yellow .msg svg {
	background-color: #ffcc00;
	color: #333 !important;
	fill: #333 !important;
	position: relative;
	z-index: 1000;
}

.home-message.orange,
.home-message.orange .msg svg {
	background-color: #FF8000;
	color: #333 !important;
	fill: #333 !important;
	position: relative;
	z-index: 1000;
}

.btn-primary.focus,
.btn-primary:focus {
	box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, .15), 0 1px 1px rgba(0, 0, 0, .075), 0 0 0 .25rem rgba(0, 122, 82, .5);
	outline: 2px solid #005a3c;
}

@media(min-width:576px) {

	body dl,
	body ol,
	body p,
	body ul {
		font-size: 1rem;
	}
}