/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ==========================================================================
   Fluent Forms (moved from Customizer > Additional CSS, 2026-11-12)
   ========================================================================== */

/*
 * Colors for the information request form (Fluent Form 1), which sits on the
 * burgundy sections of Contatti and Iscrizioni. Scoped to that form (a11y #10):
 * as global `.fluentform` rules they would make the labels of any future form
 * on a light background white on white.
 */

/*
 * Links inside the form (privacy policy, terms and conditions) and required
 * asterisks: light gold of the palette (#e7d0a2). The original #d4af37 was
 * 4.43:1 on the Contatti burgundy (#822433), below 4.5:1 (a11y #12).
 */
.fluentform_wrapper_1 a {
	color: #e7d0a2 !important;
	text-decoration: underline;
}

/* Required field asterisks: Fluent draws them as `label::after` in red
   (#f56c6c), 3.3:1 on the Contatti burgundy. The selectors that came from the
   Customizer never matched that pseudo-element. */
.fluentform_wrapper_1 .ff-el-is-required label::after,
.fluentform_wrapper_1 .ff-el-input-label.ff-el-is-required::after,
.fluentform_wrapper_1 .ff-required-asterisk {
	color: #e7d0a2 !important;
}

/* Labels and texts above the fields */
.fluentform_wrapper_1 label,
.fluentform_wrapper_1 .ff-el-input-label,
.fluentform_wrapper_1 .ff-el-input-label label,
.fluentform_wrapper_1 .ff-el-form-check-label,
.fluentform_wrapper_1 .ff-el-group label,
.fluentform_wrapper_1 .ff-el-group .ff-el-input-label-container {
	color: #ffffff !important;
}

/* Success message: it inherits the dark body text, unreadable on the burgundy
   (Contatti) and dark (Iscrizioni) backgrounds. */
.fluentform_wrapper_1 .ff-message-success {
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.6);
	box-shadow: none;
}

/* Validation errors: Fluent's #f56c6c is 3.2:1 on the Contatti burgundy;
   #ffc9c9 is 6.4:1 on #822433 and 11.9:1 on #1c1a19. */
.fluentform_wrapper_1 .error.text-danger,
.fluentform_wrapper_1 .ff-errors-in-stack .error {
	color: #ffc9c9 !important;
}

/* Checkboxes at 24x24 px (target size) */
.fluentform input[type="checkbox"] {
	width: 24px !important;
	height: 24px !important;
	min-width: 24px !important;
	min-height: 24px !important;
	cursor: pointer;
	vertical-align: middle;
}

/* Alignment and spacing of the consent labels (GDPR / T&C) */
.fluentform .ff-el-form-check-label,
.fluentform .ff-el-form-check-label span {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	font-size: 1rem;
	cursor: pointer;
}

/* Force 24x24 px on custom checkbox/radio styles too */
.fluentform .ff-el-form-check-input {
	width: 24px !important;
	height: 24px !important;
}

/* ==========================================================================
   Accessibility fixes (see a11y/a11y-audit.md in the project folder)
   ========================================================================== */

/*
 * a11y #2 - Focus indicator visible on any background (WCAG 2.4.7 / 1.4.11).
 * Blocksy draws the ring with palette color 1, which matches the burgundy and
 * gold backgrounds (1:1 to 2.2:1). Two adjacent bands, white inside and dark
 * outside: whatever the background, at least one of them exceeds 3:1.
 * Selectors are listed in full (no :where(), it would lose on specificity) and
 * use !important because Blocksy and the plugins set box-shadow: none on focus.
 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible,
.ct-menu-link:focus-visible,
.gspb-buttonbox:focus-visible,
.ff-btn-submit:focus-visible,
.fluentform input[type="checkbox"]:focus-visible,
.swp-bs .swp-form input:focus-visible,
.swp-bs .swp-form .field-submit:focus-visible {
	outline: 2px solid #ffffff !important;
	outline-offset: 0 !important;
	box-shadow: 0 0 0 4px #121519 !important;
}

/*
 * a11y #3 - Parvus gallery lightbox, dark theme (the previous SimpleLightbox
 * overlay was dark). Parvus declares its variables on :root; setting them on the
 * dialog itself wins regardless of stylesheet order. Gold buttons with dark icons
 * keep both the icon (>4.5:1) and the button shape (>3:1) readable on the dark
 * background.
 */
