/* stato-segnalazioni.css — Stili specifici per /stato-segnalazioni
 * Layout: info-util (hero + content full-width 780px max).
 * Le classi `hd-*` di editorial.css sono già caricate da base.njk;
 * qui prefisso `stato-seg-*` per evitare collisioni.
 */

/* Form lookup ─────────────────────────────────────────────────── */
.stato-seg-form {
  margin: 24px 0 8px;
}
.stato-seg-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.stato-seg-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}
.stato-seg-input {
  flex: 1 1 auto;
  min-width: 220px;
  padding: 12px 14px;
  font: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  letter-spacing: 0.02em;
  background: var(--color-bg-card, #fff);
  color: var(--color-text);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.15));
  border-radius: 8px;
}
.stato-seg-input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-color: var(--color-primary);
}
.stato-seg-input.is-invalid {
  border-color: #c0392b;
}
.stato-seg-hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--color-text-muted, rgba(0, 0, 0, 0.55));
}

/* Result card ─────────────────────────────────────────────────── */
.stato-seg-result {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.12));
  border-radius: 12px;
  background: var(--color-bg-card, #fff);
}
.stato-seg-result[hidden] {
  display: none;
}
.stato-seg-result-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
}
.stato-seg-result-head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.stato-seg-result-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted, rgba(0, 0, 0, 0.55));
}
.stato-seg-result-meta strong {
  color: var(--color-text);
}

/* Timeline ────────────────────────────────────────────────────── */
.stato-seg-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.stato-seg-timeline-item {
  position: relative;
  padding: 12px 0 12px 32px;
  border-left: 2px solid var(--color-border, rgba(0, 0, 0, 0.08));
  margin-left: 8px;
}
.stato-seg-timeline-item:last-child {
  border-left-color: transparent;
}
.stato-seg-timeline-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-bg-card, #fff);
  border: 2px solid var(--color-border, rgba(0, 0, 0, 0.25));
}
.stato-seg-timeline-item--done::before {
  background: var(--color-status-done, #2e7d32);
  border-color: var(--color-status-done, #2e7d32);
}
.stato-seg-timeline-item--current::before {
  background: var(--color-status-progress, #d97706);
  border-color: var(--color-status-progress, #d97706);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.18);
}
.stato-seg-timeline-item--alert::before {
  background: var(--color-status-alert, #c0392b);
  border-color: var(--color-status-alert, #c0392b);
}
.stato-seg-timeline-label {
  font-weight: 600;
  margin-bottom: 2px;
}
.stato-seg-timeline-date {
  font-size: 0.85rem;
  color: var(--color-text-muted, rgba(0, 0, 0, 0.55));
}
.stato-seg-timeline-note {
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--color-bg, #f8f6f1);
  border-left: 3px solid var(--color-primary);
  border-radius: 6px;
  font-size: 0.92rem;
  white-space: pre-wrap;
}

/* Feed pubblico ─────────────────────────────────────────────── */
.stato-seg-feed-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.stato-seg-feed-card {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
  border-radius: 10px;
  background: var(--color-bg-card, #fff);
}
.stato-seg-feed-card-stato {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
}
.stato-seg-feed-card-stato .status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-status-muted, #9ca3af);
}
.stato-seg-feed-card-stato--in_lavorazione .status-dot {
  background: var(--color-status-progress, #d97706);
}
.stato-seg-feed-card-stato--integrata .status-dot,
.stato-seg-feed-card-stato--risolta .status-dot {
  background: var(--color-status-done, #2e7d32);
}
.stato-seg-feed-card-stato--rifiutata .status-dot {
  background: var(--color-status-alert, #c0392b);
}
.stato-seg-feed-card-meta {
  flex: 1 1 auto;
  font-size: 0.92rem;
}
.stato-seg-feed-card-meta strong {
  color: var(--color-text);
}
.stato-seg-feed-card-date {
  font-size: 0.85rem;
  color: var(--color-text-muted, rgba(0, 0, 0, 0.55));
  white-space: nowrap;
}
.stato-seg-feed-empty {
  padding: 20px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-text-muted, rgba(0, 0, 0, 0.55));
}

/* Skeleton loading ──────────────────────────────────────────── */
.stato-seg-feed-skel {
  display: grid;
  gap: 12px;
}
.stato-seg-feed-skel-card {
  height: 60px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.07), rgba(0, 0, 0, 0.04));
  background-size: 200% 100%;
  animation: stato-seg-skel 1.4s ease-in-out infinite;
}
@keyframes stato-seg-skel {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* Error/empty states ───────────────────────────────────────── */
.stato-seg-error {
  padding: 16px 18px;
  background: rgba(192, 57, 43, 0.06);
  border-left: 3px solid #c0392b;
  border-radius: 6px;
  color: var(--color-text);
}
.stato-seg-error strong {
  display: block;
  margin-bottom: 4px;
}

/* Mobile (< 480px) */
@media (max-width: 480px) {
  .stato-seg-row {
    flex-direction: column;
  }
  .stato-seg-input {
    width: 100%;
    min-width: 0;
  }
  .stato-seg-row .hd-btn {
    width: 100%;
  }
  .stato-seg-feed-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .stato-seg-feed-card-date {
    width: 100%;
  }
}

/* Dark mode hints ──────────────────────────────────────────── */
[data-theme='dark'] .stato-seg-feed-card-stato {
  background: rgba(255, 255, 255, 0.06);
}
[data-theme='dark'] .stato-seg-timeline-note {
  background: rgba(255, 255, 255, 0.03);
}
[data-theme='dark'] .stato-seg-feed-skel-card {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
}
