/*
 * Associazione Semplice — front-end.
 * Eredita font, dimensioni e colori del tema. Il colore d'accento segue il colore Primario di Elementor o "primary" del tema a blocchi
 * (--wp--preset--color--primary) e si può cambiare da CSS: .asemf { --asemf-accent: #c0392b; }
 * Il layout esterno (colonne, spazi, sfondi) lo decide il builder (Gutenberg, Elementor).
 */
.asemf {
	--asemf-accent: var(--e-global-color-primary, var(--wp--preset--color--primary, #2271b1));
	--asemf-accent-text: var(--wp--preset--color--base, #fff);
	--asemf-accent-2: var(--e-global-color-secondary, var(--asemf-accent));
	--asemf-line: rgba(127, 127, 127, .28);
	--asemf-soft: rgba(127, 127, 127, .08);
	--asemf-radius: 10px;
	--asemf-ok: #1e7b34;
	--asemf-warn: #a56a00;
	--asemf-bad: #b32d2e;
	font: inherit;
	color: inherit;
	line-height: 1.5;
	margin: 1.25em 0;
}
.asemf *, .asemf *::before, .asemf *::after { box-sizing: border-box; }
.asemf h3, .asemf h4 { margin: 0 0 .5em; line-height: 1.25; }
.asemf p { margin: .5em 0; }
.asemf-small { font-size: .875em; }
.asemf-muted { opacity: .72; }
.asemf-good { color: var(--asemf-ok); font-weight: 600; }
.asemf-warn { color: var(--asemf-warn); font-weight: 600; }
.asemf-bad { color: var(--asemf-bad); font-weight: 600; }

/* Struttura */
.asemf-area { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.asemf-hello { font-size: 1.1em; margin-bottom: .75rem; }
.asemf-section { border: 1px solid var(--asemf-line); border-radius: var(--asemf-radius); padding: 1rem 1.25rem; box-sizing: border-box; max-width: 100%; min-width: 0; }
.asemf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.asemf-card { border: 1px solid var(--asemf-line); border-radius: var(--asemf-radius); padding: 1rem 1.25rem; background: var(--asemf-soft); }
.asemf-card h3 { margin-top: .4em; }
.asemf-details { margin-top: .75rem; }
.asemf-details > summary { cursor: pointer; font-weight: 600; }

/* Etichette */
.asemf-badge { display: inline-block; font-size: .78em; padding: .1em .6em; border-radius: 999px; border: 1px solid var(--asemf-line); }
.asemf-badge-ok { color: var(--asemf-ok); border-color: currentColor; }
.asemf-badge-bad { color: var(--asemf-bad); border-color: currentColor; }

/* Tessera digitale */
.asemf-memcard { border-radius: 14px; padding: 1.25rem 1.5rem; max-width: 420px; color: var(--asemf-accent); background: #fff; border: 2px solid var(--asemf-accent); border-top: 8px solid var(--asemf-accent-2); position: relative; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.asemf-memcard-logo { display: block; max-height: 52px; max-width: 190px; width: auto; height: auto; margin: 0 0 .6rem; }
.asemf-memcard-assoc { font-size: .85em; text-transform: uppercase; letter-spacing: .08em; }
.asemf-memcard-name { font-size: 1.5em; font-weight: 700; margin-top: .35em; }
.asemf-memcard-type { opacity: .9; }
.asemf-memcard-data { display: flex; gap: 2rem; margin: 1rem 0 .75rem; }
.asemf-memcard-data dt { font-size: .75em; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.asemf-memcard-data dd { margin: 0; font-size: 1.25em; font-weight: 600; }
.asemf-memcard .asemf-badge { background: #fff; }
.asemf-memcard .asemf-badge-ok { color: var(--asemf-ok); }
.asemf-memcard .asemf-badge-bad { color: var(--asemf-bad); }
.asemf-memcard .asemf-small { color: var(--asemf-accent); opacity: .8; }
.asemf-print-wrap { margin: .6rem 0 0; }
/* Stampa della tessera: solo la tessera, in alto a sinistra, larga come una tessera */
@media print {
	body.asemf-printing * { visibility: hidden !important; }
	body.asemf-printing .asemf-memcard, body.asemf-printing .asemf-memcard * { visibility: visible !important; }
	body.asemf-printing .asemf-memcard { position: fixed; left: 0; top: 0; width: 90mm; max-width: none; margin: 0; box-shadow: none; }
	body.asemf-printing .asemf-memcard-img { width: var(--asemf-card-w, 8.56cm); max-width: none; }
	body.asemf-printing .asemf-memcard .asemf-btn { display: none !important; }
	body.asemf-printing .asemf-memcard-qr .asemf-small { display: none !important; } /* sulla tessera stampata resta solo il codice, senza le istruzioni */
}

/* Elenchi e tabelle */
.asemf-list { list-style: none; margin: .5rem 0; padding: 0; }
.asemf-list > li { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; padding: .6rem 0; border-top: 1px solid var(--asemf-line); }
.asemf-list > li:first-child { border-top: 0; }
.asemf-evt { font-weight: 700; }
.asemf-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.asemf-table-wrap { overflow-x: auto; }
.asemf-table { width: 100%; border-collapse: collapse; }
.asemf-table th, .asemf-table td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--asemf-line); vertical-align: top; }
.asemf-dl { display: grid; gap: .25rem; margin: 0 0 .5rem; }
.asemf-dl > div { display: flex; gap: .75rem; }
.asemf-dl dt { font-weight: 600; min-width: 5em; }
.asemf-dl dd { margin: 0; }

/* Moduli e pulsanti (se il tema li stila già tramite .wp-element-button, resta quello) */
.asemf-form { margin: .5rem 0; }
.asemf-inline { display: inline-flex; gap: .4rem; align-items: center; margin: 0; flex-wrap: wrap; }
.asemf-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin-bottom: .75rem; }
.asemf-fields label { display: grid; gap: .25rem; font-weight: 600; }
.asemf input[type="text"], .asemf input[type="email"], .asemf input[type="password"], .asemf select {
	width: 100%; font: inherit; color: inherit; padding: .45em .6em; border: 1px solid var(--asemf-line); border-radius: 6px; background: transparent;
}
.asemf-inline select { width: auto; }
.asemf .asemf-btn { cursor: pointer; font: inherit; padding: .45em 1em; border-radius: 6px; border: 1px solid var(--asemf-accent); background: var(--asemf-accent); color: var(--asemf-accent-text); text-decoration: none; display: inline-block; }
.asemf .asemf-btn.wp-element-button { font: inherit; }
.asemf .asemf-btn:hover { filter: brightness(.92); }
.asemf-inline .asemf-btn { padding: .25em .75em; font-size: .9em; }

/* Avvisi e riquadro "contenuto riservato" */
.asemf-notice { padding: .75rem 1rem; border-radius: 8px; border: 1px solid var(--asemf-line); margin-bottom: 1rem; }
.asemf-notice.asemf-ok { border-color: var(--asemf-ok); color: var(--asemf-ok); }
.asemf-notice.asemf-err { border-color: var(--asemf-bad); color: var(--asemf-bad); }
.asemf-gate { border: 1px dashed var(--asemf-line); border-radius: var(--asemf-radius); padding: 1rem 1.25rem; background: var(--asemf-soft); text-align: center; }
.asemf-gate-text { font-weight: 600; margin-top: 0; }
.asemf #loginform p { margin: .6em 0; }
.asemf #loginform label { display: block; font-weight: 600; margin-bottom: .2em; }

@media (max-width: 600px) {
	.asemf-memcard-data { gap: 1rem; }
	.asemf-list > li { align-items: flex-start; }
}
.asemf-manage { flex-basis: 100%; }

/* Pagamenti online */
.asemf-payrow { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.asemf-paytotal { font-size: 1.15em; margin: .75rem 0; }
.asemf-paylist > li { align-items: flex-start; }
.asemf-docs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.asemf-shot { cursor: pointer; display: inline-block; }
.asemf-doc-info { margin-left: 4px; }
.asemf-expenses h4 { margin: 18px 0 6px; }
.asemf-memcard-qr { margin-top: 14px; text-align: center; }
.asemf-memcard-qr .asemf-qr-note { display: block; max-width: 30ch; margin: .6rem auto 0; text-align: center; line-height: 1.4; }
.asemf-memcard-qr .asemf-qr-note span, .asemf-memcard-qr .asemf-qr-note a { display: block; }
.asemf-memcard-qr svg { width: 170px; height: 170px; max-width: 100%; background: #fff; border-radius: 8px; }
.asemf-wallet { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.asemf-wallet .asemf-btn { text-decoration: none; }
.asemf-checkin-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.asemf-search { flex: 1 1 180px; min-width: 0; }
.asemf-chip { border: 1px solid currentColor; background: transparent; border-radius: 999px; padding: 4px 12px; cursor: pointer; font: inherit; opacity: .7; }
.asemf-chip.is-on { opacity: 1; font-weight: 600; }
.asemf-counts { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.asemf-scan-video { width: 100%; max-width: 360px; border-radius: 10px; display: block; margin: 8px 0; }
.asemf-booked[hidden] { display: none; }
.asemf-checkin-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.asemf-scan-form { display: none; }

/* Ingresso sul posto e cassa per più soci (staff): un campo per riga */
.asemf-door label, .asemf-door-group label { display: block; margin: 8px 0; }
.asemf-door select, .asemf-door-group select { width: 100%; max-width: 100%; }
.asemf-door details, .asemf-door-group { margin-top: 14px; }
.asemf-door > summary, .asemf-door-group > summary { cursor: pointer; padding: 6px 0; }

/* Pagamento con bonifico */
.asemf-bank { margin-top: 1rem; padding: .9rem 1rem; border: 1px solid var(--asemf-line); border-radius: 10px; }
.asemf-bank h4 { margin: 0 0 .5rem; }
.asemf-bank-acc { margin: .5rem 0 .75rem; }
.asemf-bank-data { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin: .35rem 0; }
.asemf-bank-data dt { font-size: .75em; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.asemf-bank-data dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.asemf-iban { font-size: 1.05em; }
.asemf-copy { margin-left: .4rem; padding: .1em .6em; font-size: .8em; border: 1px solid var(--asemf-line); border-radius: 999px; background: transparent; cursor: pointer; }
.asemf-bank-form { margin-top: .5rem; }

/* Tessera su immagine propria: i dati sono posizionati sopra l'immagine, in percentuale (si ridimensiona da sola, anche in stampa) */
.asemf-memcard-img { padding: 0; border: 0; background: none; position: relative; width: 100%; max-width: calc(var(--asemf-card-px, 640) * 1px); container-type: inline-size; line-height: 1.15; overflow: hidden; border-radius: 14px; box-sizing: border-box; }
.asemf-memcard-img.asemf-card-plain { background: #fff; border: 2px solid var(--asemf-accent); border-top: 8px solid var(--asemf-accent-2); }
.asemf-card-logo { height: auto; display: block; }
.asemf-card-bg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.asemf-card-f { position: absolute; white-space: nowrap; font-weight: 600; }
.asemf-card-qr { line-height: 0; background: #fff; padding: .4cqw; border-radius: 1cqw; }
.asemf-card-qr svg { width: 100%; height: auto; background: #fff; border-radius: 0; max-width: none; }

/* Area soci con menu laterale: «Il mio spazio» e, per chi ha il ruolo, Segreteria e gestione di corsi ed eventi */
.asemf-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.asemf-layout.asemf-nonav { grid-template-columns: minmax(0, 1fr); }
.asemf-sidenav { position: sticky; top: 1rem; }
.asemf-sidenav ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--asemf-line); border-radius: var(--asemf-radius); overflow: hidden; }
.asemf-sidenav li + li { border-top: 1px solid var(--asemf-line); }
.asemf-sidenav a { display: block; padding: .6rem .9rem; text-decoration: none; color: inherit; }
.asemf-sidenav a:hover { background: var(--asemf-soft); }
.asemf-sidenav a.is-active { background: var(--asemf-accent); color: #fff; font-weight: 600; }
@media (max-width: 700px) {
	.asemf-layout { grid-template-columns: minmax(0, 1fr); }
	.asemf-sidenav { position: static; }
	.asemf-sidenav ul { display: flex; flex-wrap: wrap; }
	.asemf-sidenav li + li { border-top: 0; border-left: 1px solid var(--asemf-line); }
}
.asemf-memcard-roles { font-size: .9em; opacity: .9; margin-top: .2em; }
.asemf-memcard-text { font-size: .9em; margin-top: .4em; font-style: italic; }

/* Convenzioni */
.asemf-conv-filter { margin: .5rem 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.asemf-conv-list > li { display: block; }
.asemf-conv-head { display: flex; gap: .8rem; align-items: flex-start; }
.asemf-conv-logo { width: 56px; height: 56px; object-fit: contain; flex: 0 0 auto; border-radius: 6px; background: #fff; }
.asemf-conv-code { font-size: 1.15em; letter-spacing: .04em; }

/* Telefono: barra di salto alle sezioni, invito all'app e tocchi da 44 px */
.asemf-jump { display: none; min-width: 0; max-width: 100%; }
.asemf-tip { border: 1px solid var(--asemf-accent); border-radius: var(--asemf-radius); background: var(--asemf-soft); padding: .8rem 1.1rem; margin: 1rem 0; }
.asemf-tip p { margin: 0 0 .5rem; }
.asemf-tip .asemf-tip-actions { margin: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.asemf-tip[hidden], .asemf-tip [hidden] { display: none; }
.asemf-section[id] { scroll-margin-top: calc(var(--asemf-off, 0px) + .75rem); }
@media (max-width: 700px) {
	.asemf-jump { display: block; position: sticky; top: 0; z-index: 20; margin: 0 -1px 1rem; background: var(--asemf-bg, #fff); border-bottom: 1px solid var(--asemf-line); }
	.asemf-jump ul { display: flex; gap: .5rem; list-style: none; margin: 0; padding: .5rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.asemf-jump ul::-webkit-scrollbar { display: none; }
	.asemf-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px solid var(--asemf-line); border-radius: 999px; text-decoration: none; color: inherit; white-space: nowrap; }
	.asemf-jump a:active { background: var(--asemf-soft); }
	.asemf .asemf-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
	.asemf-area a, .asemf-section a, .asemf-section button { min-height: 44px; }
	.asemf-section a:not(.asemf-btn) { display: inline-flex; align-items: center; }
	.asemf-section p a:not(.asemf-btn), .asemf-section li a:not(.asemf-btn), .asemf-section dd a { display: inline; min-height: 0; padding: .6em 0; }
	.asemf-section input:not([type=checkbox]):not([type=radio]), .asemf-section select, .asemf-section textarea { min-height: 44px; font-size: 16px; } /* 16 px: iOS non zooma nei campi */
	.asemf-print-wrap { display: flex; gap: .5rem; flex-wrap: wrap; } .asemf-print-wrap .asemf-btn { flex: 1 1 100%; text-align: center; }
}

/* Pulsante secondario («Non ora», «Disattiva le notifiche»): contorno, non pieno, così il primario si distingue */
.asemf .asemf-btn.asemf-btn-ghost { background: transparent; color: var(--asemf-accent); }
.asemf .asemf-btn.asemf-btn-ghost:hover { background: var(--asemf-soft); filter: none; }

/* Telefono: la tabella delle attività diventa una scheda per riga (la colonna dei pagamenti non resta fuori schermo) */
@media (max-width: 600px) {
	.asemf-table-wrap { overflow-x: visible; }
	.asemf-table.asemf-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.asemf-table.asemf-stack, .asemf-table.asemf-stack tbody, .asemf-table.asemf-stack tr, .asemf-table.asemf-stack td { display: block; width: 100%; box-sizing: border-box; }
	.asemf-table.asemf-stack tr { border-bottom: 1px solid var(--asemf-line); padding: .6rem 0; }
	.asemf-table.asemf-stack td { border: 0; padding: .15rem 0; }
	.asemf-table.asemf-stack td.asemf-cell-main { font-weight: 600; font-size: 1.05em; }
	.asemf-table.asemf-stack td[data-label]::before { content: attr(data-label) ": "; color: var(--asemf-muted, #50575e); }
}

/* ==========================================================================
   Nuovo aspetto (docs/RESTYLE.md). Vale sempre (la vecchia grafica è stata tolta). :where() tiene la specificità
   di prima: i colori scelti in Aspetto (stile in linea) continuano a vincere.
   Il colore d'accento resta quello del sito; l'indaco serve solo se il sito non ne ha uno.
   ========================================================================== */
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('fonts/Montserrat-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url('fonts/Montserrat-Bold.woff2') format('woff2'); }

:where(body) .asemf {
	--asemf-accent: var(--e-global-color-primary, var(--wp--preset--color--primary, #1F218C));
	--asemf-radius: 16px;
	--asemf-ink: #181A2E;
	--asemf-muted: #5D6078;
	--asemf-line: #E2E5EE;
	--asemf-ok: #3D6256;
	--asemf-warn: #6B4F00;
	--asemf-bad: #B42318;
}
:where(body) .asemf :focus-visible { outline: 2px solid var(--asemf-accent); outline-offset: 2px; }
:where(body) .asem-icon { width: 22px; height: 22px; flex: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Riquadri: carta bianca con il suo testo, leggibile su un sito chiaro o scuro */
:where(body) .asemf .asemf-section { background: #fff; color: var(--asemf-ink); border-color: var(--asemf-line); border-radius: 16px; }
:where(body) .asemf .asemf-card { background: #F5F6FA; color: var(--asemf-ink); border-color: var(--asemf-line); border-radius: 16px; }
:where(body) .asemf .asemf-section > h3, :where(body) .asemf .asemf-collapse > summary > h3 { font-family: Montserrat, system-ui, sans-serif; font-weight: 700; font-size: 1.15em; }
:where(body) .asemf .asemf-list > li { min-height: 56px; padding: .75rem 0; border-color: var(--asemf-line); }
:where(body) .asemf .asemf-table th, :where(body) .asemf .asemf-table td { border-color: var(--asemf-line); }

/* Pulsanti e campi */
:where(body) .asemf .asemf-btn { min-height: 44px; padding: 0 1.1em; border-radius: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
:where(body) .asemf .asemf-btn.asemf-btn-ghost { color: var(--asemf-accent); }
:where(body) .asemf input[type="text"], :where(body) .asemf input[type="email"], :where(body) .asemf input[type="password"], :where(body) .asemf select {
	min-height: 48px; padding: .5em .8em; border: 1px solid #8A8EA8; border-radius: 12px; background: #fff; color: var(--asemf-ink); font-size: 16px;
}
:where(body) .asemf input:focus, :where(body) .asemf select:focus { border-color: var(--asemf-accent); }
:where(body) .asemf-section a:not(.asemf-btn) { color: var(--asemf-accent); }

/* Stati: fondo chiaro, testo scuro, sempre con la parola */
:where(body) .asemf .asemf-badge { border: 0; padding: .15em .7em; font-weight: 600; background: #F5F6FA; color: var(--asemf-muted); }
:where(body) .asemf .asemf-badge-ok { background: #E6EFEB; color: #3D6256; }
:where(body) .asemf .asemf-badge-bad { background: #FDECEA; color: #B42318; }
:where(body) .asemf .asemf-notice { border-radius: 12px; border-color: var(--asemf-line); }
:where(body) .asemf .asemf-notice.asemf-ok { background: #E6EFEB; color: #3D6256; border-color: transparent; }
:where(body) .asemf .asemf-notice.asemf-err { background: #FDECEA; color: #B42318; border-color: transparent; }

/* Tessera: carta nel colore del sito (indaco se il sito non ne ha uno), testo a contrasto, QR su pannello bianco */
:where(body) .asemf .asemf-memcard:not(.asemf-memcard-img) {
	background: var(--asemf-accent); color: var(--asemf-accent-text); border: 0; border-radius: 24px; padding: 1.5rem 1.5rem 1.25rem; max-width: 440px;
}
:where(body) .asemf .asemf-memcard:not(.asemf-memcard-img) .asemf-small { color: inherit; opacity: .85; }
:where(body) .asemf .asemf-memcard:not(.asemf-memcard-img) .asemf-memcard-name { font-family: Montserrat, system-ui, sans-serif; font-weight: 700; font-size: 1.6em; }
:where(body) .asemf .asemf-memcard-qr svg { width: 200px; height: 200px; padding: 12px; border-radius: 16px; background: #fff; }

/* Telefono: barra in basso con le sezioni (icona e parola), al posto della barra di salto in alto */
@media (max-width: 700px) {
	:where(body) .asemf:has(.asemf-jump) { padding-bottom: 5.5rem; }
	:where(body) .asemf-jump {
		position: fixed; left: 0; right: 0; bottom: 0; top: auto !important; z-index: 9999; margin: 0; background: #fff; border-top: 1px solid #E2E5EE; border-bottom: 0;
		padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 20px rgba(24, 26, 46, .08);
	}
	:where(body) .asemf-jump ul { justify-content: space-around; gap: .25rem; padding: .35rem .5rem; }
	:where(body) .asemf-jump a {
		flex-direction: column; justify-content: center; gap: 2px; min-width: 64px; min-height: 52px; padding: .3rem .6rem; border: 0; border-radius: 12px;
		font-size: 12px; font-weight: 600; line-height: 1.2; color: #5D6078;
	}
	:where(body) .asemf-jump a:active, :where(body) .asemf-jump a:focus-visible { background: #F5F6FA; color: var(--asemf-accent, #1F218C); }
}
@media (prefers-reduced-motion: reduce) {
	:where(body) .asemf * { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
:where(body) .asemf .asemf-section:has(> .asemf-memcard:not(.asemf-memcard-img)) { background: transparent; border: 0; padding: 0; }

/* Pagina pubblica di un evento (PublicEvents): locandina, dati, descrizione e prenotazione. */
.asemf-event { max-width: 760px; margin: 0 auto; }
.asemf-event .asemf-poster { margin: 0 0 1.25rem; }
.asemf-event .asemf-poster img { display: block; width: 100%; height: auto; border-radius: 16px; }
.asemf-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin: 0 0 1.25rem; padding: 1rem 1.1rem; background: #F5F6FA; border-radius: 16px; }
.asemf-facts > div { margin: 0; }
.asemf-facts dt { font-size: .8em; text-transform: uppercase; letter-spacing: .04em; color: var(--asemf-muted, #5b6075); margin: 0 0 .15rem; }
.asemf-facts dd { margin: 0; font-weight: 600; }
.asemf-event-text { margin: 0 0 1.5rem; }
.asemf-event-h { margin: 1.5rem 0 .5rem; }
.asemf-ics { margin: 1rem 0 0; }

/* Elenco eventi a card, per mese */
.asemf-events .asemf-month { margin: 2rem 0 .75rem; font-size: 1.25rem; }
.asemf-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.asemf-cards > .asemf-card { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; padding: 1rem; border: 1px solid rgba(0,0,0,.1); border-radius: 16px; background: #fff; }
.asemf-cards > .asemf-card.has-poster { grid-template-columns: 64px 120px 1fr; }
.asemf-card-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 64px; border-radius: 12px; background: #f0f4ff; text-decoration: none; color: inherit; }
.asemf-card-day { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.asemf-card-mon { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.asemf-card-poster img { display: block; width: 100%; height: auto; border-radius: 10px; }
.asemf-card-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.asemf-card-title { margin: .15rem 0 .35rem; font-size: 1.15rem; }
.asemf-card-title a { text-decoration: none; }
.asemf-card-ex { margin: .5rem 0 0; }
.asemf-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .75rem; }
.asemf-card-price { font-weight: 600; }
@media (max-width: 600px) {
	.asemf-cards > .asemf-card, .asemf-cards > .asemf-card.has-poster { grid-template-columns: 56px 1fr; }
	.asemf-card-poster { grid-column: 1 / -1; grid-row: 2; }
	.asemf-card-body { grid-column: 1 / -1; }
}

/* Filtri e calendario mensile degli eventi */
.asemf-filters { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin: 0 0 1rem; }
.asemf-filter-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.asemf-chip { display: inline-block; padding: .35rem .8rem; border: 1px solid rgba(0,0,0,.15); border-radius: 999px; font-size: .875rem; text-decoration: none; color: inherit; }
.asemf-chip.is-on { background: #1f2a44; border-color: #1f2a44; color: #fff; }
.asemf-cal-nav, .asemf-list-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 0 .75rem; }
.asemf-cal-nav .asemf-month { margin: 0; }
.asemf-cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.asemf-cal th { padding: .4rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.asemf-cal td { height: 96px; padding: .3rem; vertical-align: top; border: 1px solid rgba(0,0,0,.08); }
.asemf-cal-out { background: rgba(0,0,0,.02); }
.asemf-cal-num { display: block; font-size: .8rem; opacity: .7; }
.asemf-cal-wd { display: none; }
.asemf-cal-day.is-today .asemf-cal-num { font-weight: 700; opacity: 1; }
.asemf-cal-ev { display: block; margin: .2rem 0 0; padding: .15rem .35rem; border-radius: 6px; background: #f0f4ff; font-size: .78rem; line-height: 1.25; text-decoration: none; color: inherit; }
.asemf-cal-time { font-weight: 600; }
@media (max-width: 700px) {
	.asemf-cal thead, .asemf-cal-out, .asemf-cal-empty { display: none; }
	.asemf-cal, .asemf-cal tbody, .asemf-cal tr, .asemf-cal td { display: block; width: 100%; }
	.asemf-cal td { height: auto; border: 0; border-bottom: 1px solid rgba(0,0,0,.08); padding: .6rem 0; }
	.asemf-cal-num { font-weight: 700; opacity: 1; font-size: 1rem; }
	.asemf-cal-wd { display: inline; text-transform: uppercase; font-size: .75rem; opacity: .7; }
}

/* Pagina evento: locandina accanto ai dati, condivisione, eventi correlati */
.asemf-event { max-width: 960px; }
.asemf-event-head.has-poster { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: 1.5rem; align-items: start; margin-bottom: 1.5rem; }
.asemf-event-head .asemf-poster { margin: 0; }
.asemf-event-head .asemf-facts { margin: 0; }
.asemf-share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.5rem 0; }
.asemf-share-label { font-weight: 600; margin-right: .25rem; }
@media (max-width: 700px) {
	.asemf-event-head.has-poster { grid-template-columns: 1fr; }
	.asemf-event-head .asemf-poster { max-width: 320px; }
}

/* Evento annullato */
.asemf-notice-cancelled { margin: 1.25rem 0; padding: .9rem 1.1rem; border-radius: 12px; background: #fdecea; color: #b42318; }

.asemf-grid .asemf-card-poster { display: block; margin-bottom: .6rem; }
.asemf-back { margin: 0 0 .8rem; }
.asemf-venue { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.2rem 0; padding: 1rem; border: 1px solid #dfe3ee; border-radius: 12px; }
.asemf-prevnext { display: flex; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid #dfe3ee; }
.asemf-prevnext span:last-child { text-align: right; }
.asemf-guest-details > summary { list-style: none; cursor: pointer; display: inline-block; margin-bottom: .8rem; }
.asemf-guest-details > summary::-webkit-details-marker { display: none; }
.asemf-more { margin: .8rem 0; }
.asemf-more > summary { cursor: pointer; font-weight: 600; }

/* Moduli pubblici (adesione, prenotazione ospiti) e area soci: anche Cellulare, Data di nascita, numeri e testi lunghi hanno lo stesso aspetto degli altri campi (16 px: iPhone non ingrandisce la pagina) */
.asemf-form input[type="tel"], .asemf-form input[type="date"], .asemf-form input[type="number"], .asemf-form input[type="url"], .asemf-form input[type="search"], .asemf-form input[type="time"], .asemf-form textarea {
	display: block; width: 100%; min-width: 0; min-height: 48px; font: inherit; font-size: 16px; color: var(--asemf-ink, inherit); padding: .5em .8em; border: 1px solid #8A8EA8; border-radius: 12px; background: #fff; text-align: left;
}
.asemf-form textarea { min-height: 96px; }
.asemf-form input:focus, .asemf-form select:focus, .asemf-form textarea:focus { border-color: var(--asemf-accent); }

/* Caselle di consenso: casella grande e tutta la riga si tocca */
.asemf-check { display: flex; gap: .75rem; align-items: flex-start; padding: .5rem 0; cursor: pointer; }
.asemf-check input { flex: none; width: 24px; height: 24px; margin: .1rem 0 0; }

/* «Apri e chiudi» facili da toccare */
.asemf-details > summary, .asemf-more > summary { padding: .6rem 0; min-height: 44px; }

/* «Esci» accanto al saluto */
.asemf-hello { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.asemf-logout { margin: 0; }
.asemf .asemf-logout .asemf-btn { min-height: 44px; padding: 0 1.1em; }

@media (max-width: 700px) {
	.asemf-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; font-size: 1rem; }
}

/* Sezioni richiudibili dell'area soci: il titolo è il pulsante che apre e chiude */
.asemf-collapse { margin-top: 0; }
.asemf-collapse > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; cursor: pointer; list-style: none; min-height: 44px; padding: 0; }
.asemf-collapse > summary::-webkit-details-marker { display: none; }
.asemf-collapse > summary::after { content: ""; flex: none; width: .6em; height: .6em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.asemf-collapse[open] > summary::after { transform: rotate(-135deg); }
.asemf-collapse > summary > h3 { margin: 0; }
.asemf-collapse[open] > summary { margin-bottom: .5rem; }
.asemf-collapse > summary:focus-visible { outline: 2px solid var(--asemf-accent, #1F218C); outline-offset: 2px; }

/* Locandine: sempre intere, mai ritagliate */
.asemf-poster img, .asemf-card-poster img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
.asemf-poster a { display: block; }

/* Risorse: elenco degli orari con un solo pulsante «Prenota» */
.asemf-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.asemf-slots { border: 0; margin: 0; padding: 0; min-width: 0; }
.asemf-slot { display: flex; align-items: center; gap: .6rem; min-height: 44px; width: 100%; cursor: pointer; }
.asemf-slot input[type="radio"] { width: 24px; height: 24px; margin: 0; flex: none; }
.asemf-slotform .asemf-actions .asemf-btn { min-height: 44px; padding: .5em 1.25em; font-size: 1em; }