/* Revisão do cliente: barra, marcadores, cartão, lista e janelas. Só aparece com ?r=CHAVE. */

#rv {
  --rv-escuro: #0c3346;
  --rv-tinta: #10354a;
  --rv-suave: #5b7381;
  --rv-amarelo: #fec724;
  --rv-laranja: #f7861c;
  --rv-verde: #22935a;
  --rv-linha: rgba(16, 53, 74, 0.12);
  --rv-ease: cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1000;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--rv-tinta);
}
#rv *, #rv *::before, #rv *::after { box-sizing: border-box; }
#rv [hidden] { display: none !important; } /* senão o display da janela/lista vence o hidden e cobre a página */
#rv button { font-family: inherit; }
#rv svg { flex: none; }

/* modo comentar: cursor de alfinete e nada de seleção de texto */
html.rv-modo, html.rv-modo * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M16 31s-10-9.6-10-17a10 10 0 0 1 20 0c0 7.4-10 17-10 17z' fill='%23FEC724' stroke='%230C3346' stroke-width='2'/%3E%3Cpath d='M16 9v10M11 14h10' stroke='%230C3346' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") 16 31, crosshair !important;
  user-select: none !important;
}
html.rv-modo #rv .rv-barra, html.rv-modo #rv .rv-barra * { cursor: pointer !important; }

