/*
  Review UI (Frame.io-artig) – nutzt jetzt die shared Tokens aus assets/style.css
  -> dadurch wirkt alles "Apple-like" und konsistent.
*/

.rv-shell{min-height:100%}

/* Topbar */
.rv-topbar{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  gap:16px;
  padding:14px 18px;
  border-bottom:1px solid var(--line2);
  /* Default (dark presets): translucent/glassy bar */
  background: rgba(11,13,16,.72);
  backdrop-filter: blur(16px);
}

/* Light mode override (in case other rules set translucency elsewhere) */
html[data-theme="light"] .rv-topbar{
  background:#ffffff;
  backdrop-filter:none;
}

.rv-brand{display:flex; align-items:center; gap:12px; min-width:0}
.rv-dot{
  width:10px; height:10px; border-radius:50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 6px rgba(0,113,227,.10);
}
.rv-brandText{min-width:0}
.rv-title{
  font-size:14px;
  font-weight:650;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:56vw;
}
.rv-sub{
  display:flex; flex-wrap:wrap; gap:8px;
  font-size:12px;
  color:var(--muted);
}
.rv-chip{
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(110,168,255,.25);
  background:rgba(110,168,255,.08);
  color:rgba(231,234,240,.85);
}
.rv-sep{opacity:.6}

.rv-actions{display:flex; gap:10px; align-items:center}

/* Layout */
.rv-main{
  display:grid;
  grid-template-columns: minmax(0,1fr) 380px;
  gap:16px;
  padding:16px;
  max-width: 1480px;
  margin:0 auto;
}
@media (max-width: 1100px){
  .rv-main{grid-template-columns: 1fr; padding:12px}
  .rv-title{max-width:70vw}
}

/* Kinomodus: Player groß, Kommentare unter dem Player */
body.rv-cinema .rv-main{
  grid-template-columns: 1fr;
}
body.rv-cinema .rv-notes{
  min-height: unset;
}
body.rv-cinema .rv-playerCard .rv-video{aspect-ratio: 21/9;}
.rv-playerWrap{min-width:0}
.rv-playerCard{
  background:linear-gradient(180deg, rgba(255,255,255,.02), transparent 30%), var(--panel);
  border:1px solid var(--line);
  border-radius: var(--r16);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.rv-video{
  width:100%;
  display:block;
  background:#000;
  aspect-ratio: 16/9;
}

/* Timeline markers (comment markers as small dots)
   Sits just above the native controls area */
.rv-playerCard{position:relative}
.rv-timeline{
  position:absolute;
  left:12px;
  right:12px;
  bottom:56px; /* approx above native controls */
  height:14px;
  pointer-events:none;
}
.rv-marker{
  position:absolute;
  top:2px;
  width:8px;
  height:8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.35);
  background:rgba(10,132,255,.85);
  transform:translateX(-50%);
  pointer-events:auto;
  cursor:pointer;
}
.rv-marker:hover{transform:translateX(-50%) scale(1.15)}

/* Cinema mode: player bigger, comments under the player */
body.rv-cinema .rv-main{
  grid-template-columns: 1fr;
}
body.rv-cinema .rv-notes{
  min-height: 380px;
}
.rv-playerMeta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-top:1px solid var(--line);
}
.rv-time{display:flex; flex-direction:column; gap:2px}
.rv-timeLabel{font-size:11px; color:var(--muted2)}
.rv-timeValue{
  font-variant-numeric: tabular-nums;
  font-size:13px;
  color:rgba(231,234,240,.9);
}

/* Notes Sidebar */
.rv-notes{
  background:linear-gradient(180deg, rgba(255,255,255,.02), transparent 30%), var(--panel2);
  border:1px solid var(--line);
  border-radius: var(--r16);
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  min-height: 520px;
  overflow:hidden;
}

/* Light mode: comment window should be fully white (requested) */
html[data-theme="light"] .rv-notes,
html[data-theme="light"] .rv-notesHeader,
html[data-theme="light"] .rv-notesList,
html[data-theme="light"] .rv-composer{
  background:#ffffff;
}

/* Light mode: user requested that all grey texts become black */
html[data-theme="light"]{
  --muted: #000000;
  --muted2: #000000;
}

html[data-theme="light"] .rv-chip,
html[data-theme="light"] .rv-timeValue,
html[data-theme="light"] .rv-timepill,
html[data-theme="light"] .rv-noteBody,
html[data-theme="light"] .rv-avatar,
html[data-theme="light"] .rv-pill,
html[data-theme="light"] .rv-linkBtn.muted,
html[data-theme="light"] .rv-menuItem,
html[data-theme="light"] .rv-kebab{
  color:#000000;
}

