/*
 * edica.it static site - our style fixes on top of the theme (codes Cn/Dn/Mn: corrections made in the port),
 * loaded as the last stylesheet of <head> in every page.
 */

/* C1: Google Maps placeholder until the iubenda consent (same box as the 100% x 450 px iframe) */
.edica-map-wrap { position: relative; }
.edica-map-consent {
	position: absolute; top: 0; left: 0; width: 100%; height: 450px;
	display: flex; align-items: center; justify-content: center;
	box-sizing: border-box; padding: 20px;
	background: #f2f2f2; color: #313131; text-align: center;
}
.edica-map-consent-inner { max-width: 560px; }
.edica-map-consent p { margin: 0 0 18px; font-size: 15px; line-height: 1.6; }
.edica-map-consent p:last-child { margin-bottom: 0; }
.edica-map-consent .edica-map-consent-button { cursor: pointer; }
.edica-map-consent-alt a { text-decoration: underline; }
/* >= 1024 px the contact form box covers the lower 150 px of the map: centre the text in the visible part */
@media (min-width: 1024px) { .edica-map-consent { padding-bottom: 170px; } }

/* D11: link to the privacy policy in the consent checkbox text */
.dfd_acceptance_group .c_value a.edica-privacy-link { text-decoration: underline; }

/* D20: the "Search in archives" column is gone, the search column stays centred */
.container-shortcodes .columns.edica-search-only { float: none; margin-left: auto; margin-right: auto; }

/* a11y: visitors who ask the system for reduced motion get no parallax and no moving band
   (entrance animations and smooth wheel scroll: assets/js/fixes.js) */
@media (prefers-reduced-motion: reduce) {
	.dfd-row-bg-image.dfd_vertical_parallax,
	.dfd-row-bg-image.dfd_animated_bg { -webkit-transform: none !important; transform: none !important; }
}

/* Mobile: the slider title "Progettiamo e realizziamo" is one line, 392 px wide at the 27 px the slider gives it on
   phones, so below 390 px it was cut on both sides (on the WordPress site too). Scale it with the viewport so it
   always fits with 12 px per side (320 px -> ~20 px); from 390 px up nothing changes. */
@media (max-width: 389px) {
	#slider-1-slide-1-layer-1 { font-size: calc((100vw - 24px) / 14.6) !important; }
}

/* M1: the consent text toggles its checkbox (assets/js/fixes.js) */
.checkboxgroup .c_value { cursor: pointer; }

/* Contact form: the theme marks an invalid field with .field_error, but its rule only recolours a border this form
   style does not draw, so invalid fields were not highlighted (also on the WordPress site). Same red as the theme. */
.wpcf7 form.dfd_contact_form .field_error input[type="text"],
.wpcf7 form.dfd_contact_form .field_error textarea { box-shadow: inset 0 0 0 2px #f67066 !important; }
.wpcf7 form.dfd_contact_form .field_error .c_value,
.wpcf7 form.dfd_contact_form .field_error .c_value a { color: #f67066; }
