/* package "callx": mini window (1.3), consent sheet + recordings manager (1.7, 5.9), control log (1.5) */

/* ——— 1.3 in-page mini window ——— */
.cx-mini.is-floating {
  position: fixed;
  z-index: 1200;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: #0b0f17;
  color: #fff;
  box-shadow: var(--shadow-lg);
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.cx-mini.is-floating:active { cursor: grabbing; }
.cx-mini-media { position: absolute; inset: 0; display: grid; place-items: center; }
.cx-mini-media video { width: 100%; height: 100%; object-fit: cover; display: none; }
.cx-mini.has-video .cx-mini-media video { display: block; }
.cx-mini.has-video .cx-mini-avatar { display: none; }
.cx-mini-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-contrast);
  font-size: 20px; font-weight: 600;
}
.cx-mini-top {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; justify-content: space-between; gap: 8px;
  padding: 8px 10px; font-size: 13px;
  background: linear-gradient(rgba(0, 0, 0, .55), transparent);
}
.cx-mini-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cx-mini-time { font-variant-numeric: tabular-nums; opacity: .85; }
.cx-mini-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; gap: 8px; padding: 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}
.cx-mini-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .18); color: #fff;
}
.cx-mini-btn:hover { background: rgba(255, 255, 255, .3); }
.cx-mini-btn.is-off { background: #fff; color: #111; }
.cx-mini-btn.is-end { background: var(--danger); color: #fff; }
.cx-mini-grip {
  position: absolute; right: 0; bottom: 0; width: 18px; height: 18px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, .5) 50%);
}
body.cx-mini-on .call-overlay.is-minimized .call-bar,
body.cx-mini-on .gcall-pill { display: none !important; }

/* ——— 1.7 consent sheet ——— */
.sg-overlay.cx-ask-wrap {
  position: fixed; inset: 0; z-index: 1300;
  display: grid; place-items: end center;
  padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--overlay);
}
.cx-ask {
  width: min(420px, 100%);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 18px;
  padding: 16px; box-shadow: var(--shadow-lg);
}
.cx-ask-head { display: flex; align-items: center; gap: 8px; color: var(--danger); }
.cx-ask-head strong { color: var(--text); }
.cx-ask-text { margin: 10px 0 14px; color: var(--muted); line-height: 1.45; }
.cx-ask-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ——— 1.7 / 5.9 manager ——— */
.cx-rec-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.cx-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--input-bg); }
.cx-tab {
  border: 0; background: transparent; color: var(--muted);
  padding: 6px 12px; border-radius: 9px; font: inherit; cursor: pointer;
}
.cx-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.cx-input {
  min-width: 0; flex: 1 1 160px;
  padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--input-bg); color: var(--text); font: inherit;
}
.cx-sort { flex: 0 1 auto; }
.cx-rec-list { display: grid; gap: 10px; }
.cx-rec {
  display: flex; gap: 12px; padding: 12px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
}
.cx-rec-poster {
  flex: 0 0 120px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; background: var(--input-bg); color: var(--muted);
}
.cx-rec-poster img { width: 100%; height: 100%; object-fit: cover; }
.cx-rec-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.cx-rec-title { font-weight: 600; overflow-wrap: anywhere; }
.cx-rec-meta { color: var(--muted); font-size: 13px; }
.cx-badge {
  display: inline-block; padding: 1px 7px; border-radius: 8px; font-size: 12px; font-weight: 500;
  background: var(--accent-soft); color: var(--accent);
}
.cx-rec-actions, .cx-rename { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cx-btn { padding: 6px 12px; font-size: 13px; text-decoration: none; }
.cx-danger { color: var(--danger); }
@media (max-width: 560px) {
  .cx-rec { flex-direction: column; }
  .cx-rec-poster { flex-basis: auto; width: 100%; }
}

/* ——— 1.5 control log ——— */
.cx-ctl { display: grid; gap: 6px; }
.cx-ctl-note { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.cx-ctl-head { margin-top: 6px; font-weight: 600; font-size: 13px; color: var(--muted); }
.cx-ctl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.cx-ctl-row.is-active .cx-ctl-text { color: var(--text); font-weight: 500; }
.cx-ctl-text { font-size: 13px; color: var(--muted); }
