/* ==========================================================================
   Nexvoryn v3.2 call screen (call.css) — used by public/js/call.js on the customer pages, the staff web and the
   full page /call/{id} (also inside the Android app's WebView). SPEC-V32 §2.4.2.
   The call screen is ALWAYS dark (like a phone call), built from the Direction B tokens (ink / accent / success /
   danger); the expired card and the staff/customer chips follow light + dark. 320–1280 px. Reduced motion respected.
   ========================================================================== */

.cl {
  --cl-ink: var(--ink, #241F6B);
  --cl-ink-2: var(--ink-2, #3D33B5);
  --cl-deep: #0C0A1F;
  --cl-text: #FFFFFF;
  --cl-muted: rgba(255, 255, 255, .72);
  --cl-faint: rgba(255, 255, 255, .55);
  --cl-glass: rgba(255, 255, 255, .13);
  --cl-glass-2: rgba(255, 255, 255, .2);
  --cl-glass-border: rgba(255, 255, 255, .16);
  --cl-green: var(--success, #1E9E5F);
  --cl-red: var(--danger, #D23838);
  --cl-amber: #FFC65C;
  --cl-btn: 64px;
  --cl-safe-t: env(safe-area-inset-top, 0px);
  --cl-safe-b: env(safe-area-inset-bottom, 0px);
  position: fixed; inset: 0; z-index: 2500;
  color: var(--cl-text);
  font-family: var(--aq-font, Inter, system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  transition: opacity var(--aq-dur-med, 220ms) var(--aq-ease, ease);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.cl.is-in { opacity: 1; }
body.cl-open { overflow: hidden; }
.cl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.cl [hidden] { display: none !important; }

/* ---------- panel + backdrop ---------- */
.cl-panel {
  position: absolute; inset: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  background:
    radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--cl-ink-2) 85%, transparent) 0%, transparent 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(236, 140, 255, .14) 0%, transparent 60%),
    linear-gradient(180deg, var(--cl-ink) 0%, var(--cl-deep) 100%);
  background-color: var(--cl-deep);
}
.cl-stage { position: absolute; inset: 0; z-index: 0; }
.cl-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cl-bgav {
  position: absolute; left: 50%; top: 30%; width: 120vmax; height: 120vmax; transform: translate(-50%, -50%);
  border-radius: 50%; font-size: 0 !important; filter: blur(70px) saturate(1.2); opacity: .32;
}
.cl-bgav:not(.has-img) { opacity: .16; }
.cl-bgav img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.cl-remote {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000;
  opacity: 0; transition: opacity var(--aq-dur-slow, 320ms) var(--aq-ease, ease);
}
.cl.has-video .cl-remote { opacity: 1; }
.cl-audio { display: none; }

/* ---------- top bar ---------- */
.cl-top {
  position: relative; z-index: 3; width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: calc(14px + var(--cl-safe-t)) 16px 0;
  transition: opacity var(--aq-dur-med, 220ms), transform var(--aq-dur-med, 220ms) var(--aq-ease, ease);
}
.cl-top-sp { flex: 1; }
.cl-kindtag {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px;
  border-radius: 999px; background: var(--cl-glass); border: 1px solid var(--cl-glass-border);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: .01em; color: var(--cl-muted);
}
.cl-kindtag svg { color: #fff; opacity: .9; }
.cl-iconbtn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--cl-glass-border); background: var(--cl-glass);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: background var(--aq-dur-fast, 150ms), transform var(--aq-dur-fast, 150ms);
}
.cl-iconbtn:hover { background: var(--cl-glass-2); }
.cl-iconbtn:active { transform: scale(.94); }
.cl button:focus-visible, .cl a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.cl .cl-btn:focus-visible { outline: none; }
.cl .cl-btn:focus-visible .cl-btn-ic { box-shadow: 0 0 0 3px var(--cl-deep), 0 0 0 6px #fff; }

/* ---------- hero: avatar, name, status, timer ---------- */
.cl-hero {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center;
  width: 100%; max-width: 560px; padding: clamp(28px, 9vh, 96px) 20px 0;
  transition: opacity var(--aq-dur-med, 220ms), transform var(--aq-dur-slow, 320ms) var(--aq-ease-emph, ease);
}
.cl-avwrap { position: relative; width: 132px; height: 132px; margin-bottom: 22px; }
.cl-av {
  position: relative; z-index: 1; width: 132px !important; height: 132px !important; border-radius: 50%;
  font-size: 44px !important; font-weight: 600; letter-spacing: .02em;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .14), 0 18px 48px rgba(0, 0, 0, .35);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.cl-av img { width: 100%; height: 100%; object-fit: cover; }
/* initials (no photo): an accent gradient reads better on the dark screen than the light list palette */
.cl-av:not(.has-img), .cl-peeroff-av:not(.has-img) { background: linear-gradient(140deg, #8A6CF0 0%, #5146D9 55%, #3D33B5 100%) !important; color: #fff !important; }
.cl-bgav:not(.has-img) { background: #6A4FE0 !important; }
.cl-pulse {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .28);
  opacity: 0; pointer-events: none;
}
.cl[data-phase="incoming"] .cl-pulse, .cl[data-phase="outgoing"] .cl-pulse { animation: cl-pulse 2.4s var(--aq-ease, ease-out) infinite; }
.cl[data-phase="incoming"] .cl-pulse { border-color: color-mix(in srgb, var(--cl-green) 70%, #fff); }
.cl[data-phase="connecting"] .cl-pulse { animation: cl-pulse 1.6s ease-out infinite; }
.cl .cl-pulse-2 { animation-delay: .8s !important; }
.cl .cl-pulse-3 { animation-delay: 1.6s !important; }
@keyframes cl-pulse {
  0% { transform: scale(1); opacity: .75; }
  100% { transform: scale(1.75); opacity: 0; }
}
.cl-name {
  margin: 0; max-width: 100%; font-size: 28px; line-height: 34px; font-weight: 650; letter-spacing: -.01em; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext;
}
.cl-status { margin: 8px 0 0; min-height: 22px; font-size: 16px; line-height: 22px; font-weight: 500; color: var(--cl-muted); }
.cl.is-reconnecting .cl-status { color: var(--cl-amber); }
.cl.is-reconnecting .cl-status::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; vertical-align: 1px; border-radius: 50%;
  background: var(--cl-amber); animation: cl-blink 1s ease-in-out infinite;
}
@keyframes cl-blink { 50% { opacity: .25; } }
.cl-timer { margin: 6px 0 0; font-size: 17px; line-height: 22px; font-weight: 600; font-variant-numeric: tabular-nums; color: #fff; letter-spacing: .03em; }
.cl-peermute {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; height: 28px; padding: 0 12px;
  border-radius: 999px; background: rgba(0, 0, 0, .28); border: 1px solid var(--cl-glass-border); font-size: 13px; font-weight: 600; color: var(--cl-muted);
}

/* video in progress: the hero shrinks to a top-left label over the remote video (the PiP sits top-right) */
.cl.has-video .cl-hero { padding: 10px 16px 0; max-width: none; align-items: flex-start; text-align: left; }
.cl.has-video .cl-name { max-width: calc(100vw - 150px); }
.cl.has-video .cl-status, .cl.has-video .cl-timer { margin-top: 2px; }
.cl.has-video .cl-avwrap { display: none; }
.cl.has-video .cl-name { font-size: 20px; line-height: 26px; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.cl.has-video .cl-timer, .cl.has-video .cl-status { text-shadow: 0 1px 6px rgba(0, 0, 0, .55); }
.cl.has-video .cl-panel::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 220px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55));
}
.cl.has-video .cl-panel::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 160px; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, transparent, rgba(0, 0, 0, .45));
}
.cl.is-idle .cl-top, .cl.is-idle .cl-hero { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.cl.is-idle .cl-controls { opacity: 0; transform: translateY(16px); pointer-events: none; }

.cl-peeroff {
  position: absolute; z-index: 3; left: 50%; bottom: calc(150px + var(--cl-safe-b)); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 6px; border-radius: 999px;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--cl-glass-border); font-size: 13.5px; font-weight: 600; color: var(--cl-muted);
}
.cl-peeroff-av { width: 24px !important; height: 24px !important; border-radius: 50%; font-size: 10px !important; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.cl-peeroff-av img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- local preview (PiP) ---------- */
.cl-pip {
  position: absolute; z-index: 4; width: 96px; height: 128px; border-radius: 16px; overflow: hidden;
  background: #15132e; border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  touch-action: none; cursor: grab;
  transition: top var(--aq-dur-slow, 320ms) var(--aq-ease-emph, ease), left var(--aq-dur-slow, 320ms) var(--aq-ease-emph, ease), right var(--aq-dur-slow, 320ms) var(--aq-ease-emph, ease), bottom var(--aq-dur-slow, 320ms) var(--aq-ease-emph, ease);
}
.cl-pip.is-dragging { transition: none; cursor: grabbing; }
.cl-pip.is-tr { top: calc(70px + var(--cl-safe-t)); right: 16px; }
.cl-pip.is-tl { top: calc(70px + var(--cl-safe-t)); left: 16px; }
.cl-pip.is-br { bottom: calc(150px + var(--cl-safe-b)); right: 16px; }
.cl-pip.is-bl { bottom: calc(150px + var(--cl-safe-b)); left: 16px; }
.cl-local { width: 100%; height: 100%; object-fit: cover; display: block; background: #15132e; }
.cl-pip.is-mirror .cl-local { transform: scaleX(-1); }
.cl-pip-off {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: #1B1838; color: var(--cl-muted); font-size: 11.5px; font-weight: 600; text-align: center;
}
/* while a video call rings / connects, my own camera fills the screen behind the name (it moves to the corner once connected) */
.cl--video[data-phase="outgoing"] .cl-pip, .cl--video[data-phase="connecting"] .cl-pip {
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100%; height: 100%;
  z-index: 0; border: 0; border-radius: 0; box-shadow: none; pointer-events: none; background: transparent;
}
.cl--video[data-phase="outgoing"] .cl-pip::after, .cl--video[data-phase="connecting"] .cl-pip::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 10, 31, .55) 0%, rgba(12, 10, 31, .35) 45%, rgba(12, 10, 31, .75) 100%);
}
.cl--video[data-phase="outgoing"] .cl-pip-off, .cl--video[data-phase="connecting"] .cl-pip-off { display: none; }

/* ---------- tap to hear (autoplay blocked) ---------- */
.cl-tap {
  position: absolute; z-index: 5; left: 50%; bottom: calc(160px + var(--cl-safe-b)); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px;
  border: 0; background: #fff; color: var(--cl-ink); font: 600 16px/20px var(--aq-font, sans-serif); cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35); animation: cl-bob 1.6s ease-in-out infinite;
}
@keyframes cl-bob { 50% { transform: translate(-50%, -4px); } }

/* ---------- buttons ---------- */
.cl-btn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px; min-width: 64px;
  border: 0; background: none; color: #fff; padding: 0; cursor: pointer; font: inherit;
}
.cl-btn-ic {
  width: var(--cl-btn); height: var(--cl-btn); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--cl-glass); border: 1px solid var(--cl-glass-border);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  transition: background var(--aq-dur-fast, 150ms), color var(--aq-dur-fast, 150ms), transform var(--aq-dur-fast, 150ms) var(--aq-ease-spring, ease);
}
.cl-btn:hover .cl-btn-ic { background: var(--cl-glass-2); }
.cl-btn:active .cl-btn-ic { transform: scale(.92); }
.cl-btn-cap { font-size: 12.5px; line-height: 16px; font-weight: 600; color: var(--cl-muted); white-space: nowrap; }
.cl-btn[aria-pressed="true"].cl-mute .cl-btn-ic { background: #fff; color: var(--cl-ink); border-color: #fff; }
.cl-btn[aria-pressed="true"].cl-speaker .cl-btn-ic { background: #fff; color: var(--cl-ink); border-color: #fff; }
.cl-btn[aria-pressed="false"].cl-cam .cl-btn-ic { background: #fff; color: var(--cl-ink); border-color: #fff; }
.cl-btn:disabled { opacity: .45; cursor: default; }
.cl-end .cl-btn-ic, .cl-decline .cl-btn-ic { background: var(--cl-red); border-color: transparent; box-shadow: 0 10px 26px color-mix(in srgb, var(--cl-red) 45%, transparent); }
.cl-end:hover .cl-btn-ic, .cl-decline:hover .cl-btn-ic { background: color-mix(in srgb, var(--cl-red) 88%, #000); }
.cl-answer .cl-btn-ic { background: var(--cl-green); border-color: transparent; box-shadow: 0 10px 26px color-mix(in srgb, var(--cl-green) 45%, transparent); }
.cl-answer:hover .cl-btn-ic { background: color-mix(in srgb, var(--cl-green) 88%, #000); }
.cl[data-phase="incoming"] .cl-answer .cl-btn-ic { animation: cl-nudge 1.8s var(--aq-ease-spring, ease) infinite; }
@keyframes cl-nudge { 0%, 70%, 100% { transform: none; } 78% { transform: translateY(-5px) rotate(-8deg); } 86% { transform: translateY(0) rotate(7deg); } 93% { transform: rotate(-4deg); } }

.cl-controls, .cl-actions {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-start; justify-content: center; flex-wrap: nowrap;
  padding: 18px 12px calc(26px + var(--cl-safe-b));
  transition: opacity var(--aq-dur-med, 220ms), transform var(--aq-dur-med, 220ms) var(--aq-ease, ease);
}
.cl-controls { gap: clamp(10px, 4vw, 22px); }
.cl-actions { gap: clamp(64px, 26vw, 120px); padding-bottom: calc(44px + var(--cl-safe-b)); }
.cl-actions .cl-btn { --cl-btn: 72px; }
.cl-actions .cl-btn-cap { font-size: 14px; color: #fff; }
.cl-controls .cl-end { --cl-btn: 68px; }
/* which block shows in which phase */
.cl .cl-actions, .cl .cl-controls, .cl .cl-endbox { display: none; }
.cl[data-phase="incoming"] .cl-actions { display: flex; }
.cl[data-phase="outgoing"] .cl-controls, .cl[data-phase="connecting"] .cl-controls, .cl[data-phase="active"] .cl-controls { display: flex; }
.cl[data-phase="ended"]:not(.is-perm) .cl-endbox { display: flex; }

/* ---------- end card ---------- */
.cl-endbox {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; flex-direction: column; align-items: center; text-align: center;
  padding: 0 20px calc(40px + var(--cl-safe-b)); animation: cl-up var(--aq-dur-slow, 320ms) var(--aq-ease-emph, ease) both;
}
.cl-endic { width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); color: #fff; margin-bottom: 14px; }
.cl-endtext { margin: 0; font-size: 18px; line-height: 24px; font-weight: 650; color: #fff; max-width: 420px; }
.cl-endsub { margin: 6px 0 0; font-size: 14.5px; color: var(--cl-muted); }
.cl-endacts { display: flex; gap: 12px; margin-top: 18px; }
.cl-endacts:empty { display: none; }
.cl[data-phase="ended"] .cl-hero { opacity: .8; }
.cl[data-phase="ended"] .cl-status { display: none; }
.cl-back { min-width: 180px; }
@keyframes cl-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- permission help ---------- */
.cl.is-perm .cl-hero, .cl.is-perm .cl-pip { display: none; }
.cl-perm {
  position: relative; z-index: 4; margin: auto 16px; width: calc(100% - 32px); max-width: 440px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 28px 22px 22px; border-radius: 24px; background: rgba(255, 255, 255, .08); border: 1px solid var(--cl-glass-border);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  animation: cl-up var(--aq-dur-slow, 320ms) var(--aq-ease-emph, ease) both;
}
.cl-perm-ic { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--cl-amber) 22%, transparent); color: var(--cl-amber); margin-bottom: 14px; }
.cl-perm-title { margin: 0; font-size: 20px; line-height: 26px; font-weight: 700; color: #fff; }
.cl-perm-text { margin: 8px 0 0; font-size: 15px; line-height: 21px; color: var(--cl-muted); }
.cl-steps { list-style: none; margin: 16px 0 0; padding: 0; width: 100%; display: grid; gap: 8px; text-align: left; }
.cl-steps li { display: flex; align-items: flex-start; gap: 12px; padding: 11px 12px; border-radius: 14px; background: rgba(255, 255, 255, .07); font-size: 14.5px; line-height: 20px; color: #fff; }
.cl-step-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--cl-ink); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.cl-perm-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; width: 100%; }
.cl-perm-acts .btn { flex: 1 1 140px; min-height: 48px; }
.cl .cl-btn-glass, .cl .cl-btn-glass:hover { background: var(--cl-glass); border-color: var(--cl-glass-border); color: #fff; }
.cl a.btn-primary, .cl a.btn-primary:hover { color: var(--on-accent, #fff); }

/* ---------- desktop / tablet: the incoming call is a floating card, not a takeover ---------- */
@media (min-width: 768px) {
  .cl:not(.is-page)[data-phase="incoming"] { background: var(--scrim, rgba(20, 17, 46, .55)); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
  .cl:not(.is-page)[data-phase="incoming"] .cl-panel {
    inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 380px; height: min(600px, calc(100vh - 48px));
    border-radius: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .1);
    animation: cl-pop var(--aq-dur-slow, 320ms) var(--aq-ease-emph, ease) both;
  }
  .cl:not(.is-page)[data-phase="incoming"] .cl-top { padding-top: 18px; }
  .cl:not(.is-page)[data-phase="incoming"] .cl-hero { padding-top: 48px; }
  .cl:not(.is-page)[data-phase="incoming"] .cl-actions { gap: 96px; padding-bottom: 40px; }
  .cl-pip { width: 160px; height: 120px; }
  .cl--video .cl-pip { width: 176px; height: 132px; }
  .cl-avwrap, .cl-av { width: 148px !important; height: 148px !important; }
  .cl-controls { gap: 22px; padding-bottom: 36px; }
  .cl-name { font-size: 32px; line-height: 38px; }
}
@keyframes cl-pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (max-width: 360px) {
  .cl { --cl-btn: 56px; }
  .cl-controls { gap: 8px; padding-left: 6px; padding-right: 6px; }
  .cl-controls .cl-end { --cl-btn: 60px; }
  .cl-btn { min-width: 56px; }
  .cl-btn-cap { font-size: 11.5px; }
  .cl-avwrap, .cl-av { width: 112px !important; height: 112px !important; }
  .cl-av { font-size: 38px !important; }
  .cl-name { font-size: 24px; line-height: 30px; }
}
@media (max-height: 560px) {
  .cl-hero { padding-top: 12px; }
  .cl-avwrap, .cl-av { width: 88px !important; height: 88px !important; }
  .cl-av { font-size: 30px !important; }
  .cl-avwrap { margin-bottom: 12px; }
  .cl-controls, .cl-actions { padding-bottom: calc(14px + var(--cl-safe-b)); }
}

/* ---------- minimised: a floating pill while the person reads the chat ---------- */
/* desktop: bottom-left (over the sidebar footer, never over the composer); phones: a slim bar at the top */
.cl.is-mini { inset: auto auto calc(16px + var(--cl-safe-b)) 16px; width: min(320px, calc(100vw - 32px)); height: auto; }
.cl.is-mini .cl-panel { display: none; }
.cl-mini { display: none; }
.cl.is-mini .cl-mini {
  display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 20px;
  background: linear-gradient(135deg, var(--cl-ink-2), var(--cl-ink)); box-shadow: 0 18px 44px rgba(20, 17, 46, .35), 0 0 0 1px rgba(255, 255, 255, .08) inset;
  animation: cl-up var(--aq-dur-med, 220ms) var(--aq-ease-emph, ease) both;
}
.cl-mini-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 14px; background: none; color: #fff; cursor: pointer; text-align: left; font: inherit; }
.cl-mini-open:hover { background: rgba(255, 255, 255, .08); }
.cl-mini-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--cl-green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cl-green) 30%, transparent); animation: cl-blink 1.6s ease-in-out infinite; }
.cl-mini-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cl-mini-name { font-size: 14.5px; line-height: 18px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-mini-time { font-size: 12.5px; line-height: 16px; color: var(--cl-muted); font-variant-numeric: tabular-nums; }
.cl-mini-time:empty::before { content: "Calling\2026"; }
.cl-mini-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cl-mini-btn[aria-pressed="true"] { background: #fff; color: var(--cl-ink); }
.cl-mini-end { background: var(--cl-red); }
@media (max-width: 899px) {
  .cl.is-mini { inset: calc(8px + var(--cl-safe-t)) 8px auto 8px; width: auto; }
  .cl.is-mini .cl-mini { padding: 6px; border-radius: 18px; }
}

/* ---------- full page /call/* and the expired card ---------- */
body.cl-page { margin: 0; min-height: 100vh; background: #0C0A1F; color: #fff; }
.cl-page-main { min-height: 100vh; min-height: 100dvh; }
.cl-boot {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: linear-gradient(180deg, var(--ink, #241F6B), #0C0A1F); color: rgba(255, 255, 255, .78); font: 500 16px/22px var(--aq-font, sans-serif);
}
.cl-boot-spin { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .18); border-top-color: #fff; animation: cl-spin 1s linear infinite; }
@keyframes cl-spin { to { transform: rotate(360deg); } }
body.cl-page-on .cl-boot { display: none; }
.cl-expired {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: radial-gradient(120% 70% at 50% -10%, var(--ink-2, #3D33B5) 0%, transparent 60%), linear-gradient(180deg, var(--ink, #241F6B), #0C0A1F);
}
.cl-expired-card {
  width: 100%; max-width: 400px; text-align: center; padding: 32px 24px 26px; border-radius: 28px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.cl-expired-ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); }
.cl-expired-card h1 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; }
.cl-expired-card p { margin: 10px 0 0; font-size: 15.5px; line-height: 22px; color: rgba(255, 255, 255, .74); }
.cl-expired-brand { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 13px; color: rgba(255, 255, 255, .6); }
.cl-expired-brand img { width: 20px; height: 20px; }

/* ---------- staff web: call buttons + "no notifications" chip in the inbox thread header ---------- */
.ib-callbtn { flex: none; }
.ib-callbtn svg { width: 22px; height: 22px; }
.ib-head .ib-callbtn:hover { color: var(--accent-text); background: var(--accent-softer); }
/* narrow phones: two more header buttons must not squeeze the customer name away; the name button opens the details too */
@media (max-width: 420px) {
  .ib-head.has-call { gap: 4px; padding-left: 8px; padding-right: 8px; }
  .ib-head.has-call #ib-panel-btn { display: none; }
  .app-body .inbox23 .ib-head.has-call .ib-whobtn { gap: 8px; padding-right: 2px; }
  .app-body .inbox23 .ib-head.has-call .ib-av .avatar { width: 36px; height: 36px; font-size: 13px; }
}
.ib-nonotif {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px 1px 6px; height: 20px; vertical-align: 1px;
  border-radius: 999px; background: var(--warning-tint, #FEF3DD); color: var(--warning-text, #855300);
  font-size: 11.5px; line-height: 14px; font-weight: 600; white-space: nowrap; cursor: help;
}
.ib-nonotif svg { flex: none; }
/* REVIEW-WEB-V32: narrow phones — icon-only chip (title + aria-label keep the reason) instead of a clipped "N…" fragment */
.app-body .inbox23 .ib-sub .ib-nonotif { flex: none; }
@media (max-width: 420px) {
  .ib-nonotif { position: relative; padding: 1px 5px; }
  .ib-nonotif > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.ip-notif-off { color: var(--warning-text, #855300); }

/* ---------- call log pill in the thread (chat-view.js, shared by staff + customer) ---------- */
.msg-callpill {
  cursor: pointer; border: 1px solid var(--pill-border); font-family: inherit; color: var(--pill-text);
  transition: background var(--aq-dur-fast, 150ms), transform var(--aq-dur-fast, 150ms);
  min-height: 32px;
}
.msg-callpill:hover { background: var(--surface); color: var(--text-primary); }
.msg-callpill:active { transform: scale(.97); }
.msg-callpill:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.msg-callpill .msg-callpill-ic { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.msg-callpill.is-missed .msg-callpill-ic { background: var(--danger-tint); color: var(--danger-text); }
.msg-callpill.is-missed .msg-callpill-tx { color: var(--danger-text); }
.msg-callpill-tx { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-callpill-time { flex: none; white-space: nowrap; color: var(--text-muted); font-weight: 500; margin-left: 2px; }
.msg-callpill-cb { flex: none; white-space: nowrap; color: var(--accent-text); font-weight: 600; margin-left: 4px; }
@media (max-width: 360px) { .msg-callpill-time { display: none; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cl, .cl * { animation: none !important; transition: none !important; }
  .cl-pulse { display: none; }
}
