/* The review layer.
   It sits on someone else's site, so every rule is namespaced and every value
   is absolute - no inherited font-size, no inherited colour, nothing the host
   page can reach in and change. It should look like a considered tool, not a
   developer overlay: soft shadows, real type, brand red used sparingly. */

.rv-root, .rv-root * { box-sizing: border-box; }
.rv-root {
  --rv-ink: #0e1a2b;
  --rv-muted: #6a7686;
  --rv-line: #e3e8ee;
  --rv-red: #e1051b;
  --rv-paper: #ffffff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--rv-ink);
}

/* ---------- the bar ---------------------------------------------------- */
.rv-bar {
  position: fixed; z-index: 2147483000;
  left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  padding: 7px; border-radius: 100px;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 10px 40px rgba(14,26,43,.18), 0 2px 8px rgba(14,26,43,.10);
  max-width: calc(100vw - 24px);
}
.rv-bar button {
  appearance: none; border: 0; cursor: pointer; font: inherit;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 17px; border-radius: 100px;
  background: transparent; color: var(--rv-ink); font-weight: 600;
  white-space: nowrap; transition: background .16s ease, color .16s ease;
}
.rv-bar button:hover:not([disabled]) { background: #f0f3f7; }
.rv-bar button[disabled] { opacity: .34; cursor: default; }
.rv-bar button.is-on { background: var(--rv-ink); color: #fff; }
.rv-bar button.is-on:hover { background: #17263c; }
.rv-bar .rv-send { background: var(--rv-red); color: #fff; }
.rv-bar .rv-send:hover { background: #c40418; }
.rv-bar svg { width: 17px; height: 17px; flex: 0 0 auto; }
.rv-count {
  min-width: 21px; height: 21px; padding: 0 6px; border-radius: 100px;
  background: var(--rv-red); color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.rv-bar button.is-on .rv-count { background: #fff; color: var(--rv-ink); }

/* A short line of guidance, above the bar, that changes with the mode. It is
   the whole instruction manual. */
.rv-hint {
  position: fixed; z-index: 2147482999;
  left: 50%; bottom: 86px; transform: translateX(-50%);
  padding: 9px 16px; border-radius: 100px;
  background: rgba(14,26,43,.9); color: #fff;
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 8px 26px rgba(14,26,43,.24);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
  max-width: calc(100vw - 28px); overflow: hidden; text-overflow: ellipsis;
}
.rv-hint.is-shown { opacity: 1; }

/* ---------- pins -------------------------------------------------------- */
.rv-pin {
  position: absolute; z-index: 2147482000;
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border-radius: 50% 50% 50% 3px;
  transform: rotate(-45deg);
  background: var(--rv-red); border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(225,5,27,.4);
  cursor: pointer; padding: 0;
  transition: transform .16s ease, box-shadow .16s ease;
}
.rv-pin span {
  display: block; transform: rotate(45deg);
  color: #fff; font-size: 13px; font-weight: 700; line-height: 26px;
  text-align: center; font-family: inherit;
}
.rv-pin:hover { transform: rotate(-45deg) scale(1.12); }
.rv-pin.is-active { box-shadow: 0 0 0 5px rgba(225,5,27,.22), 0 4px 14px rgba(225,5,27,.4); }

/* While placing, the whole page invites a click. */
.rv-placing, .rv-placing * { cursor: crosshair !important; }
.rv-placing .rv-bar, .rv-placing .rv-bar * { cursor: pointer !important; }

/* ---------- text editing ------------------------------------------------ */
.rv-editing [data-rv-editable]:hover {
  outline: 2px dashed rgba(225,5,27,.5); outline-offset: 3px;
  cursor: text !important; border-radius: 3px;
}
[data-rv-live="1"] {
  outline: 2px solid var(--rv-red) !important; outline-offset: 3px;
  border-radius: 3px; background: rgba(225,5,27,.05);
}
[data-rv-changed="1"] {
  background: rgba(255,214,0,.28);
  box-shadow: 0 0 0 2px rgba(255,214,0,.28);
  border-radius: 2px;
}

/* ---------- the panel --------------------------------------------------- */
.rv-panel {
  position: fixed; z-index: 2147483100; top: 0; right: 0; bottom: 0;
  width: min(400px, 100vw);
  background: var(--rv-paper);
  box-shadow: -16px 0 50px rgba(14,26,43,.16);
  transform: translateX(101%); transition: transform .32s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.rv-panel.is-open { transform: none; }
/* With the panel open on a phone it covers the whole screen, so the toolbar
   underneath is unreachable - hide it rather than leave dead buttons behind
   glass. The panel's own close button is the way back. */
@media (max-width: 640px) { .rv-panel.is-open ~ .rv-bar, .rv-panel.is-open ~ .rv-hint { display: none; } }
.rv-panel-head {
  padding: 20px 20px 14px; border-bottom: 1px solid var(--rv-line);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.rv-panel-head h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.rv-panel-head p { margin: 3px 0 0; font-size: 13px; color: var(--rv-muted); }
.rv-x {
  appearance: none; border: 0; background: #f0f3f7; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%; font-size: 17px; line-height: 1;
  color: var(--rv-muted); flex: 0 0 auto;
}
.rv-x:hover { background: #e4e9f0; color: var(--rv-ink); }

.rv-list { flex: 1; overflow-y: auto; padding: 12px 16px 16px; }
.rv-pagenote {
  width: 100%; appearance: none; cursor: pointer; font: inherit; font-size: 13.5px;
  font-weight: 600; color: var(--rv-ink); background: #f5f7fa;
  border: 1px dashed var(--rv-line); border-radius: 10px; padding: 11px;
  margin-bottom: 12px;
}
.rv-pagenote:hover { background: #eef2f7; border-color: #c9d3e0; }
.rv-empty { padding: 34px 18px; text-align: center; color: var(--rv-muted); font-size: 14px; }
.rv-empty strong { display: block; color: var(--rv-ink); font-size: 15px; margin-bottom: 6px; }

.rv-group { margin: 14px 0 6px; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--rv-muted); }
.rv-item {
  border: 1px solid var(--rv-line); border-radius: 12px;
  padding: 12px; margin-bottom: 10px; background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.rv-item.is-active { border-color: var(--rv-red); box-shadow: 0 0 0 3px rgba(225,5,27,.1); }
.rv-item-top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.rv-badge {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  background: var(--rv-red); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rv-badge.is-text { background: #f0b400; color: #3a2c00; }
.rv-badge.is-page { background: #2f6df0; }
.rv-item-where { flex: 1; font-size: 12.5px; color: var(--rv-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-del {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--rv-muted); font-size: 12px; padding: 3px 5px; border-radius: 6px;
}
.rv-del:hover { background: #fdeaec; color: var(--rv-red); }
.rv-item textarea {
  width: 100%; min-height: 62px; resize: vertical; font: inherit; font-size: 14px;
  border: 1px solid var(--rv-line); border-radius: 8px; padding: 9px 10px;
  color: var(--rv-ink); background: #fbfcfd;
}
.rv-item textarea:focus { outline: none; border-color: var(--rv-red);
  background: #fff; box-shadow: 0 0 0 3px rgba(225,5,27,.09); }
.rv-diff { font-size: 13px; margin-bottom: 8px; }
.rv-diff s { color: var(--rv-muted); text-decoration-color: rgba(225,5,27,.6); }
.rv-diff b { color: var(--rv-ink); font-weight: 600; }

.rv-panel-foot { padding: 14px 16px; border-top: 1px solid var(--rv-line); background: #fbfcfd; }
.rv-panel-foot .rv-send { width: 100%; justify-content: center; padding: 13px;
  border-radius: 10px; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  background: var(--rv-red); color: #fff; font-size: 15px; }
.rv-panel-foot .rv-send:hover { background: #c40418; }
.rv-saved { margin: 9px 0 0; font-size: 12.5px; color: var(--rv-muted); text-align: center; }
.rv-saved.is-ok { color: #17803d; font-weight: 600; }

/* ---------- phone ------------------------------------------------------- */
@media (max-width: 640px) {
  .rv-bar { bottom: 14px; gap: 3px; padding: 6px; }
  .rv-bar button { padding: 10px 13px; font-size: 14px; }
  .rv-bar .rv-label { display: none; }        /* icons alone below this width */
  .rv-bar .rv-send .rv-label { display: inline; }
  .rv-hint { bottom: 74px; font-size: 12.5px; }
  .rv-panel { width: 100vw; }
}
@media (prefers-reduced-motion: reduce) {
  .rv-panel, .rv-pin, .rv-hint, .rv-bar button { transition: none; }
}
