/**
 * Niuko Safety Day 2026 — Form iscrizione.
 * Stili volutamente neutri e prefissati .nsd- per non collidere col tema.
 */

.nsd-wrap {
  --nsd-accent: #c8102e;
  --nsd-ok: #1a7f37;
  --nsd-low: #b26a00;
  --nsd-full: #b3261e;
  --nsd-border: #dcdfe4;
  --nsd-bg: #f7f8fa;
  max-width: 960px;
  margin: 0 auto;
}

.nsd-form__head {
  margin-bottom: 1.5rem;
}
.nsd-form__title {
  margin: 0 0 0.25rem;
}
.nsd-form__meta {
  color: #555;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.nsd-form__intro {
  color: #444;
}

/* Aree e attività */
.nsd-area {
  margin: 0 0 2rem;
}
.nsd-area__title {
  border-bottom: 3px solid var(--nsd-accent);
  padding-bottom: 0.35rem;
  margin: 0 0 1rem;
}

.nsd-activity {
  border: 1px solid var(--nsd-border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin: 0 0 1rem;
  background: #fff;
}
.nsd-activity__label {
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0 0.4rem;
}
.nsd-activity__desc {
  color: #666;
  font-size: 0.9rem;
  margin: 0.35rem 0 0.85rem;
  font-style: italic;
}

/* Edizioni */
.nsd-editions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0.4rem;
}
.nsd-edition {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--nsd-border);
  border-radius: 8px;
  background: var(--nsd-bg);
  position: relative;
}

.nsd-edition.nsd-edition--rolling {
  grid-column: 1 / -1;
}

.nsd-edition--none {
  background: var(--nsd-bg);
  border-style: dashed;
}
.nsd-edition__pick {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  cursor: pointer;
  flex: 1 1 auto;
}
.nsd-edition__time {
  font-weight: 600;
}
.nsd-edition__avail {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.nsd-edition__avail.nsd-ok {
  color: var(--nsd-ok);
  background: rgba(26, 127, 55, 0.1);
}
.nsd-edition__avail.nsd-low {
  color: var(--nsd-low);
  background: rgba(178, 106, 0, 0.12);
}
.nsd-edition__avail.nsd-full {
  color: var(--nsd-full);
  background: rgba(179, 38, 30, 0.1);
}
.nsd-edition__avail.nsd-rolling {
  color: #315;
  background: rgba(51, 17, 85, 0.08);
}

.nsd-edition--full {
  background: #fff3f2;
  border-color: #f3c6c2;
}
/* Piena ma selezionabile: scegliendola si entra in lista d'attesa. */
.nsd-edition--full .nsd-edition__pick {
  cursor: pointer;
}
.nsd-edition--justfull {
  box-shadow: 0 0 0 2px var(--nsd-full);
  animation: nsd-flash 1s ease;
}
@keyframes nsd-flash {
  from {
    box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.5);
  }
  to {
    box-shadow: 0 0 0 2px var(--nsd-full);
  }
}

/* Campi partecipante */
.nsd-fields {
  border-top: 2px solid var(--nsd-border);
  margin-top: 2rem;
  padding-top: 1.25rem;
}
.nsd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem 1.2rem;
}
.nsd-field {
  margin: 0 0 0.3rem;
  display: flex;
  flex-direction: column;
}
.nsd-field--full {
  grid-column: 1 / -1;
}
.nsd-field label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.nsd-field input,
.nsd-field textarea {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--nsd-border);
  border-radius: 7px;
  font: inherit;
}
.nsd-field input:focus,
.nsd-field textarea:focus {
  outline: none;
  border-color: var(--nsd-accent);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

.nsd-field--consent {
	margin-top: 1rem;
	font-size: 0.9rem;
}

.nsd-field--consent label {
	display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
}
.nsd-req {
  color: var(--nsd-accent);
}

.nsd-field--error input,
.nsd-field--error textarea {
  border-color: var(--nsd-full);
  background: #fff6f5;
}
.nsd-field__error {
  color: var(--nsd-full);
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

/* Honeypot fuori schermo */
.nsd-hp {
  position: absolute !important;
  left: -9999px !important;
  height: 0;
  overflow: hidden;
}

/* Azioni */
.nsd-actions {
  margin-top: 1.5rem;
}
.nsd-submit {
  background: var(--nsd-accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.nsd-submit:hover {
  filter: brightness(0.94);
}
.nsd-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Feedback */
.nsd-feedback {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 10px;
}
.nsd-feedback--ok {
  background: rgba(26, 127, 55, 0.1);
  border: 1px solid rgba(26, 127, 55, 0.35);
}
.nsd-feedback--err {
  background: #fff3f2;
  border: 1px solid #f3c6c2;
}
.nsd-feedback__title {
  font-weight: 700;
  margin: 0 0 0.4rem;
}
.nsd-feedback__sub {
  font-weight: 600;
  margin: 0.5rem 0 0.2rem;
}
.nsd-feedback ul {
  margin: 0 0 0.3rem 1.1rem;
}

@media (max-width: 1024px) {
  .nsd-editions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .nsd-editions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nsd-grid {
    grid-template-columns: 1fr;
  }
  .nsd-edition {
    align-items: flex-start;
  }
}
