/*
 * Galleria dei quiz embed ([odq_embed_galleria]) e pagina di anteprima /quiz-embed/<slug>/.
 *
 * I pulsanti hanno il selettore `.odq-eg button.…`: il tema (Hello) dà a ogni <button>
 * bordo, colore e un :focus rosso #c36, e una classe sola non basta a scavalcarlo.
 */
.odq-eg { margin: 1.5rem 0 2.5rem; }

.odq-eg-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; }
.odq-eg button.odq-eg-filter,
.odq-eg button.odq-eg-filter:focus {
	padding: .45rem 1rem; border: 1px solid #d9d3ec; border-radius: 999px;
	background: #fff; color: #2b2b33; font: inherit; font-size: .9rem; font-weight: 600;
	line-height: 1.3; cursor: pointer;
}
.odq-eg button.odq-eg-filter:hover { border-color: #7A3FF2; background: #f8f6fd; color: #2b2b33; }
.odq-eg button.odq-eg-filter.is-active,
.odq-eg button.odq-eg-filter.is-active:focus { border-color: #7A3FF2; background: #7A3FF2; color: #fff; }

.odq-eg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; align-items: start; }

.odq-eg-card {
	padding: 1.25rem; border: 1px solid #e6e2f2; border-radius: 16px; background: #fff;
	min-width: 0;
}
.odq-eg-card[hidden] { display: none; }
.odq-eg-card .odq-eg-tema {
	margin: 0 0 .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em;
	text-transform: uppercase; color: #5b27c9;
}
.odq-eg-card .odq-eg-title { margin: 0 0 .4rem; font-size: 1.2rem; line-height: 1.3; }
.odq-eg-card .odq-eg-desc { margin: 0 0 .4rem; }
.odq-eg-card .odq-eg-meta { margin: 0 0 1rem; font-size: .85rem; color: #5d586e; }

.odq-eg-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.odq-eg button.odq-eg-btn,
.odq-eg button.odq-eg-btn:focus {
	padding: .6rem 1.1rem; border: 2px solid #7A3FF2; border-radius: 999px;
	background: #fff; color: #5b27c9; font: inherit; font-size: .9rem; font-weight: 600;
	line-height: 1.3; cursor: pointer;
}
.odq-eg button.odq-eg-btn:hover { background: #f3eefe; color: #5b27c9; }
.odq-eg button.odq-eg-btn--primary,
.odq-eg button.odq-eg-btn--primary:focus { background: #7A3FF2; color: #fff; }
.odq-eg button.odq-eg-btn--primary:hover { background: #6530d6; border-color: #6530d6; color: #fff; }
.odq-eg button:focus-visible { outline: 3px solid #1B1830; outline-offset: 2px; }

.odq-eg-code { margin: .9rem 0 0; font-size: .85rem; }
.odq-eg-code summary { cursor: pointer; color: #5d586e; }
.odq-eg-code textarea {
	display: block; width: 100%; margin: .5rem 0 0; padding: .6rem; border: 1px solid #d9d3ec;
	border-radius: 8px; background: #f8f6fd; color: #2b2b33; resize: vertical;
	font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* «Personalizza colori e carattere» (28/10/2026, ODQ_Embed_Quiz::custom_controls()). Il colore
   dei pallini è inline: è il colore che si sceglie. Select e radio: stesso giro del tema per
   i <button> (bordo e focus di Hello), qui scavalcato con `.odq-eg …`. */
.odq-eg-custom { margin: .9rem 0 0; font-size: .85rem; }
.odq-eg-custom summary { cursor: pointer; color: #5b27c9; font-weight: 600; }
.odq-eg-custom-ico { display: inline-block; margin: 0 .35rem 0 .15rem; vertical-align: -3px; color: #7A3FF2; }
.odq-eg-custom-body { display: grid; gap: .9rem; margin: .7rem 0 0; padding: .9rem 1rem; border: 1px solid #e6e2f2; border-radius: 12px; background: #fff; }
.odq-eg .odq-eg-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.odq-eg .odq-eg-field legend,
.odq-eg .odq-eg-field > label { display: block; margin: 0 0 .4rem; padding: 0; font-weight: 700; font-size: .8rem; color: #5d586e; }
.odq-eg-swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.odq-eg-swatch { position: relative; display: inline-flex; cursor: pointer; }
.odq-eg-swatch input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.odq-eg-swatch-dot { display: block; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.odq-eg-swatch input:checked + .odq-eg-swatch-dot,
.odq-eg-swatch--pick.is-on input { outline: 3px solid #1B1830; outline-offset: 2px; }
.odq-eg-swatch input:focus-visible + .odq-eg-swatch-dot { outline: 3px solid #7A3FF2; outline-offset: 2px; }
.odq-eg-swatch--pick input[type="color"] {
	width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
	-webkit-appearance: none; appearance: none; overflow: hidden;
}
.odq-eg-swatch--pick input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.odq-eg-swatch--pick input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; background-image: none; }
.odq-eg-swatch--pick:not(.is-on) input[type="color"] { background: conic-gradient(#e53935, #fdd835, #43a047, #1e88e5, #8e24aa, #e53935); }
.odq-eg-swatch--pick:not(.is-on) input[type="color"]::-webkit-color-swatch { opacity: 0; }
.odq-eg-swatch--pick:not(.is-on) input[type="color"]::-moz-color-swatch { opacity: 0; }
.odq-eg select[data-odq-eg-font] {
	width: 100%; max-width: 260px; padding: .45rem .6rem; border: 1px solid #d9d3ec; border-radius: 8px;
	background: #fff; color: #2b2b33; font: inherit;
}
.odq-eg-seg { display: inline-flex; border: 1px solid #d9d3ec; border-radius: 999px; overflow: hidden; }
.odq-eg-seg label { position: relative; cursor: pointer; }
.odq-eg-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.odq-eg-seg span { display: block; padding: .4rem 1rem; font-weight: 600; color: #5b27c9; }
.odq-eg-seg input:checked + span { background: #7A3FF2; color: #fff; }
.odq-eg-seg input:focus-visible + span { outline: 3px solid #1B1830; outline-offset: -3px; }
.odq-eg-custom-note { margin: 0; color: #5d586e; font-size: .8rem; }
.odq-eg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.odq-eg-preview { margin: 1rem 0 0; }
.odq-eg-preview iframe { display: block; width: 100%; max-width: 600px; margin: 0 auto; }

/* Pagina di anteprima: niente scheda, il quiz sta nella colonna della pagina. */
.odq-eg--single { margin-top: 0; }
.odq-eg--single .odq-eg-lead { margin: 0 0 1.25rem; font-size: 1.1rem; color: #5d586e; }
.odq-eg--single .odq-eg-preview { margin: 0 0 2rem; }
.odq-eg--single .odq-eg-preview iframe { margin: 0; }
.odq-eg--single .odq-eg-more { margin: 1.5rem 0 0; font-weight: 600; }

.odq-eg-ricorrenze ul { list-style: none; margin: 0; padding: 0; }
.odq-eg-ricorrenze li { padding: .5rem 0; border-bottom: 1px solid #f1edfb; }
.odq-eg-ric-data { display: inline-block; min-width: 7.5rem; font-weight: 700; color: #1B1830; }

@media (max-width: 480px) {
	.odq-eg-grid { grid-template-columns: 1fr; }
	.odq-eg-card { padding: 1rem; }
	.odq-eg button.odq-eg-btn { flex: 1 1 auto; }
}

/* Landing dei quiz di settore (5/11/2026): la scheda della galleria, aperta e senza titolo. */
.odq-eg--settore .odq-eg-card { padding: 1.25rem 1.25rem 1rem; }
.odq-eg--settore .odq-eg-preview { margin-top: 1rem; }

/* [odq_embed_settori] sulla landing generale. */
.odq-eg-settori { margin: 2rem 0; }
.odq-eg-settori ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.odq-eg-settori li { padding: 1rem 1.1rem; border: 1px solid #e6e2f2; border-radius: 14px; background: #fff; }
.odq-eg-settori a { font-weight: 700; color: #5b27c9; }
.odq-eg-settori li.has-ico { display: grid; grid-template-columns: 44px 1fr; gap: .9rem; align-items: start; }
.odq-eg-settori-ico {
	display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
	border-radius: 12px; background: #f3effd; color: #5b27c9;
}
.odq-eg-settori-ico svg { display: block; }
.odq-eg-settori .odq-eg-settori-desc { margin: .3rem 0 0; font-size: .92rem; color: #5d586e; }
