/*
 * Eptamed — Verifica Sintomi
 * Porting di hai-questi-sintomi.html (checklist interattiva + barra sticky
 * + sezione risultati). Selettori scoperti da .ept-sc, mai ID globali —
 * più istanze widget sulla stessa pagina restano indipendenti.
 */

.ept-sc { --ept-sc-light-gray: #EBEFEF; --ept-sc-medium-gray: #A0ABAB; --ept-sc-dark-gray: #4E5655; --ept-sc-almost-black: #1C2221; --ept-sc-off-white: #F8FAFA; --ept-sc-primary-dark: #0E2E4B; --ept-sc-accent: #00A19B; }

/* Pillole categorie */
.ept-sc-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.ept-sc-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; font-size: .8125rem; font-weight: 700; border: 1.5px solid; }

/* Barra sticky */
.ept-sc-sticky { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--ept-sc-light-gray); padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; transition: box-shadow 200ms; border-radius: 12px; }
.ept-sc-sticky.ept-sc-scrolled { box-shadow: 0 4px 24px -4px rgba(14, 46, 75, .12); }
.ept-sc-sticky-count { display: flex; align-items: center; gap: 10px; font-size: .9375rem; color: var(--ept-sc-dark-gray); }
.ept-sc-sticky-count strong { font-size: 1.25rem; font-weight: 800; color: var(--ept-sc-primary-dark); min-width: 1.5ch; display: inline-block; }
/* <button> nativo: protetto con !important dallo stile globale "Site
   Settings > Pulsanti" di Elementor, stesso motivo/pattern di
   .ept-pub-filter-btn qui sopra. */
.ept-sc-sticky-cta { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px !important; background: var(--ept-sc-accent) !important; color: #fff !important; font-family: var(--font-body, inherit); font-size: .875rem; font-weight: 700; border: none !important; cursor: pointer; transition: opacity 150ms; }
.ept-sc-sticky-cta:hover { opacity: .88; }
.ept-sc-sticky-cta:disabled { opacity: .4; cursor: default; }

/* Checker */
.ept-sc-checker { padding: 32px 0 8px; }
.ept-sc-intro-title { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; line-height: 1.2; color: var(--ept-sc-primary-dark); margin: 0 0 12px; }
.ept-sc-intro { font-size: 1.0625rem; line-height: 1.7; color: var(--ept-sc-dark-gray); margin: 0 0 32px; }

.ept-sc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.ept-sc-card--wide { grid-column: 1 / -1; }

.ept-sc-card { background: #fff; border-radius: 20px; border: 1.5px solid var(--ept-sc-light-gray); overflow: hidden; transition: border-color 200ms; }
.ept-sc-card.ept-sc-has-checked { border-color: currentColor; }

.ept-sc-card-header { padding: 20px 22px; display: flex; align-items: center; gap: 14px; }
.ept-sc-card-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 17px; }
.ept-sc-card-heading { flex: 1; }
.ept-sc-card-title { font-size: 1rem; font-weight: 800; color: var(--ept-sc-almost-black); line-height: 1.2; margin: 0; }
.ept-sc-card-subtitle { font-size: .8125rem; color: var(--ept-sc-medium-gray); margin: 2px 0 0; }
.ept-sc-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 999px; font-size: .6875rem; font-weight: 800; color: #fff; padding: 0 6px; opacity: 0; transition: opacity 200ms; }
.ept-sc-badge.ept-sc-visible { opacity: 1; }

.ept-sc-symptom-list { padding: 0 22px 20px; display: flex; flex-direction: column; gap: 2px; }
.ept-sc-symptom-list--2col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 16px; }

.ept-sc-symptom-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; user-select: none; transition: background 120ms; }
.ept-sc-symptom-item:hover { background: var(--ept-sc-off-white); }
.ept-sc-symptom-item.ept-sc-checked { background: var(--ept-sc-off-white); }

.ept-sc-symptom-check { width: 20px; height: 20px; min-width: 20px; border-radius: 6px; border: 1.5px solid var(--ept-sc-light-gray); display: flex; align-items: center; justify-content: center; transition: background 120ms, border-color 120ms; flex-shrink: 0; }
.ept-sc-symptom-item.ept-sc-checked .ept-sc-symptom-check { border-color: currentColor; background: currentColor; }
.ept-sc-symptom-check svg { opacity: 0; transition: opacity 100ms; }
.ept-sc-symptom-item.ept-sc-checked .ept-sc-symptom-check svg { opacity: 1; }

.ept-sc-symptom-label { font-size: .9375rem; line-height: 1.4; color: var(--ept-sc-dark-gray); }
.ept-sc-symptom-item.ept-sc-checked .ept-sc-symptom-label { color: var(--ept-sc-almost-black); font-weight: 600; }

/* Risultati */
.ept-sc-results { padding: 40px 0 8px; display: none; }
.ept-sc-results.ept-sc-visible { display: block; }
.ept-sc-results-title { font-size: clamp(1.625rem, 2.5vw, 2.125rem); font-weight: 800; color: var(--ept-sc-primary-dark); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 8px; }
.ept-sc-results-sub { font-size: 1rem; color: var(--ept-sc-dark-gray); line-height: 1.65; margin: 0 0 40px; max-width: 560px; }
.ept-sc-results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 40px; }

