/* TeenGira — modulo «Porta i tuoi capi» (18/10/2026). Pensato per il telefono: una colonna, bottoni grandi, rosso e nero. */
:root { --tv-red: #e30613; --tv-ink: #111; --tv-muted: #666; --tv-line: #e6e6e6; --tv-soft: #f6f6f6; --tv-ok: #0a7d38; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--tv-ink); font: 16px/1.5 Inter, system-ui, sans-serif; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }

.tv-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 76px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--tv-line); }
.tv-back { width: 40px; font-size: 22px; color: var(--tv-ink); text-decoration: none; }
.tv-logo img { display: block; height: 66px; width: auto; }
.tv-step { width: 40px; text-align: right; color: var(--tv-muted); font-size: 12px; white-space: nowrap; }

.tv-main { max-width: 560px; margin: 0 auto; padding: 24px 16px 40px; }
.tv-kicker { color: var(--tv-red); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { font-family: Archivo, Inter, sans-serif; font-weight: 900; line-height: 1.05; margin: 8px 0 18px; }
h1 { font-size: clamp(32px, 9vw, 44px); }
h1 em { font-style: normal; color: var(--tv-red); }
h2 { font-size: 28px; }
h3 { font-size: 20px; margin: 0; }

.tv-how { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.tv-how li { display: flex; gap: 12px; align-items: flex-start; }
.tv-how b { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--tv-ink); color: #fff; display: grid; place-items: center; font-size: 14px; }
.tv-accept { padding: 14px 16px; border-left: 4px solid var(--tv-red); background: var(--tv-soft); margin-bottom: 22px; }
.tv-accept p { margin: 4px 0 0; font-size: 14px; color: #333; }
.tv-small { color: var(--tv-muted); font-size: 13px; margin: 14px 0 0; }

.tv-btn { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 6px; background: var(--tv-red); color: #fff; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer; margin-top: 18px; }
.tv-btn:disabled { background: #ccc; cursor: default; }
.tv-btn.is-busy { opacity: .7; pointer-events: none; }
.tv-link { display: block; margin: 14px auto 0; border: 0; background: none; color: var(--tv-muted); text-decoration: underline; cursor: pointer; }
.tv-add { width: 100%; min-height: 54px; border: 2px dashed #bbb; border-radius: 8px; background: #fff; font-weight: 700; cursor: pointer; }

.tv-list { display: grid; gap: 10px; margin-bottom: 12px; }
.tv-item { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--tv-line); border-radius: 8px; }
.tv-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--tv-soft); }
.tv-item-info { flex: 1; min-width: 0; }
.tv-item-info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-item-info span { display: block; color: var(--tv-muted); font-size: 13px; }
.tv-item-info em { font-style: normal; color: var(--tv-ok); font-weight: 700; font-size: 14px; }
.tv-item-info em.is-low { color: var(--tv-muted); font-weight: 500; }
.tv-item-actions { display: flex; flex-direction: column; gap: 4px; }
.tv-item-actions button { border: 0; background: none; color: var(--tv-muted); font-size: 13px; text-decoration: underline; cursor: pointer; padding: 2px; }

.tv-total { margin-top: 16px; padding: 14px 16px; border-radius: 8px; background: var(--tv-ink); color: #fff; }
.tv-total b { font-size: 22px; font-family: Archivo, Inter, sans-serif; }
.tv-total small { display: block; color: #bbb; font-size: 12px; margin-top: 2px; }

.tv-sheet { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
.tv-sheet-card { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 16px 16px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .tv-sheet { align-items: center; } .tv-sheet-card { border-radius: 14px; } }
.tv-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tv-x { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; }

.tv-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tv-photo { position: relative; aspect-ratio: 1; border: 2px dashed #bbb; border-radius: 8px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; cursor: pointer; background: var(--tv-soft) center/cover no-repeat; }
.tv-photo::before { content: "+"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%); font-size: 30px; color: #999; }
.tv-photo span { position: relative; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #555; background: rgba(255,255,255,.85); padding: 1px 6px; border-radius: 4px; }
.tv-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tv-photo.has-photo { border-style: solid; border-color: var(--tv-ink); }
.tv-photo.has-photo::before { content: none; }

.tv-field { display: block; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.tv-field small { color: var(--tv-muted); font-weight: 400; }
.tv-field input, .tv-field select, .tv-field textarea { display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 10px 12px; border: 1px solid #ccc; border-radius: 6px; background: #fff; font-size: 16px; font-weight: 400; }
.tv-field textarea { min-height: 0; resize: vertical; }
.tv-field input:focus, .tv-field select:focus, .tv-field textarea:focus { outline: 2px solid var(--tv-ink); border-color: var(--tv-ink); }
.tv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tv-euro { position: relative; display: block; }
.tv-euro b { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); margin-top: 3px; color: var(--tv-muted); }

.tv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tv-chip { min-height: 44px; padding: 8px 14px; border: 1px solid #ccc; border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.tv-chip small { display: block; font-weight: 400; color: var(--tv-muted); font-size: 12px; }
.tv-chip.is-on { border-color: var(--tv-ink); background: var(--tv-ink); color: #fff; }
.tv-chip.is-on small { color: #ccc; }

.tv-estimate { padding: 12px 14px; border-radius: 8px; background: #eef8f1; color: #064d23; font-size: 14px; margin-bottom: 4px; }
.tv-estimate b { font-size: 18px; }
.tv-estimate.is-low { background: var(--tv-soft); color: #444; }

.tv-error { color: var(--tv-red); font-weight: 600; font-size: 14px; margin: 10px 0 0; }
.tv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tv-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 6px 0; }
.tv-check input { width: 22px; height: 22px; margin: 0; flex: 0 0 22px; accent-color: var(--tv-red); }
.tv-check a { color: inherit; }

.tv-done { text-align: center; padding-top: 30px; }
.tv-done-mark { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; background: var(--tv-ok); color: #fff; display: grid; place-items: center; font-size: 38px; }
.tv-foot { text-align: center; color: #999; font-size: 12px; padding: 20px 16px 30px; }

/* Valore del credito (Silvana 18/10: far percepire credito + cashback) */
.tv-value { padding: 16px; border-radius: 8px; background: var(--tv-red); color: #fff; margin-bottom: 14px; }
.tv-value b { display: block; font-family: Archivo, Inter, sans-serif; font-size: 20px; font-weight: 900; }
.tv-value p { margin: 6px 0 0; font-size: 14px; }
.tv-value .tv-value-cash { opacity: .85; font-size: 13px; }
.tv-plus { display: block; margin-top: 4px; font-weight: 700; color: var(--tv-red); }
.tv-estimate small, .tv-total small { display: block; margin-top: 4px; }
.tv-total .tv-plus { color: #ff5a63; }
.tv-lead { margin: -6px 0 18px; font-size: 17px; color: #333; }
.tv-value .tv-example { margin-top: 10px; padding: 10px 12px; border-radius: 6px; background: rgba(0,0,0,.18); font-size: 13px; }

/* 18/10: X per togliere la foto; riquadro «Entra / Registrati» dopo il primo capo */
.tv-photo-x { position: absolute; top: 4px; right: 4px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.75); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.tv-photo-x[hidden] { display: none; }
.tv-gate { margin: 0 0 14px; padding: 16px; border-radius: 10px; background: #111; color: #fff; }
.tv-gate[hidden] { display: none; }
.tv-gate b { font-size: 18px; }
.tv-gate p { margin: 6px 0 12px; color: #ddd; font-size: 14px; }
.tv-gate-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tv-gate-btns .tv-btn { margin-top: 0; min-height: 48px; }
.tv-btn-dark { background: #fff !important; color: #111 !important; }
