/* ==========================================================================
   THR Leads · front.css
   Herda os tokens do tema "THR — Djoni Carvalho" (Papel & Ouro · Jost + Josefin Sans).
   Os valores depois da vírgula são reservas caso o tema mude.
   ========================================================================== */

.thrl-box, .thrl-page, .thrl-room, .thrl-webinar-hero, .thrl-confirm {
	--tl-ink: var(--tinta, #141414);
	--tl-accent: var(--oxblood, #8A6400);
	--tl-accent-2: var(--oxblood-2, #6F5000);
	--tl-gold: var(--ouro, #FFBA00);
	--tl-line: var(--linha, #E0DCD2);
	--tl-paper: var(--papel, #FCFBF8);
	--tl-sand: var(--areia, #ECE9E2);
	--tl-gray: var(--cinza, #67635B);
	--tl-night: var(--noite, #121212);
	--tl-night-2: var(--noite-2, #1B1B1B);
	--tl-label: var(--mono, "Josefin Sans", "Jost", system-ui, sans-serif);
	--tl-text: var(--serif, "Jost", "Futura", system-ui, sans-serif);
	--tl-radius: var(--radius, 2px);
}

/* Botões de reserva (o tema sobrescreve — :where tem especificidade zero) */
:where(.thrl-box, .thrl-page, .thrl-room, .thrl-confirm) :where(.btn) {
	display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
	font-family: var(--tl-label); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	padding: 1rem 1.4rem; min-height: 50px; border-radius: var(--tl-radius); text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
:where(.thrl-box, .thrl-page, .thrl-room, .thrl-confirm) :where(.btn--primary) { background: var(--tl-accent); color: var(--tl-paper); }

/* ---------- Caixa do formulário ---------- */
.thrl-box { font-family: var(--tl-text); color: var(--tl-ink); }
.thrl-box--card { background: var(--tl-paper); border: 1px solid var(--tl-line); padding: clamp(1.4rem, 4vw, 2.2rem); border-radius: var(--tl-radius); box-shadow: var(--shadow, 0 12px 32px -18px rgba(20,20,20,.28)); position: relative; }
.thrl-box--card::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 1px; background: var(--tl-accent); }
.thrl-box--escuro { background: var(--tl-night); color: #EEEBE5; padding: clamp(1.4rem, 4vw, 2.2rem); border-left: 1px solid var(--tl-gold); }
.thrl-box--escuro .thrl-box__title { color: #F7F5F0; }
.thrl-box--escuro .thrl-box__text, .thrl-box--escuro .thrl-label, .thrl-box--escuro .thrl-check { color: #BDB7AD; }
.thrl-box--escuro .thrl-form input:not([type=checkbox]):not([type=radio]) { background: var(--tl-night-2); border-color: #3A3833; color: #F7F5F0; }
.thrl-box--escuro .btn--primary { background: var(--tl-gold); color: var(--tl-ink); }
.thrl-box--limpo { padding: 0; }
.thrl-box .thrl-box__title, .prose .thrl-box .thrl-box__title { margin-top: 0; }
.thrl-box__title { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); font-weight: 500; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.01em; }
.thrl-box__text { color: var(--tl-gray); font-size: .98rem; line-height: 1.55; margin: 0 0 1.4rem; }

/* ---------- Campos ---------- */
.thrl-form { display: grid; gap: 1rem; margin: 0; }
.thrl-field { display: grid; gap: .4rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.thrl-label { font-family: var(--tl-label); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tl-ink); padding: 0; }
.thrl-label em, .thrl-label small { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--tl-gray); font-size: .78rem; }
.thrl-form input:not([type=checkbox]):not([type=radio]) {
	width: 100%; font: inherit; font-size: 1rem; line-height: 1.3; color: var(--tl-ink);
	background: #fff; border: 1px solid var(--tl-line); border-radius: var(--tl-radius);
	padding: .85rem 1rem; min-height: 50px; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.thrl-form input:focus { outline: none; border-color: var(--tl-accent); box-shadow: 0 0 0 3px rgba(255, 186, 0, .22); }
.thrl-form input[aria-invalid=true] { border-color: #B3261E; }
.thrl-check { display: grid; grid-template-columns: 20px 1fr; gap: .7rem; align-items: start; font-size: .86rem; line-height: 1.5; color: var(--tl-gray); cursor: pointer; }
.thrl-check input, .thrl-radio input { width: 18px; height: 18px; margin: .12rem 0 0; accent-color: var(--tl-accent); }
.thrl-check a { color: inherit; }
.thrl-radio { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; cursor: pointer; }
.thrl-submit { width: 100%; margin-top: .25rem; }
.thrl-submit[disabled] { opacity: .6; cursor: progress; }
.thrl-msg { margin: 0; font-size: .9rem; min-height: 1.2em; color: var(--tl-gray); }
.thrl-msg:empty { display: none; }
.thrl-msg.is-error { color: #B3261E; }
.thrl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.thrl-success { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 0 .25rem; }
.thrl-success p { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.thrl-success__mark { flex: none; width: 28px; height: 28px; border: 1px solid var(--tl-accent); border-radius: 50%; position: relative; margin-top: .1rem; }
.thrl-success__mark::after { content: ""; position: absolute; left: 9px; top: 5px; width: 7px; height: 12px; border: solid var(--tl-accent); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.thrl-form--plain { max-width: 520px; margin-top: 1.5rem; }
.thrl-inline-form { margin-top: 1.25rem; }

/* ---------- Webinário: página de inscrição ---------- */
.thrl-webinar__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 960px) {
	.thrl-webinar__grid { grid-template-columns: 1.1fr .9fr; }
	.thrl-webinar__form { position: sticky; top: 96px; }
}
.thrl-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-family: var(--tl-label); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tl-gray); margin: 0 0 2rem; }
.thrl-meta span { display: inline-flex; align-items: center; gap: .6rem; }
.thrl-meta span + span::before { content: ""; width: 1px; height: 1em; background: var(--tl-accent); }
.thrl-webinar__img { margin: 0 0 2rem; }
.thrl-webinar__img img { width: 100%; height: auto; }
.thrl-h3 { font-size: var(--fs-h3, 1.5rem); margin: 0 0 .75rem; }

.thrl-sessions { gap: .9rem; }
.thrl-day { display: grid; gap: .45rem; }
.thrl-day__label { font-size: .88rem; color: var(--tl-gray); text-transform: capitalize; }
.thrl-slots { display: flex; flex-wrap: wrap; gap: .5rem; }
.thrl-slot { position: relative; cursor: pointer; }
.thrl-slot input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.thrl-slot span { display: inline-block; font-family: var(--tl-label); font-size: .88rem; letter-spacing: .06em; padding: .6rem .95rem; border: 1px solid var(--tl-line); background: #fff; border-radius: 99px; transition: all .15s; }
.thrl-slot input:checked + span { background: var(--tl-ink); border-color: var(--tl-ink); color: var(--tl-gold); }
.thrl-slot input:focus-visible + span { outline: 2px solid var(--tl-accent); outline-offset: 2px; }
.thrl-slot:hover span { border-color: var(--tl-ink); }
.thrl-single-session { margin: 0; font-size: 1.05rem; }
.thrl-single-session small, .thrl-tzhint { color: var(--tl-gray); font-size: .82rem; }
.thrl-tzhint { margin: 0; }

/* ---------- Contagem regressiva ---------- */
.thrl-countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--tl-line); border: 1px solid var(--tl-line); max-width: 480px; margin: 2rem 0; }
.thrl-countdown > div { background: var(--tl-paper); padding: 1rem .5rem; text-align: center; }
.thrl-countdown b { display: block; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
.thrl-countdown span { display: block; font-family: var(--tl-label); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tl-gray); margin-top: .5rem; }
.thrl-countdown--dark { background: #2A2926; border-color: #2A2926; margin-inline: auto; }
.thrl-countdown--dark > div { background: var(--tl-night); }
.thrl-countdown--dark b { color: var(--tl-gold); }
.thrl-countdown--dark span { color: #9C968C; }

/* ---------- Confirmação ---------- */
.thrl-steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 2rem; display: grid; gap: 0; }
.thrl-steps li { counter-increment: s; position: relative; padding: 1.25rem 0 1.25rem 3rem; border-top: 1px solid var(--tl-line); }
.thrl-steps li::before { content: "0" counter(s); position: absolute; left: 0; top: 1.3rem; font-family: var(--tl-label); font-size: .78rem; letter-spacing: .1em; color: var(--tl-accent); }
.thrl-steps .btn-row { margin-top: .9rem; }
.thrl-copy { display: flex; gap: .5rem; margin-top: .9rem; max-width: 560px; }
.thrl-copy input { flex: 1; min-width: 0; font: inherit; font-size: .88rem; padding: .6rem .8rem; border: 1px solid var(--tl-line); background: #fff; color: var(--tl-gray); border-radius: var(--tl-radius); }

/* ---------- Sala ---------- */
.thrl-room { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); min-height: 70vh; }
.thrl-room__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .5rem 2rem; margin-bottom: 1.5rem; }
.thrl-room__title { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.3rem); margin: 0; color: #F7F5F0; }
.thrl-room__when { margin: 0; font-family: var(--tl-label); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: #9C968C; }
.thrl-room .eyebrow { margin-bottom: .6rem; }
.thrl-live { display: inline-flex; align-items: center; gap: .55rem; color: var(--tl-gold); }
.thrl-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #E5484D; box-shadow: 0 0 0 0 rgba(229, 72, 77, .6); animation: thrl-pulse 1.8s infinite; }
@keyframes thrl-pulse { 70% { box-shadow: 0 0 0 10px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }

.thrl-stage { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid #2A2926; overflow: hidden; }
.thrl-stage:fullscreen { border: 0; }
.thrl-player, .thrl-stage iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; display: block; background: #000; }
.thrl-shield { position: absolute; inset: 0; z-index: 2; }
.thrl-stage--wait { display: grid; place-items: center; background: radial-gradient(120% 120% at 50% 0%, #1F1E1B 0%, #0B0B0B 70%); }
.thrl-stage__inner { text-align: center; padding: 2rem 1.25rem; }
.thrl-stage__label { font-size: clamp(1.05rem, 1rem + .5vw, 1.35rem); color: #EEEBE5; margin: 0; }
.thrl-stage__hint { color: #9C968C; font-size: .9rem; margin: 0 0 1.25rem; }
@media (max-width: 640px) {
	.thrl-stage--wait { aspect-ratio: auto; min-height: 340px; }
	.thrl-countdown b { font-size: 1.6rem; }
}
.thrl-enter {
	position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem;
	background: rgba(8, 8, 8, .72); color: #F7F5F0; border: 0; cursor: pointer; font-family: var(--tl-label); font-size: .86rem; letter-spacing: .14em; text-transform: uppercase;
	-webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.thrl-enter small { font-family: var(--tl-text); text-transform: none; letter-spacing: 0; font-size: .85rem; color: #BDB7AD; }
.thrl-enter__play { width: 76px; height: 76px; border-radius: 50%; border: 1px solid var(--tl-gold); position: relative; transition: transform .2s, background .2s; }
.thrl-enter__play::after { content: ""; position: absolute; left: 31px; top: 25px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent var(--tl-gold); }
.thrl-enter:hover .thrl-enter__play { transform: scale(1.06); background: rgba(255, 186, 0, .1); }
.thrl-enter[hidden] { display: none; }
.thrl-ended { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: rgba(8, 8, 8, .9); color: #EEEBE5; text-align: center; padding: 1.5rem; }
.thrl-ended[hidden] { display: none; }
.thrl-room__tools { display: flex; gap: .6rem; justify-content: flex-end; margin-top: .75rem; }
.thrl-cta { margin-top: 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding: 1.4rem 1.6rem; border: 1px solid var(--tl-gold); background: var(--tl-night-2); animation: thrl-in .5s ease; }
.thrl-cta[hidden] { display: none; }
.thrl-cta p { margin: 0; color: #EEEBE5; font-size: 1.05rem; }
.thrl-room .thrl-cta .btn--primary { background: var(--tl-gold); color: var(--tl-ink); }
.thrl-room .thrl-cta .btn--primary:hover { background: #FFCB3D; color: var(--tl-ink); }
@keyframes thrl-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body.thrl-is-room .whatsapp-float, body.thrl-is-room .wa-float { display: none !important; }
.thrl-webinar-content .prose > :first-child { margin-top: 0; }
.thrl-room__tools .btn { background: transparent; }
.thrl-check--wa { background: rgba(37, 211, 102, .07); border: 1px solid rgba(37, 211, 102, .35); padding: .75rem .85rem; border-radius: var(--tl-radius); color: var(--tl-ink); }
.thrl-inpost { margin: 2.6rem 0; }
.thrl-inpost .thrl-box--card { box-shadow: none; }
.prose .thrl-inpost .thrl-box__title { margin-top: 0; font-size: 1.4rem; }
.prose .thrl-inpost p.thrl-box__text { font-size: .98rem; margin: 0 0 1.2rem; }
.prose .thrl-inpost label, .prose .thrl-inpost input { font-size: 1rem; }
.thrl-archive-form { grid-column: 1 / -1; margin: 3rem 0 1rem; }

/* ---------- Aplicações (v1.4) ---------- */
.thrl-app .thrl-form { gap: 1.6rem; }
.thrl-app__part { display: grid; gap: 1.15rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.thrl-app__legend { display: flex; align-items: baseline; gap: .7rem; width: 100%; padding: 0 0 .6rem; margin-bottom: .2rem; border-bottom: 1px solid var(--tl-line); font-family: var(--tl-label); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--tl-ink); }
.thrl-app__legend span { color: var(--tl-accent); font-size: .72rem; }
.thrl-label--q { text-transform: none; letter-spacing: 0; font-family: inherit; font-size: 1rem; line-height: 1.45; font-weight: 500; }
.thrl-help { display: block; font-size: .84rem; line-height: 1.5; color: var(--tl-gray); margin-top: -.15rem; }
.thrl-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; line-height: 1.55; padding: .75rem .9rem; border: 1px solid var(--tl-line); border-radius: var(--tl-radius); background: #fff; color: var(--tl-ink); resize: vertical; min-height: 7rem; }
.thrl-form textarea:focus { outline: none; border-color: var(--tl-accent); box-shadow: 0 0 0 3px rgba(255, 186, 0, .22); }
.thrl-form textarea[aria-invalid=true] { border-color: #B3261E; }
.thrl-opts { display: grid; gap: .1rem; }
.thrl-opts--row { display: flex; flex-wrap: wrap; gap: .2rem 1.6rem; }
.thrl-opts .thrl-radio { align-items: flex-start; line-height: 1.45; }
.thrl-opts .thrl-radio input { flex: none; }
.thrl-scale .thrl-slot span { min-width: 2.6rem; text-align: center; padding: .55rem .5rem; }
.thrl-scale__ends { display: flex; justify-content: space-between; max-width: 32rem; font-size: .75rem; color: var(--tl-gray); letter-spacing: .06em; text-transform: uppercase; }
.thrl-box--escuro .thrl-form textarea { background: var(--tl-night-2); border-color: #3A3833; color: #F7F5F0; }
.thrl-box--escuro .thrl-app__legend { color: #F7F5F0; border-color: #3A3833; }
.thrl-box--escuro .thrl-help, .thrl-box--escuro .thrl-radio { color: #BDB7AD; }

/* ---------- Aplicação em etapas (1.4.1) ---------- */
.thrl-form [hidden] { display: none !important; }
.thrl-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
.thrl-progress { display: grid; gap: .5rem; }
.thrl-progress__top { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--tl-label); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tl-gray); }
.thrl-progress__bar { height: 3px; background: var(--tl-line); border-radius: 3px; overflow: hidden; }
.thrl-progress__bar i { display: block; height: 100%; width: 0; background: var(--tl-gold); transition: width .35s ease; }
.thrl-form.is-stepped .thrl-app__part { animation: thrl-step-in .28s ease both; }
@keyframes thrl-step-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.thrl-form.is-stepped .thrl-app__part .thrl-field + .thrl-field { margin-top: .35rem; }
.thrl-app__stephelp { margin: -.35rem 0 .1rem; }
.thrl-app__end { display: grid; gap: 1rem; }
.thrl-stepnav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap-reverse; }
.thrl-stepnav .thrl-next { margin-left: auto; }
.thrl-back { background: none; border: 0; padding: .5rem 0; font: inherit; font-family: var(--tl-label); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tl-gray); cursor: pointer; }
.thrl-back:hover, .thrl-back:focus-visible { color: var(--tl-ink); }
.thrl-app__end .thrl-back { justify-self: start; }
.thrl-form.is-stepped[data-thrl-steps="uma"] .thrl-label--q { font-size: 1.2rem; line-height: 1.4; }
@media (max-width: 520px) { .thrl-stepnav .thrl-next { width: 100%; justify-content: center; } .thrl-stepnav { flex-direction: column-reverse; align-items: stretch; } .thrl-back { align-self: flex-start; } }
.thrl-box--escuro .thrl-progress__bar { background: #3A3833; }
.thrl-box--escuro .thrl-back:hover { color: #F7F5F0; }
@media (prefers-reduced-motion: reduce) { .thrl-form.is-stepped .thrl-app__part { animation: none; } .thrl-progress__bar i { transition: none; } }