.parvus {
	--parvus-background-color: #121519;
	--parvus-color: #ffffff;
	--parvus-caption-color: #ffffff;
	--parvus-btn-background-color: #e7d0a2;
	--parvus-btn-color: #121519;
	--parvus-btn-hover-background-color: #ffffff;
	--parvus-btn-hover-color: #121519;
	--parvus-btn-disabled-background-color: #e7d0a299;
	--parvus-btn-disabled-color: #121519;
	--parvus-loader-background-color: #121519;
	--parvus-loader-color: #ffffff;
	--parvus-loading-error-background-color: #121519;
	--parvus-loading-error-color: #ffffff;
}

/*
 * a11y #5 - "Richiedi informazioni" button in the mobile menu (WCAG 1.4.3).
 * The header button is a ghost button in palette color 2 (#822433): fine on the
 * white header, 1.96:1 on the dark off-canvas panel. Inside the panel only, use
 * the gold of the menu links (about 13:1 on #121519); hover fills it gold with
 * dark text.
 */
#offcanvas [data-id="button"] {
	--theme-button-background-initial-color: #e7d0a2;
	--theme-button-background-hover-color: #e7d0a2;
}

/* Blocksy sets the hover text color (white) on the button itself, so it has to
   be overridden there, not inherited from the wrapper. */
#offcanvas [data-id="button"] .ct-button-ghost {
	--theme-button-text-hover-color: #121519;
}

/*
 * a11y #5 - Current page and hover in the mobile menu (WCAG 1.4.3).
 * They inherit the link hover/active color, palette color 2 (#822433), which
 * is 1.96:1 on the dark panel. White instead (about 18:1), with an underline
 * so the current page does not rely on color alone.
 */
#offcanvas [data-id="mobile-menu"] {
	--theme-link-hover-color: #ffffff;
	--theme-link-active-color: #ffffff;
}

#offcanvas [data-id="mobile-menu"] .current-menu-item > .ct-menu-link {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/*
 * a11y #7 - Breadcrumb links on hover (WCAG 1.4.3).
 * The GreenShift breadcrumb sits on the burgundy hero (#6a1e2b) with gold links;
 * on hover the global `a:hover` turns them palette color 2 (#822433): 1.23:1.
 * White with an underline instead (about 13:1), also for keyboard focus.
 */
.gspb-breadcrumbs a:hover,
.gspb-breadcrumbs a:focus-visible {
	color: #ffffff;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/*
 * Footer links: underline on hover and keyboard focus, so the state does not rely
 * on the color change alone (white <-> gold #e7d0a2 on #822433, both >= 6.2:1).
 */
footer a:hover,
footer a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/*
 * Breadcrumb as an APG list (inc/breadcrumbs.php): the GreenShift block styles
 * the wrapper as a flex row; the list and its items take over that layout.
 */
.gspb-breadcrumbs__list,
.gspb-breadcrumbs__list li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * a11y #8 - Form text follows the browser font size (WCAG 1.4.4).
 * Blocksy sets `label { font-size: 15px }` (main.min.css, loaded after this
 * file: `body label` wins on specificity) and form controls use
 * `var(--theme-form-font-size, 16px)` with the variable never defined.
 * Field heights come from the Customizer in px (45px, textarea 100px) and would
 * clip the larger text: same values in rem.
 * Same sizes at the default 16px root, in rem. Keep aligned with the Customizer.
 */
:root {
	--theme-form-font-size: 1rem;
	--theme-form-field-height: 2.8125rem;
}

body form textarea {
	--theme-form-field-height: 6.25rem;
}

body label {
	font-size: 0.9375rem;
}
