/* Turma do Ticket - Frontend */
.tdt-checkout, .tdt-portaria { max-width: 640px; margin: 0 auto; }
.tdt-box { background: #f4f4f5; border: 1px solid #e4e4e7; border-radius: 10px; padding: 16px; margin: 12px 0; color: #3f3f46; }
.tdt-warn { background: #fef3c7; border-color: #fde68a; color: #92400e; }

.tdt-event { background: #fff; border: 1px solid #e4e4e7; border-radius: 14px; padding: 20px; margin: 16px 0; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.tdt-event-title { margin: 0 0 6px; font-size: 22px; }
.tdt-event-meta { color: #52525b; font-size: 14px; margin: 2px 0; }
.tdt-event-desc { margin: 10px 0; color: #3f3f46; font-size: 15px; }

.tdt-types { margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.tdt-type { display: flex; align-items: center; justify-content: space-between; border: 1px solid #e4e4e7; border-radius: 10px; padding: 12px 14px; }
.tdt-type-info { display: flex; flex-direction: column; }
.tdt-type-name { font-weight: 600; }
.tdt-type-price { color: #52525b; font-size: 14px; }
.tdt-sold { color: #b91c1c; font-weight: 600; font-size: 14px; }

.tdt-qty { display: flex; align-items: center; gap: 8px; }
.tdt-qty button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #d4d4d8; background: #fafafa; font-size: 18px; cursor: pointer; line-height: 1; }
.tdt-qty button:hover { background: #f4f4f5; }
.tdt-qty-input { width: 42px; text-align: center; border: 1px solid #d4d4d8; border-radius: 8px; height: 34px; font-size: 16px; }

.tdt-buyer { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.tdt-buyer input { padding: 11px 12px; border: 1px solid #d4d4d8; border-radius: 8px; font-size: 15px; }
.tdt-total { text-align: right; font-size: 16px; margin: 8px 0; }
.tdt-buy { width: 100%; background: var(--tdt-brand, #0f766e); color: #fff; border: 0; padding: 14px; border-radius: 10px; font-size: 16px; font-weight: 700; cursor: pointer; }
.tdt-buy:hover { filter: brightness(.95); }
.tdt-external { display: block; text-align: center; margin-top: 10px; color: #52525b; font-size: 14px; text-decoration: underline; }

/* Modal */
.tdt-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 99999; padding: 16px; }
.tdt-modal[hidden] { display: none; }
.tdt-modal-card { background: #fff; border-radius: 14px; max-width: 380px; width: 100%; padding: 22px; position: relative; max-height: 92vh; overflow: auto; }
.tdt-modal-close { position: absolute; top: 8px; right: 10px; border: 0; background: transparent; font-size: 26px; cursor: pointer; color: #71717a; line-height: 1; }
.tdt-modal h3 { margin: 0 0 8px; }
.tdt-instr { font-size: 13px; color: #52525b; margin: 0 0 12px; }
.tdt-qr { display: flex; justify-content: center; margin: 6px 0; }
.tdt-qr svg { width: 220px; height: 220px; }
.tdt-amount { text-align: center; font-weight: 700; font-size: 18px; margin: 6px 0 12px; }
.tdt-copy-label { font-size: 12px; color: #71717a; display: block; margin-bottom: 4px; }
.tdt-copy-row { display: flex; gap: 6px; }
.tdt-copy-row input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid #d4d4d8; border-radius: 8px; font-size: 12px; font-family: monospace; }
.tdt-copy-row button { background: #27272a; color: #fff; border: 0; padding: 0 14px; border-radius: 8px; cursor: pointer; }
.tdt-status { text-align: center; margin: 14px 0; padding: 10px; border-radius: 8px; background: #f4f4f5; color: #3f3f46; font-size: 14px; }
.tdt-status-ok { background: #dcfce7; color: #166534; font-weight: 600; }
.tdt-paid { display: block; width: 100%; background: var(--tdt-brand, #0f766e); color: #fff; border: 0; padding: 12px; border-radius: 10px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; }
.tdt-hint { font-size: 12px; color: #71717a; margin-top: 10px; text-align: center; }

/* Portaria */
.tdt-portaria h3 { margin-top: 0; }
.tdt-portaria-event { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #d4d4d8; margin-bottom: 12px; font-size: 15px; }
.tdt-scanner { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; display: none; }
.tdt-portaria.scanning .tdt-scanner { display: block; }
.tdt-scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tdt-scan-overlay { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.8); border-radius: 12px; pointer-events: none; }
.tdt-scan-btn { width: 100%; background: var(--tdt-brand, #0f766e); color: #fff; border: 0; padding: 14px; border-radius: 10px; font-size: 16px; font-weight: 700; cursor: pointer; margin: 12px 0; }
.tdt-manual { display: flex; gap: 8px; margin: 8px 0; }
.tdt-manual input { flex: 1; padding: 12px; border: 1px solid #d4d4d8; border-radius: 8px; font-size: 15px; }
.tdt-manual button { background: #27272a; color: #fff; border: 0; padding: 0 18px; border-radius: 8px; cursor: pointer; }

.tdt-result { margin-top: 14px; padding: 18px; border-radius: 12px; text-align: center; min-height: 40px; font-size: 18px; }
.tdt-result:empty { display: none; }
.tdt-result-msg { font-size: 22px; font-weight: 800; }
.tdt-result-info { font-size: 15px; margin-top: 6px; opacity: .9; }
.tdt-result-ok { background: #16a34a; color: #fff; }
.tdt-result-fail { background: #dc2626; color: #fff; }
.tdt-result-used { background: #d97706; color: #fff; }
.tdt-result-checking { background: #f4f4f5; color: #3f3f46; }
