/* ═══════════════════════════════════════════════
   PULSE CALLS — Full Redesign
   ═══════════════════════════════════════════════ */

/* ── Add missing av sizes ─────────────────────── */
.av.s88  { width: 88px;  height: 88px;  font-size: 34px; }
.av.s100 { width: 100px; height: 100px; font-size: 40px; }

/* ── Calls Tab ──────────────────────────────── */
.calls-tab-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.calls-tab-header::-webkit-scrollbar { display: none; }

.calls-filter-btn {
  padding: 6px 18px;
  border: 1.5px solid var(--border);
  background: var(--bg2);
  color: var(--t2);
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
.calls-filter-btn.active {
  background: var(--acc-dim);
  border-color: var(--acc);
  color: var(--acc);
}

/* ── Empty state ─────────────────────────────── */
.calls-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px;
  text-align: center;
}
.calls-empty-icon {
  width: 76px; height: 76px;
  border-radius: 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--t3);
  margin-bottom: 18px;
}
.calls-empty-title { font-size: 17px; font-weight: 700; color: var(--t1); margin-bottom: 8px; }
.calls-empty-sub   { font-size: 13px; color: var(--t3); line-height: 1.5; max-width: 260px; }

/* ── Call history row ────────────────────────── */
.call-history-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.call-history-row:active { background: var(--bg2); }

.call-hist-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--t2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.call-hist-btn:active {
  background: var(--acc-dim);
  color: var(--acc);
  border-color: var(--acc);
  transform: scale(.93);
}

/* ── Call button in chat header ───────────────── */
.dlg-call-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(88,166,255,.1);
  border: 1px solid rgba(88,166,255,.2);
  color: var(--acc);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.dlg-call-btn:active { background: rgba(88,166,255,.2); transform: scale(.93); }

/* ═══════════════════════════════════════════════
   INCOMING CALL OVERLAY
   ═══════════════════════════════════════════════ */
#incoming-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom, 24px);
}

.incoming-call-bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(28px) saturate(1.5);
}

.incoming-call-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(16,22,34,.97);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 28px 28px 20px 20px;
  padding: 36px 28px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 -4px 60px rgba(0,0,0,.6);
  overflow: hidden;
}

.incoming-pulse-ring {
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  border: 1.5px solid rgba(88,166,255,.25);
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  animation: incomingPulse 2s ease-out infinite;
  pointer-events: none;
}

@keyframes incomingPulse {
  0%   { transform: translateX(-50%) scale(.7); opacity: 1; }
  100% { transform: translateX(-50%) scale(2.4); opacity: 0; }
}

.incoming-name {
  font-size: 22px; font-weight: 800; color: #fff;
  margin-top: 14px; z-index: 1; letter-spacing: -.3px;
}
.incoming-type-label {
  font-size: 13px; color: rgba(255,255,255,.5);
  margin-top: 5px; z-index: 1; font-weight: 500;
  display: flex; align-items: center; gap: 5px;
}
.incoming-actions {
  display: flex; gap: 24px; margin-top: 36px; z-index: 1;
}
.incoming-action-wrap { text-align: center; }

