/* Review layer for the 2027 corn brochure.
   Everything here is screen-only: the print stylesheet at the bottom removes
   the whole layer so Ctrl+P still produces a clean A4 brochure. */

#rv-bar, #rv-side, .rv-pin, #rv-composer, #rv-toast { font-family: 'Gilroy', 'Segoe UI', sans-serif; }

/* ------------------------------------------------------------- toolbar */
#rv-bar {
  position: fixed; right: 16px; bottom: 16px; z-index: 9000;
  background: #14481a; color: #fff;
  border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.28);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; font-size: 13px;
}
#rv-bar button {
  font: inherit; font-weight: 600;
  background: #2a6b2a; color: #fff; border: 0; border-radius: 6px;
  padding: 7px 11px; cursor: pointer; white-space: nowrap;
}
#rv-bar button:hover { background: #3a7d3a; }
#rv-bar button.on { background: #f1c82f; color: #21211f; }
#rv-bar button.ghost { background: rgba(255,255,255,.14); }
#rv-bar button.ghost:hover { background: rgba(255,255,255,.24); }
#rv-who { opacity: .85; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
#rv-who:hover { text-decoration: underline; }
#rv-bar .count {
  background: #fff; color: #14481a; font-weight: 800;
  border-radius: 20px; padding: 1px 8px; font-size: 12px;
}
#rv-bar.offline { background: #8a2b2b; }

/* placement modes */
body.rv-placing, body.rv-placing .page { cursor: crosshair; }
body.rv-boxing, body.rv-boxing .page { cursor: crosshair; }
body.rv-boxing { user-select: none; -webkit-user-select: none; }
body.rv-placing .page:hover, body.rv-boxing .page:hover {
  outline: 2px dashed #f1c82f; outline-offset: -2px;
}

/* text-selection chip: appears under a selection inside a page */
#rv-selchip {
  position: fixed; z-index: 9400; display: none;
  background: #14481a; color: #fff; font-size: 12px; font-weight: 700;
  padding: 7px 12px; border-radius: 7px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.3); white-space: nowrap;
}
#rv-selchip.open { display: block; }
#rv-selchip:hover { background: #2a6b2a; }

