/* Revisão do piloto da fase 4 (Agência Sete Clave): cores das marcações, balões e legenda. */
[data-rv-tipo] { color: inherit; padding: 0 .08em; border-radius: 2px; cursor: help; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
[data-rv-tipo="entrou"] { background: #fff1a8; box-shadow: inset 0 -2px 0 #e6c200; }
[data-rv-tipo="nova"] { background: #d3e8ff; box-shadow: inset 0 -2px 0 #3b82f6; }
[data-rv-tipo="saiu"] { color: #b42318; background: #fde4e2; text-decoration: line-through; text-decoration-thickness: 2px; cursor: help; padding: 0 .08em; border-radius: 2px; }
.rv-ativa { outline: 3px solid #f97316; outline-offset: 3px; transition: outline-color .3s; }

.rv-balao { position: absolute; z-index: 2147483000; max-width: 340px; background: #1f2933; color: #fff; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; padding: 10px 12px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25); pointer-events: none; }
.rv-balao strong { display: block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.rv-balao[data-tipo="entrou"] strong { color: #ffe066; }
.rv-balao[data-tipo="nova"] strong { color: #93c5fd; }
.rv-balao[data-tipo="saiu"] strong { color: #fca5a5; }

.rv-nota-toque { display: block; margin: 8px 0 12px; background: #1f2933; color: #fff; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; padding: 10px 12px; border-radius: 8px; }
.rv-nota-toque strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }

.rv-legenda { position: fixed; z-index: 2147482000; left: 16px; top: 50%; transform: translateY(-50%); width: 230px; background: #fff; color: #1f2933; border: 1px solid #d9dee3; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; padding: 14px; }
.rv-legenda h2 { all: unset; display: block; font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px; color: #0e7490; }
.rv-legenda ul { list-style: none; margin: 0 0 12px; padding: 0; }
.rv-legenda li { margin: 0 0 8px; padding: 0; display: flex; gap: 8px; align-items: flex-start; }
.rv-legenda li::before { content: none; }
.rv-amostra { flex: none; display: inline-block; width: 26px; height: 16px; border-radius: 3px; margin-top: 2px; }
.rv-amostra.entrou { background: #fff1a8; box-shadow: inset 0 -2px 0 #e6c200; }
.rv-amostra.nova { background: #d3e8ff; box-shadow: inset 0 -2px 0 #3b82f6; }
.rv-amostra.saiu { background: #fde4e2; position: relative; }
.rv-amostra.saiu::after { content: ""; position: absolute; left: 3px; right: 3px; top: 7px; border-top: 2px solid #b42318; }
.rv-nav { display: flex; align-items: center; gap: 8px; border-top: 1px solid #e5e9ed; padding-top: 10px; margin-bottom: 10px; }
.rv-nav button { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 8px; background: #0e7490; color: #fff; text-align: center; line-height: 34px; font-size: 16px; }
.rv-nav button:focus-visible { outline: 3px solid #f97316; }
.rv-nav span { flex: 1; text-align: center; font-size: 13px; }
.rv-legenda a { color: #0e7490; text-decoration: underline; font-size: 13px; display: block; margin-top: 6px; overflow-wrap: anywhere; }
.rv-legenda .rv-aviso { font-size: 12px; color: #52606d; margin-top: 10px; }
.rv-fechar { display: none; }

.rv-botao { display: none; }

.rv-recado { position: fixed; z-index: 2147483001; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1f2933; color: #fff; font: 15px/1.4 system-ui, sans-serif; padding: 12px 18px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.3); max-width: 90vw; }

/* Sem lateral livre (abaixo de 1500 px): a legenda vira um botão no canto de baixo, que abre a mesma legenda. */
@media (max-width: 1499px) {
  .rv-legenda { top: auto; bottom: 80px; transform: none; display: none; max-height: 70vh; overflow: auto; }
  .rv-legenda.aberta { display: block; }
  .rv-legenda .rv-fechar { all: unset; display: block; position: absolute; right: 8px; top: 6px; cursor: pointer; font-size: 22px; line-height: 1; padding: 4px 8px; }
  .rv-botao { position: fixed; left: 16px; bottom: 20px; z-index: 2147482001; display: flex; align-items: center; gap: 8px; cursor: pointer; background: #0e7490; color: #fff; font: 600 14px/1 system-ui, sans-serif; padding: 12px 14px; border: 0; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
}