/* ---------- barra ---------- */
.rv-barra {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 1010;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(12, 51, 70, 0.94);
  box-shadow: 0 18px 40px -14px rgba(5, 22, 32, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
  animation: rv-sobe 0.9s var(--rv-ease) 0.4s both;
}
@keyframes rv-sobe { from { transform: translate(-50%, 140%); } }
.rv-b {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.35s, color 0.35s, transform 0.4s var(--rv-ease);
}
.rv-b svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.rv-b:hover { background: rgba(255, 255, 255, 0.1); }
.rv-b:active { transform: scale(0.96); }
.rv-b:focus-visible { outline: 2px solid var(--rv-amarelo); outline-offset: 2px; }
.rv-b-comentar { background: var(--rv-amarelo); color: var(--rv-escuro); }
.rv-b-comentar:hover { background: #ffd54d; }
.rv-b-comentar[aria-pressed="true"] { background: #fff; color: var(--rv-escuro); }
.rv-b-lista .rv-n { font-weight: 700; }
.rv-b-concluir.rv-enviada { color: #8be3b2; }
.rv-b-ajuda { width: 46px; padding: 0; justify-content: center; font-size: 17px; font-weight: 600; color: rgba(255, 255, 255, 0.75); }

.rv-dica {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 1010;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--rv-amarelo);
  color: var(--rv-escuro);
  font-size: 14.5px;
  font-weight: 500;
  box-shadow: 0 12px 28px -12px rgba(5, 22, 32, 0.5);
  transform: translateX(-50%);
  animation: rv-dica 0.5s var(--rv-ease) both;
  pointer-events: none;
}
.rv-dica::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
}
@keyframes rv-dica { from { opacity: 0; transform: translate(-50%, 10px); } }

/* contorno do que vai receber o comentário */
.rv-foco {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1001;
  border: 2px dashed var(--rv-amarelo);
  border-radius: 12px;
  background: rgba(254, 199, 36, 0.08);
  pointer-events: none;
  transition: transform 0.18s var(--rv-ease), width 0.18s var(--rv-ease), height 0.18s var(--rv-ease);
}
.rv-foco span {
  position: absolute;
  left: -2px;
  top: -26px;
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--rv-amarelo);
  color: var(--rv-escuro);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- marcadores ---------- */
.rv-pinos { position: fixed; inset: 0; z-index: 1002; pointer-events: none; }
.rv-pino {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
}
.rv-gota {
  position: absolute;
  left: -16px;
  top: -39px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2.5px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--rv-escuro);
  box-shadow: 0 6px 14px -4px rgba(5, 22, 32, 0.55);
  transform: rotate(-45deg);
  transform-origin: 50% 50%;
  transition: transform 0.4s var(--rv-ease), background 0.3s;
  animation: rv-cai 0.55s var(--rv-ease) both;
}
@keyframes rv-cai { from { opacity: 0; transform: translateY(-14px) rotate(-45deg) scale(0.6); } }
.rv-gota-n { transform: rotate(45deg); color: #fff; font-size: 13px; font-weight: 700; line-height: 1; }
.rv-pino-certo .rv-gota { background: var(--rv-verde); }
.rv-pino-mudar .rv-gota { background: var(--rv-laranja); }
.rv-pino-novo .rv-gota { background: var(--rv-amarelo); }
.rv-pino-novo .rv-gota-n { color: var(--rv-escuro); font-size: 18px; font-weight: 600; }
.rv-pino-pendente .rv-gota { border-style: dashed; }
.rv-pino:hover .rv-gota, .rv-pino-aberto .rv-gota { transform: rotate(-45deg) scale(1.14); }
.rv-pino:focus-visible .rv-gota { outline: 2px solid var(--rv-amarelo); outline-offset: 3px; }
.rv-pino::after {
  content: "";
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(12, 51, 70, 0.25);
  filter: blur(1px);
}
.rv-pulsa .rv-gota { animation: rv-pulsa 1.4s var(--rv-ease); }
@keyframes rv-pulsa {
  0%, 100% { box-shadow: 0 6px 14px -4px rgba(5, 22, 32, 0.55), 0 0 0 0 rgba(254, 199, 36, 0.9); }
  40% { box-shadow: 0 6px 14px -4px rgba(5, 22, 32, 0.55), 0 0 0 18px rgba(254, 199, 36, 0); transform: rotate(-45deg) scale(1.25); }
}

/* ---------- cartão ---------- */
.rv-cartao {
  position: fixed;
  left: 50%;
  top: 30%;
  z-index: 1020;
  width: 360px;
  padding: 22px 22px 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 70px -24px rgba(5, 22, 32, 0.55), 0 0 0 1px var(--rv-linha);
  animation: rv-cartao 0.45s var(--rv-ease) both;
}
@keyframes rv-cartao { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.rv-x {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--rv-suave);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.rv-x:hover { background: #f1eee8; color: var(--rv-tinta); }
.rv-ctx { margin: 0 34px 14px 0; font-size: 13.5px; line-height: 1.45; color: var(--rv-suave); }
.rv-ctx span { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 6px; background: #f3efe8; color: var(--rv-tinta); font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.rv-pergunta { margin: 0 0 12px; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.rv-tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rv-tipo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: #f5f2ec;
  color: var(--rv-tinta);
  font-size: 15px;
  font-weight: 500;
  box-shadow: inset 0 0 0 1.5px transparent;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s var(--rv-ease);
}
.rv-tipo svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rv-tipo:hover { transform: translateY(-1px); }
.rv-tipo-certo:hover { box-shadow: inset 0 0 0 1.5px var(--rv-verde); }
.rv-tipo-mudar:hover { box-shadow: inset 0 0 0 1.5px var(--rv-laranja); }
.rv-tipo-certo[aria-checked="true"] { background: var(--rv-verde); color: #fff; }
.rv-tipo-mudar[aria-checked="true"] { background: var(--rv-laranja); color: #fff; }
.rv-cartao textarea {
  display: block;
  width: 100%;
  min-height: 92px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1.5px solid #e6e1d8;
  border-radius: 14px;
  background: #fbfaf7;
  color: var(--rv-tinta);
  font-family: inherit;
  font-size: 16px; /* abaixo de 16px o iPhone amplia a página ao tocar no campo */
  font-weight: 400;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.rv-cartao textarea:focus { outline: none; border-color: var(--rv-laranja); background: #fff; box-shadow: 0 0 0 4px rgba(247, 134, 28, 0.14); }
.rv-erro { display: block; min-height: 0; margin-top: 6px; color: #c2361f; font-size: 13px; }
.rv-erro:empty { margin: 0; }
.rv-acoes { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.rv-btn, .rv-btn-sec {
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s var(--rv-ease), box-shadow 0.3s;
}
.rv-btn { background: var(--rv-escuro); color: #fff; }
.rv-btn:hover { background: #134a64; transform: translateY(-1px); box-shadow: 0 10px 20px -10px rgba(12, 51, 70, 0.6); }
.rv-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.rv-btn-sec { background: transparent; color: var(--rv-suave); }
.rv-btn-sec:hover { background: #f3efe8; color: var(--rv-tinta); }
.rv-perigo { margin-right: auto; color: #b83a25; }
.rv-btn-perigo { background: #c2361f; }
.rv-btn-perigo:hover { background: #a82c18; }
.rv-confirma { margin-right: auto; font-size: 14.5px; }
.rv-btn-largo { width: 100%; height: 52px; margin-top: 18px; font-size: 16px; }
.rv-btn:focus-visible, .rv-btn-sec:focus-visible, .rv-tipo:focus-visible, .rv-x:focus-visible { outline: 2px solid var(--rv-laranja); outline-offset: 2px; }

.rv-ver-topo { display: flex; align-items: center; gap: 10px; margin: 0 34px 12px 0; }
.rv-selo { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; color: #fff; font-size: 13.5px; font-weight: 600; }
.rv-selo svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rv-selo-certo { background: var(--rv-verde); }
.rv-selo-mudar { background: var(--rv-laranja); }
.rv-num { font-size: 13px; color: var(--rv-suave); }
.rv-texto { margin: 0; font-size: 16.5px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.rv-texto i { color: var(--rv-suave); }
.rv-meta { margin: 12px 0 0; font-size: 13px; color: var(--rv-suave); }
.rv-pend { color: #b86a00; font-weight: 500; }

/* ---------- lista ---------- */
.rv-gaveta {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 88px;
  z-index: 1015;
  display: flex;
  flex-direction: column;
  width: 390px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 80px -30px rgba(5, 22, 32, 0.6), 0 0 0 1px var(--rv-linha);
  overflow: hidden;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.35s var(--rv-ease), transform 0.5s var(--rv-ease);
}
.rv-gaveta.rv-aberta { opacity: 1; transform: none; }
.rv-gaveta-topo { position: relative; padding: 22px 22px 10px; }
.rv-gaveta-topo h2 { margin: 0; font-size: 24px; font-weight: 400; letter-spacing: -0.02em; color: var(--rv-escuro); }
.rv-filtros { display: flex; gap: 6px; padding: 4px 22px 14px; border-bottom: 1px solid var(--rv-linha); overflow-x: auto; }
.rv-filtros button {
  flex: none;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: #f3efe8;
  color: var(--rv-tinta);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.rv-filtros button b { margin-left: 3px; }
.rv-filtros button[aria-selected="true"] { background: var(--rv-escuro); color: #fff; }
.rv-itens { flex: 1; margin: 0; padding: 8px 10px; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.rv-item {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.25s;
}
.rv-item:hover { background: #f7f4ef; }
.rv-item-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--rv-escuro); color: #fff; font-size: 13px; font-weight: 700; }
.rv-n-certo { background: var(--rv-verde); }
.rv-n-mudar { background: var(--rv-laranja); }
.rv-item-corpo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rv-item-topo { font-size: 13px; color: var(--rv-suave); }
.rv-item-topo b { color: var(--rv-tinta); font-weight: 600; }
.rv-item-ctx { font-size: 13px; color: var(--rv-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-item-txt { font-size: 15px; line-height: 1.45; color: var(--rv-tinta); overflow-wrap: anywhere; }
.rv-item-meta { font-size: 12px; color: #8a9aa3; }
.rv-vazio { padding: 30px 16px; text-align: center; color: var(--rv-suave); font-size: 15px; line-height: 1.5; }
.rv-gaveta-pe { padding: 14px 22px; border-top: 1px solid var(--rv-linha); font-size: 13.5px; color: var(--rv-suave); }
.rv-gaveta-pe b { color: var(--rv-tinta); }
.rv-link { padding: 0; border: 0; background: none; color: var(--rv-laranja); font-size: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

/* ---------- janelas ---------- */
.rv-modal {
  position: fixed;
  inset: 0;
  z-index: 1030;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 28, 40, 0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s;
}
.rv-modal.rv-aberta { opacity: 1; }
.rv-modal-caixa {
  width: min(470px, 100%);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  padding: 32px 30px 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 40px 90px -30px rgba(5, 22, 32, 0.7);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.5s var(--rv-ease);
}
.rv-modal.rv-aberta .rv-modal-caixa { transform: none; }
.rv-modal-logo { display: block; width: 104px; height: auto; aspect-ratio: 3108 / 1998; margin: 0 auto 18px; color: var(--rv-escuro); }
.rv-modal-caixa h2 { margin: 0 0 10px; font-size: 27px; font-weight: 400; line-height: 1.15; letter-spacing: -0.02em; text-align: center; color: var(--rv-escuro); }
.rv-modal-caixa > p { margin: 0 0 12px; font-size: 16px; line-height: 1.55; text-align: center; color: var(--rv-suave); }
.rv-modal-caixa > p b { color: var(--rv-tinta); }
.rv-passos { display: grid; gap: 8px; margin: 20px 0 16px; padding: 0; list-style: none; }
.rv-passos li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; background: #f7f4ef; }
.rv-passos li > span { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--rv-amarelo); color: var(--rv-escuro); font-size: 14px; font-weight: 700; }
.rv-passos p { margin: 0; font-size: 15px; line-height: 1.4; }
.rv-verde { color: var(--rv-verde); }
.rv-laranja { color: #d96b06; }
.rv-modal-caixa .rv-obs { padding: 11px 14px; border-radius: 12px; background: #fff6e0; color: #6b5310; font-size: 14px; text-align: left; }
.rv-campo { display: block; margin-top: 18px; }
.rv-campo span { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 500; color: var(--rv-tinta); }
.rv-campo input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid #e2ddd4;
  border-radius: 14px;
  background: #fbfaf7;
  color: var(--rv-tinta);
  font-family: inherit;
  font-size: 16.5px; /* nunca menos de 16px: o iPhone amplia a página */
  font-weight: 400;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.rv-campo input:focus { outline: none; border-color: var(--rv-laranja); background: #fff; box-shadow: 0 0 0 4px rgba(247, 134, 28, 0.14); }
.rv-modal-caixa .rv-acoes { margin-top: 22px; }
.rv-feito { display: grid; place-items: center; width: 64px; height: 64px; margin: 4px auto 16px; border-radius: 50%; background: var(--rv-verde); color: #fff; animation: rv-cai 0.6s var(--rv-ease) both; }
.rv-feito svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- aviso ---------- */
.rv-aviso {
  position: fixed;
  left: 50%;
  bottom: 86px;
  z-index: 1040;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--rv-verde);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 14px 30px -12px rgba(5, 22, 32, 0.5);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.35s, transform 0.5s var(--rv-ease);
  pointer-events: none;
}
.rv-aviso.rv-alerta { background: #b4521a; }
.rv-aviso.rv-visivel { opacity: 1; transform: translate(-50%, 0); }

/* a barra fixa do site sobe para não brigar com a barra da revisão */
html.rv-on .cta-movel { bottom: 84px; }

/* ---------- celular ---------- */
@media (max-width: 640px) {
  .rv-barra { left: 10px; right: 10px; bottom: 10px; justify-content: space-between; transform: none; animation-name: rv-sobe-cel; }
  @keyframes rv-sobe-cel { from { transform: translateY(140%); } }
  .rv-b { flex: 1; justify-content: center; gap: 7px; padding: 0 10px; font-size: 14.5px; }
  .rv-b-ajuda { flex: none; width: 42px; }
  .rv-desk { display: none; }
  .rv-dica { bottom: 78px; width: max-content; max-width: calc(100vw - 32px); text-align: center; }
  .rv-cartao, .rv-cartao[style] {
    left: 0 !important;
    right: 0;
    top: auto !important;
    bottom: 0;
    width: auto;
    padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    animation-name: rv-folha;
  }
  @keyframes rv-folha { from { transform: translateY(100%); } }
  .rv-gaveta { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 78svh; border-radius: 24px 24px 0 0; transform: translateY(40px); }
  .rv-aviso { bottom: 78px; }
  .rv-modal { align-items: end; padding: 0; }
  .rv-modal-caixa { border-radius: 26px 26px 0 0; padding: 28px 22px calc(24px + env(safe-area-inset-bottom)); max-height: 92svh; }
  html.rv-on .cta-movel { bottom: 76px; }
}
