/* ═══════════════════════════════════════════════════════ */
/*  REVIEW OVERLAY v3 — Card + Arrow Annotation System     */
/* ═══════════════════════════════════════════════════════ */

/* ── FAB ─────────────────────────────────────────────── */
.rv-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  width: 52px; height: 52px; border: none; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
  cursor: pointer; box-shadow: 0 4px 16px rgba(99,102,241,0.4);
  display: flex; align-items: center; justify-content: center; transition: all 0.25s ease;
}
.rv-fab svg { width: 24px; height: 24px; }
.rv-fab:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(99,102,241,0.5); }
.rv-fab.active { background: linear-gradient(135deg, #dc2626, #f43f5e); box-shadow: 0 4px 16px rgba(220,38,38,0.45); animation: rv-pulse 1.5s ease infinite; }
@keyframes rv-pulse { 0%,100% { box-shadow: 0 4px 16px rgba(220,38,38,0.45); } 50% { box-shadow: 0 4px 28px rgba(220,38,38,0.65); } }

/* ── Crosshair ───────────────────────────────────────── */
.rv-crosshair, .rv-crosshair * { cursor: crosshair !important; }

/* ── Toast ───────────────────────────────────────────── */
.rv-toast {
  position: fixed; bottom: 96px; right: 28px; z-index: 10001;
  padding: 10px 20px; background: #1a1a1a; color: #fff;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  opacity: 0; transform: translateY(8px); transition: all 0.3s ease; pointer-events: none;
}
.rv-toast.show { opacity: 1; transform: translateY(0); }

/* ── Admin Banner ────────────────────────────────────── */
.rv-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500; color: #fff;
  background: linear-gradient(135deg, #dc2626, #f43f5e); animation: rv-bannerIn 0.35s ease-out;
}
@keyframes rv-bannerIn { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.rv-banner__left, .rv-banner__right { display: flex; align-items: center; gap: 10px; }
.rv-banner__icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.2); border-radius: 50%; font-size: 11px; }
.rv-banner__count { background: rgba(255,255,255,0.2); padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.rv-banner__btn { padding: 5px 14px; border: 1px solid rgba(255,255,255,0.4); border-radius: 6px; background: rgba(255,255,255,0.1); color: #fff; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif; }
.rv-banner__btn:hover { background: rgba(255,255,255,0.25); }
.rv-banner__btn--danger { border-color: rgba(255,80,80,0.5); background: rgba(255,80,80,0.15); }
.rv-banner__btn--danger:hover { background: rgba(255,80,80,0.35); }

/* ── Anchor Dot ──────────────────────────────────────── */
.rv-anchor {
  position: absolute; z-index: 9001;
  width: 22px; height: 22px; border-radius: 50%;
  background: #6366f1; border: 2.5px solid #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,0.45);
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.rv-anchor span {
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 700; color: #fff; line-height: 1;
}
.rv-anchor--resolved { background: #22c55e; box-shadow: 0 2px 8px rgba(34,197,94,0.45); }

/* ── Comment Card ────────────────────────────────────── */
.rv-card {
  position: absolute; z-index: 9000; width: 240px;
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.06);
  font-family: 'Inter', sans-serif;
  border-left: 3px solid #6366f1;
  transition: box-shadow 0.2s, opacity 0.2s;
}
.rv-card--resolved { border-left-color: #22c55e; opacity: 0.6; }
.rv-card--resolved:hover { opacity: 1; }
.rv-card--dragging { box-shadow: 0 8px 32px rgba(0,0,0,0.2); z-index: 9050 !important; cursor: grabbing !important; }

.rv-card__drag {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: #f8f8f8; border-bottom: 1px solid #eee;
  cursor: grab; user-select: none;
}
.rv-card__drag:active { cursor: grabbing; }
.rv-card__num { font-size: 11px; font-weight: 700; color: #6366f1; }
.rv-card__grip { font-size: 14px; color: #bbb; letter-spacing: 1px; }

.rv-card__body { padding: 10px 12px; }
.rv-card__text { font-size: 13px; line-height: 1.45; color: #2a2a2a; word-break: break-word; }
.rv-card__meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.rv-card__section { font-size: 10px; color: #888; background: #f0f0f0; padding: 2px 6px; border-radius: 3px; }
.rv-card__time { font-size: 10px; color: #aaa; }

.rv-card__actions { display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid #f0f0f0; }
.rv-card__btn {
  flex: 1; padding: 5px 0; border: none; border-radius: 5px;
  font-size: 11px; font-weight: 500; cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.15s;
}
.rv-card__btn--resolve { background: #dcfce7; color: #16a34a; }
.rv-card__btn--resolve:hover { background: #bbf7d0; }
.rv-card__btn--delete { background: #fee2e2; color: #dc2626; }
.rv-card__btn--delete:hover { background: #fecaca; }

/* ── Comment Form ────────────────────────────────────── */
.review-form {
  position: absolute; z-index: 9600; width: 280px;
  background: #fff; border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18); overflow: hidden;
  animation: rv-popIn 0.15s ease-out; font-family: 'Inter', sans-serif;
}
.rv-form--above { transform: translateY(calc(-100% - 8px)); }
@keyframes rv-popIn { from { opacity: 0; scale: 0.95; } to { opacity: 1; scale: 1; } }
.review-form__header { padding: 12px 14px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-size: 13px; font-weight: 600; }
.review-form__body { padding: 14px; }
.review-form__input { width: 100%; min-height: 70px; padding: 10px; border: 1.5px solid #e0e0e0; border-radius: 8px; font-size: 13px; font-family: 'Inter', sans-serif; resize: vertical; color: #1a1a1a; box-sizing: border-box; }
.review-form__input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.review-form__footer { display: flex; gap: 8px; padding: 0 14px 14px; justify-content: flex-end; }
.review-form__btn { padding: 7px 16px; border: none; border-radius: 7px; font-size: 12px; font-weight: 500; cursor: pointer; font-family: 'Inter', sans-serif; }
.review-form__btn--cancel { background: #f5f5f5; color: #666; }
.review-form__btn--cancel:hover { background: #e8e8e8; }
.review-form__btn--submit { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.review-form__btn--submit:hover { filter: brightness(1.1); }

/* ── Sidebar ─────────────────────────────────────────── */
.review-sidebar {
  position: fixed; top: 44px; right: 0; bottom: 0; width: 320px;
  background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  z-index: 9900; display: flex; flex-direction: column; font-family: 'Inter', sans-serif;
  transform: translateX(100%); transition: transform 0.3s ease;
}
.review-sidebar.open { transform: translateX(0); }
.review-sidebar__header { padding: 16px 20px; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between; }
.review-sidebar__title { font-size: 15px; font-weight: 600; color: #1a1a1a; }
.review-sidebar__close { width: 28px; height: 28px; border: none; background: #f5f5f5; border-radius: 6px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; color: #666; }
.review-sidebar__close:hover { background: #e8e8e8; }
.review-sidebar__list { flex: 1; overflow-y: auto; padding: 8px 0; }
.review-sidebar__item { padding: 12px 20px; border-bottom: 1px solid #f5f5f5; cursor: pointer; transition: background 0.15s; }
.review-sidebar__item:hover { background: #fafafa; }
.review-sidebar__item--resolved { opacity: 0.55; }
.review-sidebar__item-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.review-sidebar__item-author { font-size: 12px; font-weight: 600; color: #1a1a1a; }
.review-sidebar__item-time { font-size: 11px; color: #999; }
.review-sidebar__item-text { font-size: 13px; color: #444; line-height: 1.4; }
.review-sidebar__item-section { display: inline-block; margin-top: 4px; padding: 2px 6px; background: #f0f0f0; border-radius: 3px; font-size: 10px; color: #777; }
.review-sidebar__item-actions { display: flex; gap: 6px; margin-top: 8px; }
.rv-sbtn { padding: 4px 10px; border: none; border-radius: 4px; font-size: 11px; cursor: pointer; font-family: 'Inter', sans-serif; font-weight: 500; }
.rv-sbtn--resolve { background: #dcfce7; color: #16a34a; }
.rv-sbtn--resolve:hover { background: #bbf7d0; }
.rv-sbtn--delete { background: #fee2e2; color: #dc2626; }
.rv-sbtn--delete:hover { background: #fecaca; }
.review-sidebar__empty { padding: 40px 20px; text-align: center; color: #999; font-size: 14px; }

/* ── Frame Badge (on cards & sidebar) ────────────────── */
.rv-card__frame {
  font-size: 9px; font-weight: 600; color: #8b5cf6;
  background: #ede9fe; padding: 2px 6px; border-radius: 3px; margin-left: auto; margin-right: 4px;
}
.rv-sidebar-frame {
  font-size: 10px; font-weight: 600; color: #8b5cf6;
  background: #ede9fe; padding: 1px 5px; border-radius: 3px; margin-left: 4px;
}
.review-form__frame {
  font-size: 11px; color: #8b5cf6; background: #ede9fe;
  padding: 4px 8px; border-radius: 6px; margin-bottom: 8px; display: inline-block; font-weight: 500;
}

/* ── Frame Strip (orbit viewer indicator) ────────────── */
.rv-frame-strip {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  padding: 6px 14px; border-radius: 20px;
  font-family: 'Inter', sans-serif;
}
.rv-frame-strip__label { font-size: 11px; color: rgba(255,255,255,0.7); white-space: nowrap; }
.rv-frame-strip__items { display: flex; gap: 4px; flex-wrap: wrap; }
.rv-frame-strip__dot {
  padding: 3px 8px; border: 1px solid rgba(255,255,255,0.25); border-radius: 12px;
  background: rgba(255,255,255,0.1); color: #fff; font-size: 10px; font-weight: 500;
  cursor: pointer; font-family: 'Inter', sans-serif; transition: all 0.15s; white-space: nowrap;
}
.rv-frame-strip__dot:hover { background: rgba(99,102,241,0.5); border-color: rgba(99,102,241,0.8); }
.rv-frame-strip__dot--active { background: #6366f1; border-color: #6366f1; }
.rv-frame-strip__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 14px; height: 14px; background: rgba(255,255,255,0.25);
  border-radius: 7px; font-size: 9px; font-weight: 700; margin-left: 3px;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .review-sidebar { width: 100%; }
  .rv-card { width: 200px; }
  .review-form { width: 240px; }
  .rv-fab { bottom: 20px; right: 20px; width: 46px; height: 46px; }
  .rv-frame-strip { padding: 4px 10px; }
}
