/* ============================================================
   Newsletter form — Promix
   Compatibile con il markup .newsletter-form già presente nel footer.
   ============================================================ */

/* Honeypot: mai visibile, mai raggiungibile */
.nl-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Label screen-reader only */
.nl-label--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Feedback */
.nl-feedback {
  padding: 12px 14px;
  border-radius: 4px;
  font-size: .875rem;
  margin-bottom: 12px;
  line-height: 1.5;
}
.nl-feedback--success {
  background: #e8f5e9;
  color: #2d6a2d;
  border-left: 3px solid #2d6a2d;
}
.nl-feedback--error {
  background: #fce8ea;
  color: #AE172B;
  border-left: 3px solid #AE172B;
}

/* Campi */
.nl-field {
  margin-bottom: 10px;
}
.nl-field.has-error .nl-input {
  border-color: #AE172B;
}
.nl-field-error {
  font-size: .8125rem;
  color: #AE172B;
  margin-top: 4px;
}

/* Checkbox */
.nl-field--checkbox .nl-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .8125rem;
  line-height: 1.5;
  color: rgba(255,255,255,.7);
  cursor: pointer;
}
.nl-field--checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #AE172B;
  cursor: pointer;
}
.nl-field--checkbox a {
  color: rgba(255,255,255,.9);
  text-decoration: underline;
}

/* Spinner sul bottone */
.nl-submit { position: relative; }
.nl-submit__spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nl-submit__spinner svg {
  animation: nl-spin .8s linear infinite;
}
@keyframes nl-spin { to { transform: rotate(360deg); } }

/* Inline field (rinnovo token) */
.nl-field--inline {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nl-field--inline .nl-input {
  flex: 1;
}

/* Form profilo — griglia 2 colonne */
.nl-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.nl-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.nl-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: .9375rem;
  box-sizing: border-box;
  transition: border-color .2s;
}
.nl-input:focus {
  border-color: #AE172B;
  outline: none;
  box-shadow: 0 0 0 3px rgba(174,23,43,.15);
}

.nl-profile-intro {
  margin-bottom: 20px;
}
.nl-expired-msg {
  color: #AE172B;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .nl-profile-grid { grid-template-columns: 1fr; }
  .nl-field--inline { flex-direction: column; align-items: stretch; }
}

/* ============================================================
   Pagina profilo / link scaduto — layout con respiro
   ============================================================ */
/* Nasconde il titolo H1 automatico di WP solo su questa pagina */

.nl-profile-wrap,
.nl-expired-wrap {
    max-width: 560px;
    margin: 60px auto;
    padding: 48px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.nl-expired-wrap > p:first-of-type {
    font-size: 1.0625rem;
    color: var(--color-text, #333);
    margin-bottom: 24px;
}

.nl-expired-msg {
    font-size: .9375rem;
    color: #AE172B;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #fce8ea;
    border-left: 3px solid #AE172B;
    border-radius: 4px;
}

/* Titolo pagina sopra il box */
.nl-page-header {
    max-width: 560px;
    margin: 48px auto 0;
    padding: 0 0 24px;
}
.nl-page-header h1 {
    font-size: 1.75rem;
    margin: 0 0 8px;
}
.nl-page-header p {
    color: var(--color-text-muted, #666);
    margin: 0;
}

/* Form rinnovo inline */
.nl-renew-form .nl-field--inline {
    display: flex;
    gap: 10px;
}
.nl-renew-form .nl-field--inline .nl-input {
    flex: 1;
    height: 48px;
}

/* Form profilo */
.nl-profile-intro {
    font-size: .9375rem;
    color: var(--color-text-muted, #666);
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e8e8;
}
.nl-profile-intro strong {
    color: var(--color-text, #333);
}

.nl-profile-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.nl-label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--color-text-muted, #666);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
}

.nl-input {
    height: 48px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 14px;
    font-size: .9375rem;
    transition: border-color .2s, box-shadow .2s;
}
.nl-input:focus {
    border-color: #AE172B;
    box-shadow: 0 0 0 3px rgba(174,23,43,.12);
    outline: none;
}

@media (max-width: 640px) {
    .nl-profile-wrap,
    .nl-expired-wrap {
        margin: 24px 16px;
        padding: 28px 20px;
    }
    .nl-profile-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Pagina conferma iscrizione
   ============================================================ */
.nl-confirm-page {
    padding: 80px 0;
}

.nl-confirm-box {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    padding: 56px 48px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 2px 20px rgba(0,0,0,.06);
}

.nl-confirm-icon {
    width: 72px;
    height: 72px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: #2d6a2d;
}

.nl-confirm-title {
    font-size: 1.75rem;
    margin: 0 0 16px;
    color: var(--color-text, #1a1a1a);
}

.nl-confirm-lead {
    font-size: 1rem;
    color: var(--color-text-muted, #666);
    line-height: 1.6;
    margin: 0 0 32px;
}