/* app/css/54-voucher.css — estratto da app.css (2026-07, split senza build). */
/* ==========================================================
   W5 · Voucher cliente (lista + dettaglio)
   ========================================================== */

/* Wrapper schermata voucher */
.voucher-screen { padding: 16px 18px 80px; }
.voucher-screen .intro { font-size: 14px; color: var(--ink-2); margin: 4px 2px 14px; }

/* Card voucher in lista — billboard tappable */
.voucher-card {
  display: block;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 44px 14px 16px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 120ms ease;
}
.voucher-card:active { background: var(--bg); }
.voucher-card .arr {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
}

.vc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 10px; }
.vc-amount { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.3px; }
.vc-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; font-weight: 700; color: var(--brand); letter-spacing: 0.5px; margin-bottom: 4px; }
.vc-meta { font-size: 12px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vc-sep { opacity: 0.6; }

/* Ticket detail header compatto: icon + kind/category + status chip in riga, meta sotto */
.td-header { padding: 14px 18px 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.td-header-row { display: flex; align-items: center; gap: 8px; }
.td-header-row .i { width: 18px; height: 18px; color: var(--ink-2); flex-shrink: 0; }
.td-title { font-size: 14px; font-weight: 700; color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-meta { font-size: 12px; color: var(--ink-3); margin-top: 6px; padding-left: 26px; }

/* Ticket detail thread (timeline messaggi cliente ↔ gestore) */
.td-thread { display: flex; flex-direction: column; gap: 10px; padding: 0 18px; margin-bottom: 16px; }
.td-msg { padding: 10px 14px; border-radius: 14px; max-width: 88%; }
.td-msg-meta { font-size: 11px; color: var(--ink-3); margin-bottom: 4px; font-weight: 600; }
.td-msg-body { font-size: 14px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; }
.td-msg--cliente { background: var(--bg); align-self: flex-end; border-bottom-right-radius: 4px; }
.td-msg--gestore { background: #F0FDF4; align-self: flex-start; border-bottom-left-radius: 4px; }
.td-empty { display: flex; align-items: flex-start; gap: 10px; padding: 14px; background: var(--bg); border-radius: 12px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.td-empty .i { width: 18px; height: 18px; color: var(--ink-3); flex-shrink: 0; margin-top: 2px; }

/* Form risposta cliente sotto la timeline */
.td-reply-form { padding: 14px 18px 24px; border-top: 1px solid var(--line); margin-top: 6px; }
.td-reply-label { display: block; font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; padding: 0 4px; }
.td-reply-form textarea { width: 100%; min-height: 90px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 16px; background: var(--surface); color: var(--ink); font-family: inherit; resize: vertical; }
.td-reply-form textarea:focus { border-color: var(--brand); outline: none; }
.td-reply-form .submit-btn { width: 100%; padding: 14px; background: var(--brand); color: #fff; border-radius: 12px; font-size: 15px; font-weight: 800; margin-top: 10px; }
.td-reply-form .submit-btn:active { background: var(--brand-hover); }

.td-closed-banner { display: flex; align-items: center; gap: 10px; margin: 14px 18px 24px; padding: 14px; background: var(--bg); border-radius: 12px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.td-closed-banner .i { width: 20px; height: 20px; color: var(--ok-text); flex-shrink: 0; }

/* Status badge — riusa il pattern del badge ma con varianti voucher */
.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-badge--emesso { background: #e8f5e9; color: #2e7d32; }
.status-badge--riscosso { background: var(--bg); color: var(--ink-2); }
.status-badge--scaduto { background: #fbe9e7; color: #c62828; }
.status-badge--annullato { background: var(--bg); color: var(--ink-3); text-decoration: line-through; }
/* Varianti proprie (Task 8, Porta un amico): stessi colori di sopra ma nomi
   scopati al lessico referral, per non confondere "In attesa"/"Arrivato"/
   "Scaduto" col lessico voucher (emesso/riscosso/scaduto) sopra. */
.status-badge--pending { background: var(--bg); color: var(--ink-2); }
.status-badge--rewarded { background: #e8f5e9; color: #2e7d32; }
.status-badge--expired { background: #fbe9e7; color: #c62828; }

/* Empty state riusabile (lista voucher vuota, ticket vuoti) */
.empty-state {
  text-align: center;
  padding: 56px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.empty-state .ico {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state .ico .i { width: 36px; height: 36px; }
.empty-state .ttl { font-size: 17px; font-weight: 800; color: var(--ink); margin-top: 4px; }
.empty-state .sub { font-size: 14px; line-height: 1.5; color: var(--ink-2); max-width: 320px; }
.empty-state--inline { padding: 32px 20px 16px; }

/* Voucher detail — QR frame + status banner (Step B userà queste classi) */
.voucher-detail { padding: 16px 18px 80px; }
.voucher-qr-frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin: 18px auto;
  max-width: 320px;
  text-align: center;
}
.voucher-qr-frame img { width: 100%; max-width: 260px; height: auto; image-rendering: pixelated; }
.voucher-qr-frame .vqr-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 16px; font-weight: 700; color: var(--brand); letter-spacing: 1px; margin-top: 14px; }
.voucher-qr-frame .vqr-hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

.voucher-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0 16px;
  font-size: 14px;
  font-weight: 600;
}
.voucher-banner--riscosso { background: #e8f5e9; color: #2e7d32; }
.voucher-banner--scaduto { background: #fbe9e7; color: #c62828; }
.voucher-banner--annullato { background: var(--bg); color: var(--ink-2); }
.voucher-banner .i { flex-shrink: 0; }

