/* Pagina di attivazione.
   Colori, card, bottoni e messaggi arrivano da base.css: qui restano solo gli
   stili del flusso. Niente selettori globali (body, input, .btn): le regole
   sono dentro .card o su classi proprie, così non toccano testata e footer. */

.card {
  width: 100%;
  max-width: 520px;
  margin: 48px auto;
}

.step { display: none; }
.step.active { display: block; }

.card h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.desc { font-size: 14px; color: var(--text-dim); line-height: 1.6; margin-bottom: 28px; }

.label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.label-row label { margin-bottom: 0; }
.optional { font-size: 11px; color: var(--text-muted); }

#codeInput {
  font-family: 'Courier New', monospace;
  font-size: 24px;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}

.tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.tab {
  flex: 1; padding: 10px 8px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; text-align: center; transition: all 0.2s var(--ease);
}
.tab:hover { border-color: var(--text-muted); color: var(--text-dim); }
.tab.active { background: var(--surface-raised); border-color: var(--brand); color: var(--text); }
.tab-icon { display: block; font-size: 18px; margin-bottom: 4px; }

.tab-form { display: none; }
.tab-form.active { display: block; }

.features {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 20px; margin-bottom: 24px;
}
.feature { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--surface-raised); }
.feature:last-child { border-bottom: none; padding-bottom: 0; }
.feature-icon { font-size: 18px; line-height: 1.4; flex-shrink: 0; }
.feature-text { font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.feature-text strong { color: var(--text); display: block; }

.price-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-soft); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 20px;
}
.price-label { font-size: 14px; color: var(--text-dim); }
.price-amount { font-size: 26px; font-weight: 800; color: var(--text); }
.price-amount small { font-size: 13px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }

.panel-section { margin-bottom: 28px; }
.panel-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-section h3 {
  font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 0;
}

.playlist-card {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 8px;
  cursor: pointer; transition: border-color 0.2s var(--ease);
}
.playlist-card:hover { border-color: var(--text-muted); }
.playlist-card.selected { border-color: var(--brand); }
.playlist-card .pc-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.playlist-card .pc-url { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.no-lists { font-size: 13px; color: var(--text-muted); font-style: italic; padding: 4px 0 12px; }

/* I bottoni del flusso occupano tutta la larghezza della card: la testata
   resta con il suo .btn-sm compatto. */
.card .btn { width: 100%; }

.btn-outline {
  background: transparent; color: var(--text-dim); border: 1px solid var(--border);
  font-size: 13px; padding: 10px; margin-top: 12px;
}
.btn-outline:hover { border-color: var(--text-muted); color: var(--text-dim); }

.btn-new {
  background: transparent; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 12px; font-weight: 600; padding: 6px 12px;
  cursor: pointer; transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn-new:hover { border-color: var(--brand); color: var(--brand); }

.user-badge {
  display: flex; align-items: center; gap: 10px;
  background: var(--success-soft); border: 1px solid rgba(46, 212, 122, 0.35);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 24px;
  font-size: 13px; color: var(--success);
}

.hint { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 16px; line-height: 1.5; }

/* --- conferma di consegna alla TV --- */
.delivery {
  font-size: 13px;
  line-height: 1.5;
  margin: -8px 0 18px;
  padding: 0 2px;
  border-radius: 8px;
}

.delivery:empty {
  display: none;
}

.delivery--pending {
  color: var(--text-dim);
}

.delivery--pending::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-inline-end: 8px;
  border-radius: 50%;
  background: var(--brand);
  animation: delivery-pulse 1.2s ease-in-out infinite;
}

.delivery--ok {
  color: var(--success);
}

.delivery--ok::before {
  content: "✓";
  margin-inline-end: 6px;
  font-weight: 800;
}

.delivery--warn {
  color: var(--warn);
}

@keyframes delivery-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
