/* ==========================================================================
   review.css — Figma-style commenting layer for the Shukr Center review build.
   Everything is prefixed .rv- so it cannot collide with the page's own styles.
   ========================================================================== */

.rv-layer {
  position: absolute; top: 0; left: 0; width: 100%; height: 0;
  z-index: 900; pointer-events: none;
}
body.rv-mode { cursor: crosshair; }
body.rv-mode a, body.rv-mode button, body.rv-mode input,
body.rv-mode select, body.rv-mode textarea { pointer-events: none; }
body.rv-mode .rv-ui, body.rv-mode .rv-ui * { pointer-events: auto; cursor: default; }

/* ---------- pins ---------- */
.rv-pin {
  position: absolute; width: 34px; height: 34px; margin: -34px 0 0 -4px;
  pointer-events: auto; cursor: pointer; border: 0; padding: 0;
  background: none; z-index: 2;
  animation: rv-drop .3s cubic-bezier(.34, 1.2, .64, 1);
}
@keyframes rv-drop { from { opacity: 0; transform: translateY(-10px) scale(.6); } to { opacity: 1; transform: none; } }
.rv-pin i {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50% 50% 50% 4px;
  background: #A85231; color: #fff;
  font: 700 13px/1 Figtree, system-ui, sans-serif; font-style: normal;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3), 0 0 0 2px rgba(255, 255, 255, .9);
  transition: transform .18s cubic-bezier(.22, .61, .36, 1);
}
.rv-pin:hover i, .rv-pin:focus-visible i { transform: scale(1.14); }
.rv-pin.is-active i { background: #2D5A98; }
.rv-pin.is-temp i { background: #fff; color: #A85231; border: 2px dashed #A85231; box-shadow: none; }
.rv-pin:focus-visible { outline: 2px solid #2D5A98; outline-offset: 3px; border-radius: 6px; }

/* ---------- floating controls ---------- */
.rv-bar {
  position: fixed; right: 20px; bottom: 20px; z-index: 950;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.rv-fab {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 52px; padding: 14px 22px; border: 0; border-radius: 999px;
  background: #A85231; color: #fff; cursor: pointer;
  font: 600 15px/1 Figtree, system-ui, sans-serif;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .28);
  transition: background .2s ease, transform .15s ease;
}
.rv-fab:hover { background: #8A4228; }
.rv-fab:active { transform: translateY(1px); }
body.rv-mode .rv-fab { background: #2D5A98; }
.rv-fab svg { flex: none; }

.rv-mini {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .18); background: #23211D; color: #F1ECE4;
  font: 600 13px/1 Figtree, system-ui, sans-serif;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .24);
  transition: background .2s ease;
}
.rv-mini:hover { background: #37332D; }
.rv-mini b { font-weight: 700; color: #E4C377; font-variant-numeric: tabular-nums; }
.rv-dot { width: 7px; height: 7px; border-radius: 50%; background: #17794A; flex: none; }
.rv-dot.is-local { background: #B7791F; }

/* ---------- hint bar in comment mode ---------- */
.rv-hint {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(14px);
  z-index: 940; padding: 12px 20px; border-radius: 999px;
  background: #101E33; color: #EDE8E0; white-space: nowrap;
  font: 500 14px/1 Figtree, system-ui, sans-serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  opacity: 0; pointer-events: none; transition: opacity .22s ease, transform .22s ease;
}
body.rv-mode .rv-hint { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- composer ---------- */
.rv-pop {
  position: absolute; z-index: 960; width: 300px; pointer-events: auto;
  background: #fff; border-radius: 14px; padding: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .28); border: 1px solid #E4DDD2;
  font-family: Figtree, system-ui, sans-serif;
}
.rv-pop textarea {
  width: 100%; min-height: 92px; resize: vertical; box-sizing: border-box;
  font: 400 15px/1.5 Figtree, system-ui, sans-serif; color: #23211D;
  border: 1px solid #D0C7B9; border-radius: 9px; padding: 11px 12px; background: #fff;
}
.rv-pop textarea:focus { outline: none; border-color: #2D5A98; box-shadow: 0 0 0 3px rgba(45, 90, 152, .2); }
.rv-pop-row { display: flex; gap: 8px; margin-top: 10px; }
.rv-btn {
  flex: 1; min-height: 40px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer;
  font: 600 14px/1 Figtree, system-ui, sans-serif;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.rv-btn-go { background: #A85231; color: #fff; border-color: #A85231; }
.rv-btn-go:hover { background: transparent; color: #8A4228; }
.rv-btn-ghost { background: transparent; color: #6E665A; border-color: #D0C7B9; }
.rv-btn-ghost:hover { border-color: #A99F8F; color: #4D4840; }
.rv-meta { font: 500 11.5px/1.4 Figtree, system-ui, sans-serif; letter-spacing: .06em;
  text-transform: uppercase; color: #837A6C; margin: 0 0 9px; }
.rv-body { font: 400 15px/1.55 Figtree, system-ui, sans-serif; color: #23211D; margin: 0 0 12px; white-space: pre-wrap; }

/* ---------- panel ---------- */
.rv-panel {
  position: fixed; top: 0; right: 0; height: 100%; width: 380px; max-width: 92vw;
  z-index: 970; background: #FCFAF7; border-left: 1px solid #E4DDD2;
  box-shadow: -18px 0 50px rgba(0, 0, 0, .16);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.22, .61, .36, 1);
  display: flex; flex-direction: column; font-family: Figtree, system-ui, sans-serif;
}
.rv-panel.is-open { transform: none; }
.rv-panel-top {
  display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px;
  border-bottom: 1px solid #E4DDD2;
}
.rv-panel-top h2 { margin: 0; font: 700 16px/1.2 Figtree, system-ui, sans-serif; color: #23211D; }
.rv-x { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid #D0C7B9;
  background: none; cursor: pointer; color: #4D4840; font-size: 17px; line-height: 1; }
.rv-x:hover { background: #F1ECE4; }
.rv-list { flex: 1; overflow-y: auto; padding: 8px 0 18px; }
.rv-item { display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 14px 18px; border-bottom: 1px solid #F1ECE4; }
.rv-item:hover { background: #F8F5F0; }
.rv-item-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.rv-num { width: 22px; height: 22px; flex: none; border-radius: 50% 50% 50% 3px; background: #A85231;
  color: #fff; display: grid; place-items: center; font: 700 11px/1 Figtree, system-ui, sans-serif; }
.rv-sec { font: 700 10.5px/1 Figtree, system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #6E665A; }
.rv-time { margin-left: auto; font: 400 11.5px/1 Figtree, system-ui, sans-serif; color: #A99F8F; }
.rv-text { font: 400 14.5px/1.55 Figtree, system-ui, sans-serif; color: #37332D; margin: 0; white-space: pre-wrap; }
.rv-empty { padding: 40px 22px; text-align: center; color: #837A6C; font-size: 14.5px; line-height: 1.6; }
.rv-panel-foot { border-top: 1px solid #E4DDD2; padding: 14px 18px; display: flex; gap: 8px; }
.rv-panel-foot .rv-btn { min-height: 42px; }
.rv-del { border: 0; background: none; color: #B32D2E; cursor: pointer; font: 600 12.5px/1 Figtree, system-ui, sans-serif; padding: 6px 0 0; }
.rv-del:hover { text-decoration: underline; }

/* The scrim must NEVER take pointer events unless the panel is open. It is not
   .rv-ui: that class forces pointer-events:auto in comment mode, which turned this
   invisible full-screen layer into a click sponge and broke comment placement. */
.rv-scrim { position: fixed; inset: 0; z-index: 965; background: rgba(16, 30, 51, .3);
  opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.rv-scrim.is-open { opacity: 1; pointer-events: auto; }
body.rv-mode .rv-scrim:not(.is-open) { pointer-events: none; }

/* highlight the section a comment belongs to when you jump to it */
.rv-flash { animation: rv-flash 1.5s ease; }
@keyframes rv-flash {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(168, 82, 49, 0); }
  25% { box-shadow: inset 0 0 0 4px rgba(168, 82, 49, .55); }
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .rv-bar { right: 14px; bottom: 14px; gap: 8px; }
  .rv-fab { min-height: 50px; padding: 13px 18px; font-size: 14.5px; }
  .rv-hint { bottom: 78px; font-size: 13px; padding: 10px 16px; max-width: 90vw; white-space: normal; text-align: center; }
  .rv-pop {
    position: fixed !important; left: 0 !important; right: 0; bottom: 0; top: auto !important;
    width: 100%; border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -14px 44px rgba(0, 0, 0, .3);
    animation: rv-sheet .26s cubic-bezier(.22, .61, .36, 1);
  }
  @keyframes rv-sheet { from { transform: translateY(100%); } to { transform: none; } }
  .rv-panel { width: 100%; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .rv-pin, .rv-pop, .rv-panel, .rv-hint, .rv-flash { animation: none !important; transition: none !important; }
}
