/* Modo de revisao (ativado com ?review=1). Tudo com prefixo rv- para nao afetar o funil. */

.rv-toolbar {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
.rv-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: #2a66c4;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
  cursor: pointer;
  white-space: nowrap;
}
.rv-btn.rv-armed { background: #d9364c; }
.rv-btn.rv-secondary { background: #38a84a; }
.rv-btn:active { transform: translateY(1px); }

.rv-hover {
  position: fixed;
  pointer-events: none;
  z-index: 2147482000;
  border: 2px solid #d9364c;
  background: rgba(217, 54, 76, .12);
  border-radius: 6px;
  transition: all .04s linear;
  display: none;
}

.rv-badge {
  position: absolute;
  top: -9px; right: -9px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f4b70c; color: #1b2430;
  font-size: 12px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.rv-btn { position: relative; }

/* Caixa de comentario */
.rv-box {
  position: fixed;
  z-index: 2147483600;
  width: min(320px, 92vw);
  background: #fff;
  color: #1b2430;
  border: 1px solid #e3e9f2;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
  padding: 12px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
.rv-box .rv-target {
  font-size: 12px; color: #5b6472;
  background: #f4f7fb; border-radius: 8px;
  padding: 6px 8px; margin-bottom: 8px;
  max-height: 54px; overflow: hidden;
}
.rv-box textarea {
  width: 100%; box-sizing: border-box;
  min-height: 84px; resize: vertical;
  font-size: 15px; padding: 10px;
  border: 2px solid #e3e9f2; border-radius: 10px;
  outline: none; font-family: inherit;
}
.rv-box textarea:focus { border-color: #2a66c4; }
.rv-row { display: flex; gap: 8px; margin-top: 10px; }
.rv-row .rv-btn { flex: 1; text-align: center; padding: 10px; }
.rv-row .rv-ghost { background: #eef2f8; color: #1b2430; }

/* Painel de lista */
.rv-panel {
  position: fixed;
  right: 14px; bottom: 70px;
  z-index: 2147483500;
  width: min(380px, 94vw);
  max-height: 70vh;
  overflow: auto;
  background: #fff; color: #1b2430;
  border: 1px solid #e3e9f2; border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
  padding: 12px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  display: none;
}
.rv-panel h3 { margin: 2px 0 10px; font-size: 15px; color: #2a66c4; }
.rv-item {
  border: 1px solid #eef2f8; border-radius: 10px;
  padding: 8px 10px; margin-bottom: 8px;
}
.rv-item .rv-meta { font-size: 11px; color: #5b6472; margin-bottom: 4px; }
.rv-item .rv-comment { font-size: 14px; }
.rv-item .rv-snippet { font-size: 12px; color: #5b6472; font-style: italic; margin-top: 3px; }
.rv-item .rv-del {
  float: right; border: none; background: transparent;
  color: #d9364c; font-weight: 800; cursor: pointer; font-size: 13px;
}
.rv-empty { font-size: 13px; color: #5b6472; }
.rv-toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  z-index: 2147483600;
  background: #1b2430; color: #fff; font-weight: 700; font-size: 13px;
  padding: 10px 16px; border-radius: 999px; box-shadow: 0 8px 20px rgba(0,0,0,.3);
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
  font-family: "Segoe UI", system-ui, sans-serif;
}
.rv-toast.rv-show { opacity: 1; }

/* ---- Chat ao vivo ---- */
.rv-chat {
  position: fixed;
  right: 14px; bottom: 70px;
  z-index: 2147483500;
  width: min(360px, 94vw);
  height: min(70vh, 560px);
  display: none;
  flex-direction: column;
  background: #fff; color: #1b2430;
  border: 1px solid #e3e9f2; border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0,0,0,.30);
  overflow: hidden;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
.rv-chat.rv-open { display: flex; }
.rv-chat-head {
  padding: 10px 12px;
  background: #2a66c4; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
}
.rv-chat-head b { font-size: 14px; }
.rv-chat-head .rv-screen {
  font-size: 11px; opacity: .9;
  background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 999px;
}
.rv-chat-body {
  flex: 1; overflow-y: auto; padding: 12px;
  background: #f4f7fb; display: flex; flex-direction: column; gap: 8px;
}
.rv-msg { max-width: 85%; padding: 8px 11px; border-radius: 12px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.rv-msg .rv-tag { display: block; font-size: 10px; opacity: .7; margin-bottom: 3px; }
.rv-msg .rv-snip { display: block; font-size: 11px; font-style: italic; opacity: .8; margin-top: 4px; padding-top: 4px; border-top: 1px dashed rgba(0,0,0,.15); }
.rv-user { align-self: flex-end; background: #2a66c4; color: #fff; border-bottom-right-radius: 4px; }
.rv-agent { align-self: flex-start; background: #38a84a; color: #fff; border-bottom-left-radius: 4px; }
.rv-chip {
  margin: 0 12px; padding: 6px 10px; font-size: 12px;
  background: #fff7e0; border: 1px solid #f4b70c; border-radius: 10px;
  display: none; align-items: center; justify-content: space-between; gap: 8px;
}
.rv-chip.rv-show { display: flex; }
.rv-chip button { border: none; background: transparent; color: #d9364c; font-weight: 800; cursor: pointer; }
.rv-compose { padding: 10px; border-top: 1px solid #eef2f8; background: #fff; }
.rv-compose .rv-tools { display: flex; gap: 8px; margin-bottom: 8px; }
.rv-mini {
  border: 1px solid #e3e9f2; background: #f4f7fb; color: #1b2430;
  border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.rv-mini.rv-on { background: #d9364c; color: #fff; border-color: #d9364c; }
.rv-compose .rv-send-row { display: flex; gap: 8px; }
.rv-compose textarea {
  flex: 1; box-sizing: border-box; min-height: 44px; max-height: 120px; resize: none;
  font-size: 14px; padding: 9px 10px; border: 2px solid #e3e9f2; border-radius: 10px; outline: none; font-family: inherit;
}
.rv-compose textarea:focus { border-color: #2a66c4; }
.rv-send { border: none; background: #38a84a; color: #fff; border-radius: 10px; padding: 0 16px; font-weight: 800; cursor: pointer; }
.rv-empty2 { color: #5b6472; font-size: 13px; text-align: center; margin: auto; }