html[data-theme="light"] .rv-note.isDone .rv-noteBody{
  text-decoration-color: rgba(0,0,0,.35);
}

/* Light mode: requested button labels + header controls in black */
html[data-theme="light"] #sendBtn,
html[data-theme="light"] #exportCsvBtn,
html[data-theme="light"] #exportPdfBtn{
  color:#000000;
}

/* Topbar actions (Download, Link kopieren) in black */
html[data-theme="light"] .rv-topbar .rv-actions .rv-btn{
  color:#000000;
}

/* Light mode: dark-mode toggle should be black */
html[data-theme="light"] .rv-topbar .switch .slider{
  background:#000000;
  border-color:#000000;
}
html[data-theme="light"] .rv-topbar .switch input:checked + .slider{
  background:#000000;
  border-color:#000000;
}
.rv-notesHeader{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
}
.rv-notesTitle{font-weight:650; font-size:13px; letter-spacing:.2px}
.rv-notesCount{
  font-size:12px;
  padding:3px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--muted);
  background:rgba(255,255,255,.03);
}

.rv-notesRight{display:flex; align-items:center; gap:8px}

.rv-btn.xs{padding:6px 9px; font-size:11px; border-radius:10px}

/* Reply bar in composer */
.rv-replyBar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  margin: 10px 10px 0 10px;
  border:1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}
.rv-replyText{font-size:12px; color: var(--muted)}
.rv-replyCancel{border:0; background:transparent; color: rgba(110,168,255,.9); font-weight:650; cursor:pointer}

/* Nested comments */
.rv-note.depth-1{margin-left:18px}
.rv-note.depth-2{margin-left:36px}
.rv-note.depth-3{margin-left:54px}

.rv-note.isDone{
  opacity:.78;
}
.rv-note.isDone .rv-noteBody{ text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: rgba(255,255,255,.25); }

.rv-noteFoot{display:flex; gap:12px; margin-top:8px}
.rv-linkBtn{
  border:0;
  background: transparent;
  padding:0;
  color: rgba(110,168,255,.95);
  font-size:12px;
  font-weight:650;
  cursor:pointer;
}
.rv-linkBtn.muted{color: rgba(255,255,255,.45)}
.rv-notesList{
  padding:10px;
  overflow:auto;
  flex:1;
}
.rv-note{
  border:1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  padding:10px 10px 9px 10px;
  margin-bottom:10px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.rv-note:hover{
  transform: translateY(-1px);
  border-color: rgba(110,168,255,.25);
  background: rgba(110,168,255,.06);
}
.rv-noteHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.rv-noteLeft{
  display:flex; align-items:center; gap:8px; min-width:0;
}
.rv-noteAvatar{
  width:24px; height:24px; border-radius:50%;
  background:linear-gradient(135deg, rgba(110,168,255,.85), rgba(124,240,195,.65));
  display:grid; place-items:center;
  font-size:12px; font-weight:750;
  color:#081018;
}
.rv-noteAuthor{
  font-size:12px;
  font-weight:650;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  max-width: 180px;
}
.rv-noteMeta{
  display:flex; align-items:center; gap:8px;
  font-size:11px;
  color:var(--muted2);
}
.rv-timepill{
  display:inline-flex; align-items:center; gap:6px;
  padding:3px 9px;
  border-radius:999px;
  border:1px solid rgba(110,168,255,.28);
  background:rgba(110,168,255,.10);
  color:rgba(231,234,240,.92);
  font-variant-numeric: tabular-nums;
  cursor:pointer;
  user-select:none;
  transition: filter .12s ease;
}
.rv-timepill:hover{filter:brightness(1.08)}
.rv-timepillDot{
  width:6px; height:6px; border-radius:50%;
  background: var(--accent2);
  box-shadow: 0 0 0 4px rgba(124,240,195,.10);
}
.rv-noteBody{
  color:rgba(231,234,240,.88);
  font-size:13px;
  line-height:1.35;
  white-space:pre-wrap;
  word-break: break-word;
}

/* Composer */
.rv-composer{
  border-top:1px solid var(--line);
  padding:12px;
  background: rgba(0,0,0,.18);
}
.rv-composerTop{
  display:flex; gap:10px; align-items:flex-start;
  margin-bottom:10px;
}
.rv-avatar{
  width:30px; height:30px; border-radius:10px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  display:grid; place-items:center;
  color:rgba(231,234,240,.85);
  font-weight:750;
}
.rv-composerFields{flex:1; min-width:0}
.rv-inline{display:flex; align-items:center; gap:8px; margin-top:8px}
.rv-hint{font-size:11px; color:var(--muted2)}
.rv-pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: rgba(231,234,240,.92);
  cursor:pointer;
  user-select:none;
}
.rv-pill:hover{border-color: rgba(110,168,255,.30); background: rgba(110,168,255,.08)}
.rv-pillDot{
  width:7px; height:7px; border-radius:50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(110,168,255,.10);
}