/* highlight over commented text */
.rv-hl {
  position: absolute; z-index: 400; cursor: pointer;
  background: rgba(241,200,47,.42);
  border-bottom: 1.5px solid #d8342f;
  border-radius: 1px;
}
.rv-hl:hover { background: rgba(241,200,47,.62); }
.rv-hl.resolved { background: rgba(126,154,126,.24); border-bottom-color: #7e9a7e; }
.rv-hl.active { background: rgba(241,200,47,.75); }

/* dragged area box */
.rv-box {
  position: absolute; z-index: 400; cursor: pointer;
  border: 2px solid #d8342f; background: rgba(216,52,47,.10); border-radius: 2px;
}
.rv-box:hover { background: rgba(216,52,47,.18); }
.rv-box.resolved { border-color: #7e9a7e; background: rgba(126,154,126,.12); }
.rv-box.active { border-color: #f1c82f; background: rgba(241,200,47,.22); }
.rv-box.drafting { border-style: dashed; pointer-events: none; }


/* current language + switcher */
#rv-bar .lang-now {
  background: #f1c82f; color: #21211f; font-weight: 800;
  border-radius: 5px; padding: 3px 7px; font-size: 11px; letter-spacing: .04em;
}
#rv-bar button.lang { font-weight: 800; letter-spacing: .04em; min-width: 34px; }

/* ------------------------------------------------------------- pins */
.rv-pin {
  position: absolute; z-index: 500;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50% 50% 50% 2px;
  background: #d8342f; color: #fff;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35);
  font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  cursor: pointer; transition: transform .12s ease;
}
.rv-pin:hover { transform: scale(1.18); }
.rv-pin.resolved { background: #7e9a7e; opacity: .55; }
.rv-pin.active { background: #f1c82f; color: #21211f; transform: scale(1.3); }

/* ------------------------------------------------------------- sidebar */
#rv-side {
  position: fixed; top: 0; right: 0; bottom: 0; width: 340px; z-index: 8500;
  background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,.18);
  display: none; flex-direction: column; font-size: 13px;
}
#rv-side.open { display: flex; }
#rv-side header {
  background: #14481a; color: #fff; padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
}
#rv-side header b { font-size: 14px; }
#rv-side header button {
  background: transparent; border: 0; color: #fff; font-size: 20px;
  cursor: pointer; line-height: 1; padding: 0 2px;
}
#rv-filter {
  padding: 8px 14px; border-bottom: 1px solid #e4e4de; background: #f7f7f4;
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: #55554f;
}
#rv-list { overflow-y: auto; flex: 1; padding: 6px 0 24px; }
#rv-list .grp {
  padding: 10px 14px 4px; font-size: 11px; font-weight: 800;
  color: #2a6b2a; text-transform: uppercase; letter-spacing: .06em;
}
.rv-item {
  padding: 9px 14px; border-bottom: 1px solid #eeeeea; cursor: pointer;
}
.rv-item:hover { background: #f7f9f7; }
.rv-item.active { background: #eaf1ea; }
.rv-item.done .rv-text { text-decoration: line-through; color: #8d8d86; }
.rv-item .rv-meta { font-size: 11px; color: #8d8d86; margin-bottom: 3px; display: flex; gap: 6px; align-items: center; }
.rv-item .rv-kind {
  background: #eaf1ea; color: #2a6b2a; font-weight: 700;
  border-radius: 4px; padding: 1px 5px; font-size: 10px;
}
.rv-quote {
  font-size: 12px; font-style: italic; color: #55554f; line-height: 1.4;
  border-left: 3px solid #f1c82f; padding-left: 7px; margin: 0 0 4px;
}
.rv-item.done .rv-quote { color: #9a9a92; }
.rv-item .rv-meta b { color: #21211f; font-weight: 700; }
.rv-item .rv-num {
  display: inline-block; min-width: 17px; height: 17px; line-height: 17px;
  border-radius: 50%; background: #d8342f; color: #fff;
  font-size: 10px; font-weight: 800; text-align: center; margin-right: 2px;
}
.rv-item.done .rv-num { background: #7e9a7e; }
.rv-text { white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.rv-replies { margin: 6px 0 0 10px; border-left: 2px solid #dfe6df; padding-left: 8px; }
.rv-replies div { font-size: 12px; margin-bottom: 4px; color: #444440; }
.rv-replies b { color: #21211f; }
.rv-actions { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.rv-actions button {
  font: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
  border: 1px solid #cfcfc8; background: #fff; border-radius: 5px; padding: 3px 8px;
}
.rv-actions button:hover { background: #f0f0ec; }
.rv-actions button.danger { color: #b3312c; border-color: #e4bebd; }
#rv-list .rv-empty { padding: 24px 16px; color: #8d8d86; text-align: center; line-height: 1.5; }

/* ------------------------------------------------------------- composer */
#rv-composer {
  position: fixed; z-index: 9500; width: 300px;
  background: #fff; border-radius: 10px; box-shadow: 0 10px 34px rgba(0,0,0,.3);
  padding: 12px; display: none;
}
#rv-composer.open { display: block; }
#rv-composer .ttl { font-size: 12px; font-weight: 800; color: #14481a; margin-bottom: 7px; }
#rv-composer .quote {
  font-size: 12px; font-style: italic; color: #55554f; line-height: 1.4;
  background: #f7f7f4; border-left: 3px solid #f1c82f;
  padding: 6px 8px; margin-bottom: 8px; max-height: 66px; overflow-y: auto;
}
#rv-composer textarea, #rv-composer input {
  width: 100%; font: inherit; font-size: 13px; box-sizing: border-box;
  border: 1px solid #cfcfc8; border-radius: 6px; padding: 7px 8px; resize: vertical;
}
#rv-composer textarea { min-height: 88px; }
#rv-composer input { margin-bottom: 7px; }
#rv-composer .row { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
#rv-composer button {
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  border: 0; border-radius: 6px; padding: 7px 12px;
}
#rv-composer .save { background: #2a6b2a; color: #fff; }
#rv-composer .cancel { background: #eeeeea; color: #444440; }

/* ------------------------------------------------------------- toast */
#rv-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 9600; background: #21211f; color: #fff;
  padding: 9px 16px; border-radius: 8px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
#rv-toast.show { opacity: .95; }

@media print {
  #rv-bar, #rv-side, #rv-composer, #rv-toast, #rv-selchip,
  .rv-pin, .rv-hl, .rv-box { display: none !important; }
  body.rv-placing .page, body.rv-boxing .page { outline: none !important; }
}
