/* call.css — оформление звонков Nova Форум (тёмная стеклянная тема сайта) */

#ncRoot {
  --nc-accent: #8b5cf6;
  --nc-accent-2: #a78bfa;
  --nc-green: #34d399;
  --nc-red: #f87171;
  position: relative;
  z-index: 9999;
}

#ncRoot .nc-hide { display: none !important; }

/* ---------------- карточка входящего ---------------- */

#ncRoot .nc-incoming {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(380px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(18, 16, 30, 0.92);
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(139, 92, 246, 0.12) inset;
  backdrop-filter: blur(18px);
  color: #ececf3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  animation: ncPop 0.25s ease both;
}

@keyframes ncPop {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#ncRoot .nc-inc-ava {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--nc-accent), #6d28d9);
  animation: ncPulse 1.8s ease-in-out infinite;
}

#ncRoot .nc-inc-ava img { width: 100%; height: 100%; object-fit: cover; }

@keyframes ncPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.55); }
  60%      { box-shadow: 0 0 0 14px rgba(139, 92, 246, 0); }
}

#ncRoot .nc-inc-body { flex: 1; min-width: 0; }

#ncRoot .nc-inc-kind {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--nc-accent-2);
}

#ncRoot .nc-inc-name {
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#ncRoot .nc-inc-actions { display: flex; gap: 10px; }

#ncRoot .nc-round {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#ncRoot .nc-round:hover { transform: translateY(-2px); filter: brightness(1.08); }
#ncRoot .nc-green { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 8px 22px rgba(52, 211, 153, 0.35); }
#ncRoot .nc-red   { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 8px 22px rgba(248, 113, 113, 0.32); }

/* ---------------- панель звонка ---------------- */

#ncRoot .nc-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10001;
  width: 340px;
  height: 470px;
  border-radius: 22px;
  overflow: hidden;
  background: #0f0d18;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
  color: #ececf3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  animation: ncPop 0.28s ease both;
}

#ncRoot .nc-stage { position: absolute; inset: 0; }

#ncRoot .nc-remote {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0c0a13;
}

#ncRoot .nc-ava-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(420px 300px at 50% 0%, rgba(139, 92, 246, 0.35), transparent 65%),
    radial-gradient(300px 260px at 50% 100%, rgba(109, 40, 217, 0.32), transparent 70%),
    #0c0a13;
}

#ncRoot .nc-big-ava {
  width: 118px;
  height: 118px;
  border-radius: 32px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 46px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--nc-accent), #6d28d9);
  box-shadow: 0 18px 50px rgba(139, 92, 246, 0.45);
  animation: ncGlow 3s ease-in-out infinite;
}

#ncRoot .nc-big-ava img { width: 100%; height: 100%; object-fit: cover; }

@keyframes ncGlow {
  0%, 100% { box-shadow: 0 18px 50px rgba(139, 92, 246, 0.35); }
  50%      { box-shadow: 0 18px 60px rgba(139, 92, 246, 0.65); }
}

#ncRoot .nc-info {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px 18px 34px;
  background: linear-gradient(to bottom, rgba(8, 6, 14, 0.88), rgba(8, 6, 14, 0));
  pointer-events: none;
}

#ncRoot .nc-name {
  font-size: 1.02rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

#ncRoot .nc-status {
  font-size: 0.8rem;
  color: #c9c6dd;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

#ncRoot .nc-local {
  position: absolute;
  right: 14px;
  bottom: 96px;
  width: 96px;
  height: 132px;
  border-radius: 14px;
  object-fit: cover;
  background: #14111f;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  transform: scaleX(-1);
}

#ncRoot .nc-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px;
  display: flex;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(to top, rgba(8, 6, 14, 0.92), rgba(8, 6, 14, 0));
}

#ncRoot .nc-ctl {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

#ncRoot .nc-ctl:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.18); }
#ncRoot .nc-ctl.nc-off { background: rgba(255, 255, 255, 0.24); opacity: 0.65; }
#ncRoot .nc-ctl.nc-off::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 2px;
  background: #f87171;
  transform: rotate(-45deg);
  border-radius: 2px;
}
#ncRoot .nc-ctl { position: relative; }

#ncRoot .nc-hang {
  background: linear-gradient(135deg, #f87171, #dc2626);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(248, 113, 113, 0.4);
}
#ncRoot .nc-hang:hover { background: linear-gradient(135deg, #fca5a5, #ef4444); }

/* ---------------- кнопки в шапке чата ---------------- */

.cwh-call {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.cwh-call-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  color: #ececf3;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.35);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cwh-call-btn:hover {
  transform: translateY(-1px);
  background: rgba(139, 92, 246, 0.28);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.28);
}

/* ---------------- мобильные ---------------- */

@media (max-width: 640px) {
  #ncRoot .nc-panel {
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    border-radius: 0;
    border: none;
  }
  #ncRoot .nc-incoming {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    padding: 14px;
  }
  #ncRoot .nc-local { width: 82px; height: 112px; bottom: 104px; right: 12px; }
  #ncRoot .nc-controls { padding: 16px 16px 26px; }
  #ncRoot .nc-ctl { width: 56px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  #ncRoot .nc-incoming,
  #ncRoot .nc-panel,
  #ncRoot .nc-inc-ava,
  #ncRoot .nc-big-ava { animation: none; }
}