.ept-sc-result-card { padding: 20px; border-radius: 16px; border: 1.5px solid var(--ept-sc-light-gray); display: flex; flex-direction: column; gap: 10px; transition: border-color 200ms, box-shadow 200ms; opacity: .4; }
.ept-sc-result-card.ept-sc-active { opacity: 1; border-color: var(--ept-sc-card-color); box-shadow: 0 4px 20px -4px rgba(0, 0, 0, .1); }
.ept-sc-result-head { display: flex; align-items: center; gap: 10px; }
.ept-sc-result-emoji { font-size: 18px; }
.ept-sc-result-name { font-size: .875rem; font-weight: 800; color: var(--ept-sc-almost-black); }
.ept-sc-result-bar-wrap { height: 6px; border-radius: 999px; background: var(--ept-sc-light-gray); overflow: hidden; }
.ept-sc-result-bar { height: 100%; border-radius: 999px; background: var(--ept-sc-card-color); width: 0%; transition: width 500ms cubic-bezier(.16, 1, .3, 1); }
.ept-sc-result-count { font-size: .8125rem; color: var(--ept-sc-dark-gray); }
.ept-sc-result-link { display: inline-flex; align-items: center; gap: 5px; font-size: .8125rem; font-weight: 700; margin-top: 4px; opacity: 0; transition: opacity 200ms; text-decoration: none; }
.ept-sc-result-card.ept-sc-active .ept-sc-result-link { opacity: 1; }

.ept-sc-results-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.ept-sc-btn-accent, .ept-sc-btn-outline { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 28px; border-radius: 999px; font-family: var(--font-body, inherit); font-size: 1rem; font-weight: 700; text-decoration: none; }
.ept-sc-btn-accent { background: var(--ept-sc-accent); color: #fff; transition: opacity 150ms; }
.ept-sc-btn-accent:hover { opacity: .88; }
.ept-sc-btn-outline { background: none; color: var(--ept-sc-primary-dark); border: 2px solid rgba(19, 65, 105, .3); transition: border-color 150ms; }
.ept-sc-btn-outline:hover { border-color: #134169; }

/* Modulo di ricontatto (sotto i risultati) */
.ept-sc-form-wrap { margin-top: 48px; padding: 36px; border-radius: 24px; background: var(--c-beige, #F3ECE2); max-width: 760px; }
.ept-sc-form-title { font-size: 1.5rem; font-weight: 800; color: var(--ept-sc-primary-dark); line-height: 1.2; margin: 0 0 8px; }
.ept-sc-form-desc { font-size: .9375rem; line-height: 1.6; color: var(--ept-sc-dark-gray); margin: 0 0 24px; }
.ept-sc-form { display: flex; flex-direction: column; gap: 14px; }
.ept-sc-form-row { display: flex; gap: 14px; }
.ept-sc-form-row .ept-sc-field { flex: 1; }
.ept-sc-field { display: flex; flex-direction: column; gap: 6px; font-size: .8125rem; font-weight: 700; color: var(--ept-sc-primary-dark); }
.ept-sc-field input { box-sizing: border-box; width: 100%; border: 1.5px solid transparent; border-radius: 12px; padding: 14px 16px; font-size: .95rem; font-family: inherit; font-weight: 400; background: #fff; color: var(--ept-sc-almost-black); }
.ept-sc-field input:focus { outline: none; border-color: var(--ept-sc-primary-dark); }
.ept-sc-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .8125rem; line-height: 1.5; color: var(--ept-sc-dark-gray); cursor: pointer; }
.ept-sc-consent input { margin-top: 3px; flex-shrink: 0; }
.ept-sc-consent a { color: var(--ept-sc-primary-dark); text-decoration: underline; }
.ept-sc-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ept-sc-form-submit { align-self: flex-start; border: none; cursor: pointer; }
.ept-sc-form-submit:disabled { opacity: .55; cursor: wait; }
.ept-sc-form-msg { padding: 14px 16px; border-radius: 12px; font-size: .9375rem; font-weight: 600; }
.ept-sc-form-msg[hidden] { display: none; }
.ept-sc-form-msg--success { background: #E4F3EC; color: #1E7A4C; }
.ept-sc-form-msg--error { background: #FBE7E4; color: #A0341F; }

@media (max-width: 900px) {
  .ept-sc-form-wrap { padding: 24px; }
  .ept-sc-form-row { flex-direction: column; }
  .ept-sc-grid { grid-template-columns: 1fr; }
  .ept-sc-symptom-list--2col { grid-template-columns: 1fr; }
}

/* Finestra "Scopri di più" */
.ept-sc-more { cursor: pointer; }
.ept-sc-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ept-sc-modal[hidden] { display: none; }
.ept-sc-modal-backdrop { position: absolute; inset: 0; background: rgba(14, 46, 75, .6); }
.ept-sc-modal-dialog { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 24px; padding: 40px 36px 32px; border-top: 6px solid var(--ept-sc-card-color, var(--ept-sc-accent)); box-shadow: 0 24px 60px rgba(5, 18, 35, .35); }
.ept-sc-modal-close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; padding: 0 !important; border-radius: 50% !important; border: none !important; background: var(--ept-sc-light-gray) !important; color: var(--ept-sc-almost-black) !important; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.ept-sc-modal-emoji { display: block; font-size: 2rem; margin-bottom: 8px; }
.ept-sc-modal-title { font-size: 1.5rem; font-weight: 800; line-height: 1.25; color: var(--ept-sc-primary-dark); margin: 0 0 16px; }
.ept-sc-modal-body p { font-size: 1rem; line-height: 1.7; color: var(--ept-sc-dark-gray); margin: 0 0 14px; }
.ept-sc-modal-cta { margin-top: 10px; width: 100%; }
html.ept-sc-modal-open { overflow: hidden; }
@media (max-width: 600px) {
  .ept-sc-modal-dialog { padding: 32px 22px 24px; border-radius: 20px; }
}
