/* Dez Anos — Studio Vanessa Kümmel
   Sala escura em veludo, mapa de assentos como carta impressa em papel,
   latão das lâmpadas de marquise como único acento. */

@import url('https://fonts.googleapis.com/css2?family=Prata&family=Karla:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --veludo: #3b1120;
  --veludo-fundo: #260b16;
  --papel: #f1e7d3;
  --papel-sombra: #ded0b6;
  --tinta: #2a2320;
  --tinta-fraca: #6d6055;
  --latao: #c9a24b;
  --latao-claro: #e6c988;
  --ocupado: #b9ab93;
  --erro: #ffb4a8;
  --raio: 3px;

  --f-display: 'Prata', Georgia, serif;
  --f-texto: 'Karla', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--veludo);
  color: var(--papel);
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.envelope { max-width: 580px; margin: 0 auto; padding: 0 18px 96px; }

/* ---------- Marquise ---------- */

.marquise {
  background: var(--veludo-fundo);
  padding: 34px 18px 28px;
  text-align: center;
  border-bottom: 1px solid rgba(201, 162, 75, .35);
  position: relative;
}

.lampadas {
  display: flex;
  justify-content: center;
  gap: 11px;
  margin-bottom: 22px;
}
.lampadas i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--latao);
  box-shadow: 0 0 7px rgba(230, 201, 136, .75);
}
.lampadas i:nth-child(even) { opacity: .45; box-shadow: none; }

.marquise h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 13vw, 3.9rem);
  line-height: .95;
  letter-spacing: .01em;
  margin: 0 0 10px;
  color: var(--papel);
}
.marquise .estudio {
  font-size: .95rem;
  letter-spacing: .16em;
  color: var(--latao-claro);
  margin: 0 0 18px;
}
.marquise .quando {
  font-size: .92rem;
  color: rgba(241, 231, 211, .72);
  margin: 0;
}
.marquise .quando span { display: block; }

/* ---------- Passos ---------- */

.passos {
  display: flex;
  gap: 4px;
  font-size: .78rem;
  letter-spacing: .04em;
  color: rgba(241, 231, 211, .45);
  padding: 18px 0 6px;
}
.passos b { font-weight: 500; }
.passos .atual { color: var(--latao-claro); }
.passos .feito { color: rgba(241, 231, 211, .8); }
.passos i { font-style: normal; opacity: .35; }

/* ---------- Blocos de conteúdo ---------- */

.tela { display: none; }
.tela.ativa { display: block; }

h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 12px 0 4px;
}
.legenda { color: rgba(241, 231, 211, .68); font-size: .93rem; margin: 0 0 20px; max-width: 46ch; }

/* ---------- Cartões de sessão e setor ---------- */

