/* ── Iscrizione form ─────────────────────────────────────────── */

:root {
  --sciclub-space-lg: 1.35rem;
  --sciclub-space-md: 0.9rem;
  --sciclub-radius-md: 12px;
}

body.page-slug-iscrizione .content-layout,
body.page-slug-iscrizione-online .content-layout {
  gap: var(--sciclub-space-lg);
}

body.page-slug-iscrizione .content-layout h2,
body.page-slug-iscrizione .content-layout h3,
body.page-slug-iscrizione-online .content-layout h2,
body.page-slug-iscrizione-online .content-layout h3 {
  margin: 0;
  color: var(--brand, #094365);
  font-family: 'Lexend', sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.15;
}

body.page-slug-iscrizione .content-layout ul,
body.page-slug-iscrizione .content-layout ol,
body.page-slug-iscrizione-online .content-layout ul,
body.page-slug-iscrizione-online .content-layout ol {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.45rem;
}

body.page-slug-iscrizione .content-layout p,
body.page-slug-iscrizione-online .content-layout p {
  margin: 0;
  line-height: 1.65;
  color: #3f5965;
}

body.page-slug-iscrizione .content-layout > p:has(a),
body.page-slug-iscrizione-online .content-layout > p:has(a) {
  padding: var(--sciclub-space-md) var(--sciclub-space-lg);
  border: 1px solid var(--line, #d4e2e8);
  border-radius: var(--sciclub-radius-md);
  background: #f7fbff;
}

body.page-slug-iscrizione .content-layout > p:has(a) a,
body.page-slug-iscrizione-online .content-layout > p:has(a) a {
  font-weight: 700;
  color: var(--brand, #094365);
  text-decoration: none;
}

body.page-slug-iscrizione .content-layout > p:has(a) a:hover,
body.page-slug-iscrizione-online .content-layout > p:has(a) a:hover {
  text-decoration: underline;
}

body.page-slug-iscrizione .content-layout > ul,
body.page-slug-iscrizione .content-layout > ol,
body.page-slug-iscrizione-online .content-layout > ul,
body.page-slug-iscrizione-online .content-layout > ol {
  padding: var(--sciclub-space-md) var(--sciclub-space-lg) var(--sciclub-space-md) 2rem;
  border: 1px solid var(--line, #d4e2e8);
  border-radius: var(--sciclub-radius-md);
  background: #ffffff;
}

.iscrizione-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Step headers */
.form-step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0 0.25rem;
  border-bottom: 2px solid var(--brand, #094365);
  margin-top: 0.6rem;
}

.form-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--brand, #094365);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.form-step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand, #094365);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Two-column fieldset row */
.form-fieldset-pair {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1rem;
  align-items: start;
}

/* Stack for check-field items */
.check-fields-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.iscrizione-intro {
  margin: 0 0 1.75rem;
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--text-muted, #4a6070);
}

/* Fieldset come panel card con accento laterale */
.form-fieldset {
  border: none;
  border-top: 1.1rem solid transparent;
  border-radius: 14px;
  padding: 0.3rem 1.6rem 1.6rem 1.7rem;
  margin: 0;
  background: #f7fafc;
  position: relative;
  overflow: visible;
}

.form-fieldset::before {
  content: '';
  position: absolute;
  top: -1.1rem;
  bottom: 1rem;
  left: 0;
  width: 3px;
  background: var(--brand, #094365);
  border-radius: 0 3px 3px 0;
}

.form-fieldset-legend {
  padding: 0.4rem 0.85rem;
  background: #ffffff;
  border: 1.5px solid rgba(9, 67, 101, 0.18);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(9, 67, 101, 0.08);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--brand, #094365);
}

.check-legend {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.check-legend input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--brand, #094365);
  flex-shrink: 0;
}

/* ── Inner grid ── */
.sciclub-inner-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
}

.sciclub-inner-grid .col-1 { grid-column: span 1; }
.sciclub-inner-grid .col-2 { grid-column: span 2; }
.sciclub-inner-grid .col-3 { grid-column: span 3; }
.sciclub-inner-grid .col-4 { grid-column: span 4; }
.sciclub-inner-grid .col-6 { grid-column: 1 / -1; }

.sciclub-inner-grid label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
}

.sciclub-inner-grid input,
.sciclub-inner-grid select,
.sciclub-inner-grid textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.8rem;
  background: #ffffff;
  border: 1.5px solid #c7d4dc;
  border-radius: 10px;
  font: inherit;
  font-size: 0.93rem;
  color: var(--ink);
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  box-sizing: border-box;
}

.sciclub-inner-grid input:focus,
.sciclub-inner-grid select:focus,
.sciclub-inner-grid textarea:focus {
  border-color: var(--brand, #094365);
  box-shadow: 0 0 0 3px rgba(9, 67, 101, 0.1);
}

/* ── Radio pill buttons ── */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.6rem;
  margin-top: 0.6rem;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.radio-option span {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid #c7d4dc;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted, #4a6070);
  background: #ffffff;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  user-select: none;
}

.radio-option input[type="radio"]:checked + span {
  background: var(--brand, #094365);
  border-color: var(--brand, #094365);
  color: #ffffff;
}

.radio-option input[type="radio"]:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(9, 67, 101, 0.15);
}

.radio-option-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border: 1.5px solid #c7d4dc;
  border-radius: 100px;
  background: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
}

.radio-option-inline input {
  padding: 0.35rem 0.5rem;
  border: 1px solid #c7d4dc;
  border-radius: 6px;
  font: inherit;
  font-size: 0.88rem;
  width: 6rem;
  outline: none;
}

.radio-option-inline input:focus {
  border-color: var(--brand, #094365);
  box-shadow: 0 0 0 2px rgba(9, 67, 101, 0.1);
}

/* ── Hint e helper text ── */
.form-hint {
  margin: 0.4rem 0 0.85rem;
  font-size: 0.83rem;
  color: var(--text-muted, #4a6070);
  line-height: 1.55;
}

/* ── Service list (checkbox con prezzo) ── */
.service-section-label {
  margin: 1.1rem 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted, #4a6070);
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.service-item:hover {
  background: #eef5fa;
  border-color: var(--line, #d4e2e8);
}

.service-item:has(input:checked) {
  background: #e9f3fb;
  border-color: var(--brand, #094365);
}

.service-item input[type="checkbox"] {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--brand, #094365);
  cursor: pointer;
}

.service-label {
  flex: 1;
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--ink);
}

.service-label small {
  display: block;
  font-weight: 400;
  font-size: 0.79rem;
  color: var(--text-muted, #4a6070);
  margin-top: 0.1rem;
}

.service-price {
  flex-shrink: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--brand, #094365);
  white-space: nowrap;
  background: #ddeef8;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
}

.service-item--with-sub {
  flex-direction: column;
  align-items: stretch;
  cursor: default;
}

.service-item-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.service-item-main input[type="checkbox"] {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--brand, #094365);
}

.service-subfield {
  padding: 0.6rem 0 0.1rem 2.05rem;
}

.service-subfield label {
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-subfield select {
  padding: 0.45rem 0.65rem;
  border: 1.5px solid #c7d4dc;
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.18s;
}

.service-subfield select:focus {
  border-color: var(--brand, #094365);
}

/* ── Privacy / check fields ── */
.check-field {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.87rem;
  line-height: 1.6;
  cursor: pointer;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: #ffffff;
  transition: background 0.15s, border-color 0.15s;
}

.check-field:hover {
  background: #eef5fa;
  border-color: var(--line, #d4e2e8);
}

.check-field:has(input:checked) {
  background: #e9f3fb;
  border-color: var(--brand, #094365);
}

.check-field input {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--brand, #094365);
}

.req { color: var(--accent-red, #d4000c); }

/* ── Upload certificato ── */
.file-input-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.file-input-field input[type="file"] {
  font-size: 0.82rem;
  padding: 0.55rem 0.6rem;
  background: #fff;
  border: 1.5px solid #c7d4dc;
  border-radius: 10px;
}

/* ── Firma digitale ── */
.firma-pad-wrap {
  margin-top: 1.1rem;
}

.firma-canvas {
  display: block;
  width: 100%;
  max-width: 500px;
  height: 150px;
  background: #ffffff;
  border: 1.5px dashed #b7c6ce;
  border-radius: 10px;
  cursor: crosshair;
  touch-action: none;
}

.firma-actions {
  margin-top: 0.6rem;
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
}

/* ── Submit ── */
.btn-lg {
  width: 100%;
  padding: 0.95rem 2rem;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 10px;
}

/* ── Info box note obbligatorie ── */
.iscrizione-info-box {
  padding: 1rem 1.25rem;
  background: #fffbea;
  border: 1.5px solid #e8c84a;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink);
}

.iscrizione-info-box p {
  margin: 0 0 0.5rem;
}

.iscrizione-info-box p:last-child {
  margin-bottom: 0;
}

.iscrizione-info-box a {
  color: var(--brand, #094365);
  font-weight: 600;
}

/* ── Fine iscrizione form ────────────────────────────────────── */

/* ── Rimando al portale esterno (quando le iscrizioni non sono più sul sito) ── */
.iscrizione-rimando {
  background: #ffffff;
  border: 1px solid var(--line, #d8e5ee);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}

.iscrizione-rimando h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--brand, #094365);
  line-height: 1.25;
}

.iscrizione-rimando p {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #3a5566;
}

.iscrizione-rimando .btn-primary {
  margin-top: 0.6rem;
}