.incoming-btn {
  width: 72px; height: 72px;
  border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.incoming-btn:active { transform: scale(.88); }
.incoming-reject      { background: #f85149; box-shadow: 0 6px 24px rgba(248,81,73,.5); }
.incoming-accept      { background: #3fb950; box-shadow: 0 6px 24px rgba(63,185,80,.5); }
.incoming-accept-audio{ background: #58a6ff; box-shadow: 0 6px 24px rgba(88,166,255,.4); }
.incoming-btn-label   { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 9px; font-weight: 500; }

@keyframes callSlideIn {
  from { opacity: 0; transform: translateY(100px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════
   FULL CALL SCREEN
   ═══════════════════════════════════════════════ */
.call-screen-overlay {
  position: fixed; inset: 0;
  z-index: 1900;
  background: #060d1a;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* Dark gradient background for audio calls */
.call-audio-bg {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #0d1b35 0%, #060d1a 55%, #0a1525 100%);
  z-index: 0;
}

/* Soft bokeh orbs */
@keyframes callBokeh {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(25px, 18px) scale(1.12); }
}
.call-bokeh-1 {
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(88,166,255,.09) 0%, transparent 70%);
  top: -80px; left: -80px; pointer-events: none;
  animation: callBokeh 9s ease-in-out infinite alternate;
}
.call-bokeh-2 {
  position: absolute; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.07) 0%, transparent 70%);
  bottom: -60px; right: -60px; pointer-events: none;
  animation: callBokeh 12s ease-in-out infinite alternate-reverse;
}

/* Avatar pulse rings */
.call-av-pulse {
  position: absolute; inset: -22px;
  border-radius: 50%;
  border: 1.5px solid rgba(88,166,255,.18);
  animation: callAvPulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes callAvPulse {
  0%   { transform: scale(.88); opacity: 1; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* Top bar buttons */
.call-top-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.13); border: none;
  color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(12px);
  transition: background .15s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.call-top-btn:active { background: rgba(255,255,255,.24); transform: scale(.91); }

/* Main round buttons (mic, speaker, beauty) */
.call-ctrl-main {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: none; color: white;
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  backdrop-filter: blur(10px);
  transition: background .15s, transform .12s;
  -webkit-tap-highlight-color: transparent; flex-shrink: 0;
}
.call-ctrl-main span {
  font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,.6); margin-top: 1px;
}
.call-ctrl-main:active { transform: scale(.91); }
.call-ctrl-main.call-ctrl-active {
  background: rgba(248,81,73,.28);
  border: 1.5px solid rgba(248,81,73,.5);
}

/* End call button */
.call-ctrl-end {
  width: 80px; height: 80px; border-radius: 50%;
  background: #f85149; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 28px rgba(248,81,73,.55);
  transition: transform .12s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.call-ctrl-end:active { transform: scale(.89); box-shadow: 0 3px 14px rgba(248,81,73,.4); }

/* Secondary small buttons (camera, screen, etc.) */
.call-ctrl-sm {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: rgba(255,255,255,.11); border: none; border-radius: 16px;
  color: white; cursor: pointer; padding: 11px 16px;
  backdrop-filter: blur(10px); transition: background .15s;
  font-family: var(--font); -webkit-tap-highlight-color: transparent;
  min-width: 60px;
}
.call-ctrl-sm span { font-size: 10px; font-weight: 600; color: rgba(255,255,255,.6); }
.call-ctrl-sm:active { background: rgba(255,255,255,.2); }
.call-ctrl-sm.call-ctrl-active {
  background: rgba(248,81,73,.22);
  border: 1px solid rgba(248,81,73,.4);
}

/* Video effect pills */
.call-effect-btn {
  padding: 6px 14px; white-space: nowrap;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px; color: rgba(255,255,255,.85);
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: var(--font); -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.call-effect-btn:active { background: rgba(255,255,255,.24); }

/* ── Mini Call Bar ─────────────────────────────── */
#call-mini-bar {
  position: fixed; top: env(safe-area-inset-top, 0);
  left: 0; right: 0;
  background: linear-gradient(90deg, #0d2141, #152e58);
  border-bottom: 1px solid rgba(88,166,255,.2);
  z-index: 1800; display: none; align-items: center; min-height: 52px;
}
.call-mini-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: #3fb950; animation: miniPulse 1.5s infinite;
}
@keyframes miniPulse {
  0%   { box-shadow: 0 0 0 0 rgba(63,185,80,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(63,185,80,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,185,80,0); }
}

/* ── Call buttons in user profile ─────────────── */
.up-call-row { display: flex; gap: 10px; padding: 0 16px; margin-bottom: 12px; }
.up-call-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px;
  background: rgba(88,166,255,.1); border: 1.5px solid rgba(88,166,255,.25);
  border-radius: 16px; color: var(--acc); font-family: var(--font);
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .15s, transform .12s; -webkit-tap-highlight-color: transparent;
}
.up-call-btn:active { background: rgba(88,166,255,.2); transform: scale(.97); }
.up-call-btn.video {
  background: rgba(139,92,246,.1); border-color: rgba(139,92,246,.25); color: #a78bfa;
}
.up-call-btn.video:active { background: rgba(139,92,246,.2); }