.opcao {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  background: transparent;
  color: var(--papel);
  border: 1px solid rgba(241, 231, 211, .22);
  border-radius: var(--raio);
  padding: 15px 16px;
  margin-bottom: 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.opcao:hover:not(:disabled) { border-color: var(--latao); }
.opcao:disabled { opacity: .4; cursor: not-allowed; }
.opcao .nome { font-size: 1.02rem; }
.opcao .livres { font-size: .84rem; color: var(--latao-claro); white-space: nowrap; }
.opcao .livres.esgotado { color: var(--ocupado); }

.grupo-setores { margin-bottom: 26px; }
.grupo-setores > p {
  font-size: .84rem; letter-spacing: .1em; color: rgba(241, 231, 211, .5);
  margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(241, 231, 211, .14);
}

/* ---------- Carta de assentos ---------- */

.carta {
  background: var(--papel);
  color: var(--tinta);
  border-radius: var(--raio);
  padding: 20px 8px 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
}

.rolagem { overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }

.dica-lado {
  text-align: center;
  font-size: .76rem;
  color: var(--tinta-fraca);
  margin: -12px 0 14px;
}

.palco {
  margin: 0 auto 22px;
  max-width: 62%;
  border-bottom: 2px solid var(--tinta);
  border-radius: 0 0 90% 90% / 0 0 26px 26px;
  height: 22px;
  text-align: center;
  font-size: .76rem;
  letter-spacing: .3em;
  color: var(--tinta-fraca);
}

.linha {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 6px;
  min-width: max-content;
}
.linha .rotulo {
  position: sticky;
  left: 0;
  z-index: 1;
  font-family: var(--f-display);
  font-size: .8rem;
  color: var(--tinta-fraca);
  width: 22px;
  text-align: center;
  flex: none;
  background: var(--papel);
  box-shadow: 6px 0 6px -4px var(--papel);
}

.assento {
  width: 30px; height: 30px;
  flex: none;
  border: 1px solid var(--papel-sombra);
  background: #fbf6ea;
  border-radius: 5px 5px 2px 2px;
  color: var(--tinta-fraca);
  font: 500 .68rem/1 var(--f-texto);
  cursor: pointer;
  padding: 0;
  transition: transform .12s ease, background .12s ease;
}
.assento:hover:not(:disabled) { border-color: var(--tinta); color: var(--tinta); }
.assento.escolhido {
  background: var(--latao);
  border-color: #a8842f;
  color: #2a2320;
  font-weight: 700;
  transform: scale(1.08);
}
.assento:disabled { background: var(--ocupado); border-color: var(--ocupado); color: #f1e7d3; cursor: not-allowed; }
.assento.bloqueado { background: transparent; border-color: transparent; cursor: default; }

.chaves {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 16px; padding: 0 12px;
  font-size: .78rem; color: var(--tinta-fraca);
}
.chaves span { display: flex; align-items: center; gap: 6px; }
.chaves em { width: 13px; height: 13px; border-radius: 4px 4px 1px 1px; display: block; }
.chaves .l { background: #fbf6ea; border: 1px solid var(--papel-sombra); }
.chaves .e { background: var(--latao); }
.chaves .o { background: var(--ocupado); }

/* ---------- Escolha de tipo ---------- */

.item {
  border: 1px solid rgba(241, 231, 211, .22);
  border-radius: var(--raio);
  padding: 13px 15px;
  margin-bottom: 9px;
}
.item .cabeca { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.item .lugar { font-family: var(--f-display); font-size: 1.15rem; }
.item .onde { font-size: .8rem; color: rgba(241, 231, 211, .55); }
.tipos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tipos button {
  font: inherit; font-size: .85rem;
  padding: 7px 11px;
  border: 1px solid rgba(241, 231, 211, .28);
  background: transparent; color: var(--papel);
  border-radius: var(--raio); cursor: pointer;
}
.tipos button[aria-pressed='true'] { background: var(--latao); border-color: var(--latao); color: #2a2320; font-weight: 700; }
.tipos button:disabled { opacity: .35; cursor: not-allowed; }

.contador { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.contador .botoes { display: flex; align-items: center; gap: 10px; }
.contador button {
  width: 34px; height: 34px; font: inherit; font-size: 1.1rem;
  background: transparent; color: var(--papel);
  border: 1px solid rgba(241, 231, 211, .28); border-radius: var(--raio); cursor: pointer;
}
.contador button:disabled { opacity: .3; cursor: not-allowed; }
.contador output { min-width: 1.4em; text-align: center; font-size: 1.05rem; }

/* ---------- Formulário ---------- */

label { display: block; font-size: .87rem; color: rgba(241, 231, 211, .78); margin-bottom: 6px; }
input[type='text'], input[type='email'], input[type='tel'] {
  width: 100%; font: inherit; color: var(--papel);
  background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(241, 231, 211, .25);
  border-radius: var(--raio); padding: 11px 12px; margin-bottom: 15px;
}
input:focus-visible, button:focus-visible, .assento:focus-visible {
  outline: 2px solid var(--latao-claro); outline-offset: 2px;
}

/* ---------- Barra fixa ---------- */

.barra {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--veludo-fundo);
  border-top: 1px solid rgba(201, 162, 75, .35);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  display: none;
}
.barra.ativa { display: block; }
.barra .interno { max-width: 580px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.barra .resumo { flex: 1; min-width: 0; font-size: .86rem; line-height: 1.35; }
.barra .resumo b { display: block; font-size: 1.05rem; font-weight: 500; }
.barra .resumo span { color: rgba(241, 231, 211, .6); }

.principal {
  font: inherit; font-weight: 700; font-size: .98rem;
  background: var(--latao); color: #2a2320;
  border: none; border-radius: var(--raio);
  padding: 13px 22px; cursor: pointer; white-space: nowrap;
}
.principal:disabled { background: var(--ocupado); color: #4a4238; cursor: not-allowed; }

.discreto {
  font: inherit; font-size: .88rem;
  background: none; border: none; color: rgba(241, 231, 211, .65);
  text-decoration: underline; cursor: pointer; padding: 8px 0;
}

/* ---------- Relógio da reserva ---------- */

.relogio {
  position: sticky; top: 0; z-index: 5;
  background: var(--latao); color: #2a2320;
  font-size: .87rem; font-weight: 500;
  text-align: center; padding: 9px 14px;
  margin: 0 -18px 18px;
}
.relogio.apertado { background: #b4472f; color: var(--papel); }

/* ---------- Avisos ---------- */

.aviso {
  border-left: 2px solid var(--latao);
  padding: 10px 0 10px 14px;
  margin: 16px 0;
  font-size: .88rem;
  color: rgba(241, 231, 211, .8);
}
.aviso.ruim { border-color: var(--erro); color: var(--erro); }

.rodape {
  margin-top: 40px; padding-top: 18px;
  border-top: 1px solid rgba(241, 231, 211, .14);
  font-size: .8rem; color: rgba(241, 231, 211, .45);
}
.rodape .versao { margin-top: 10px; font-size: .74rem; opacity: .7; letter-spacing: .04em; }

.vendedora {
  background: rgba(201, 162, 75, .12);
  border: 1px solid rgba(201, 162, 75, .3);
  border-radius: var(--raio);
  padding: 11px 14px; margin: 18px 0 0;
  font-size: .88rem;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Planta do teatro ---------- */

.planta { width: 100%; height: auto; display: block; }

.planta .parede { fill: none; stroke: var(--tinta); stroke-width: 1.4; opacity: .55; }
.planta .palco-caixa { fill: none; stroke: var(--tinta); stroke-width: 1.6; }
.planta .col-cab { text-anchor: middle; font: 9px/1 var(--f-texto); fill: var(--tinta-fraca); letter-spacing: .5px; }
.planta .rotulo-palco {
  text-anchor: middle; font: 10px/1 var(--f-texto);
  letter-spacing: 2.4px; fill: var(--tinta-fraca);
}
.planta .lado-nota {
  text-anchor: middle; font: .52rem/1 var(--f-texto);
  fill: var(--tinta-fraca); opacity: .75;
}

.planta .bloco polygon {
  fill: #fbf6ea; stroke: var(--papel-sombra); stroke-width: 1.2;
  transition: fill .12s ease, stroke .12s ease;
}
.planta .bloco text { text-anchor: middle; pointer-events: none; }
.planta .nome-bloco { font: 500 .62rem/1 var(--f-texto); fill: var(--tinta); }
.planta .conta-bloco { font: .56rem/1 var(--f-texto); fill: var(--tinta-fraca); }
.planta .miudo { font-size: .46rem; }

.planta .aberto { cursor: pointer; }
.planta .aberto:hover polygon,
.planta .aberto:focus-visible polygon { fill: var(--latao); stroke: #a8842f; }
.planta .aberto:focus-visible { outline: 2px solid var(--tinta); outline-offset: 2px; }

.planta .esgotado polygon { fill: var(--ocupado); stroke: var(--ocupado); }
.planta .esgotado .nome-bloco, .planta .esgotado .conta-bloco { fill: var(--papel); }

.planta .fechado polygon { fill: none; stroke: var(--papel-sombra); stroke-dasharray: 3 3; }
.planta .fechado .nome-bloco, .planta .fechado .conta-bloco { fill: var(--tinta-fraca); opacity: .6; }

.planta.mini { max-width: 128px; margin: 0 auto 16px; }
.planta.mini .rotulo-palco { font-size: 19px; letter-spacing: 2px; }
.planta.mini .palco-caixa, .planta.mini .parede { stroke-width: 2.6; }
.planta .apagado polygon { fill: none; stroke: var(--papel-sombra); stroke-width: 1.6; }
.planta .atual polygon { fill: var(--latao); stroke: #a8842f; stroke-width: 1.6; }