.rv-input, .rv-textarea{
  width:100%;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding:10px 12px;
  outline:none;
}
.rv-input:focus, .rv-textarea:focus{
  border-color: rgba(110,168,255,.45);
  box-shadow: 0 0 0 4px rgba(110,168,255,.12);
}
.rv-input{height:38px; font-size:13px}
.rv-textarea{
  min-height: 92px;
  resize: vertical;
  font-size:13px;
  line-height:1.35;
}

.rv-composerBottom{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
  margin-top:10px;
}
.rv-muted{font-size:11px; color:var(--muted2)}

/* Buttons */
.rv-btn{
  appearance:none;
  border:1px solid rgba(110,168,255,.45);
  background: rgba(110,168,255,.14);
  color: rgba(231,234,240,.95);
  padding:9px 12px;
  border-radius: 12px;
  cursor:pointer;
  font-weight:650;
  font-size:13px;
  transition: transform .10s ease, filter .10s ease, background .10s ease, border-color .10s ease;
}
.rv-btn:hover{filter:brightness(1.08)}
.rv-btn:active{transform: translateY(1px)}
.rv-btn.ghost{
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
.rv-btn.small{padding:7px 10px; font-size:12px; border-radius: 11px}

/* Lock screen */
.rv-lock{
  min-height: calc(100vh - 60px);
  display:grid;
  place-items:center;
  padding:16px;
}
.rv-lockCard{
  width:min(460px, 92vw);
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 35%), var(--panel);
  border:1px solid var(--line);
  border-radius: var(--r16);
  box-shadow: var(--shadow);
  padding:18px;
}
.rv-lockIcon{font-size:24px; opacity:.9}
.rv-lockCard h1{margin:10px 0 4px; font-size:18px}
.rv-lockCard p{margin:0 0 12px; color:var(--muted); font-size:13px}
.rv-lockForm{display:flex; gap:10px; align-items:center}
.rv-alert{
  border:1px solid rgba(255,93,93,.35);
  background: rgba(255,93,93,.10);
  color: rgba(255,255,255,.92);
  padding:10px 12px;
  border-radius: 12px;
  margin:10px 0;
  font-size:13px;
}

/* Scrollbar subtle */
.rv-notesList::-webkit-scrollbar{width:10px}
.rv-notesList::-webkit-scrollbar-thumb{background:rgba(255,255,255,.10); border-radius:999px; border:2px solid transparent; background-clip:content-box}
.rv-notesList::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.16)}

/* Toast */
.rv-toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform: translateX(-50%);
  background: rgba(17,20,26,.92);
  border:1px solid rgba(255,255,255,.10);
  color: rgba(231,234,240,.92);
  padding:10px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
}
.rv-toast.show{
  opacity:1;
  transform: translateX(-50%) translateY(-2px);
}
/* Kebab + menu (Frame.io-ish) */
.rv-kebab{
  appearance:none;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(231,234,240,.9);
  width:32px;
  height:28px;
  border-radius: 10px;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:18px;
  line-height:0;
  transition: filter .12s ease, border-color .12s ease, background .12s ease;
}
.rv-kebab:hover{
  border-color: rgba(110,168,255,.30);
  background: rgba(110,168,255,.08);
  filter:brightness(1.06);
}

.rv-noteMeta{position:relative}
.rv-menu{
  position:absolute;
  top:32px;
  right:46px; /* sitzt neben dem Datum, leicht links */
  min-width: 190px;
  background: var(--panel);
  border:1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
  padding:6px;
  display:none;
  z-index: 20;
}
.rv-menu.open{display:block}

.rv-menuItem{
  width:100%;
  text-align:left;
  padding:10px 10px;
  border-radius: 12px;
  border:0;
  background: transparent;
  color: rgba(231,234,240,.92);
  cursor:pointer;
  font-size:13px;
  font-weight:600;
}
.rv-menuItem:hover{
  background: rgba(255,255,255,.06);
}
.rv-menuItem.danger{
  color: rgba(255,93,93,.95);
}
.rv-menuItem.danger:hover{
  background: rgba(255,93,93,.12);
}

.rv-date{display:none;} /* optional: Datum ausblenden für cleaneren Frame.io look */
@media (min-width: 1100px){
  .rv-date{display:inline;} /* auf Desktop wieder anzeigen */
}
