/* ============================================================
   RoomChat — özel görüntülü konuşma stilleri (ek modül)
   ============================================================ */

/* ---- görüşme alanı ---- */
.pm-call {
  flex: 1 1 auto;
  min-height: 0;
  display: flex; flex-direction: column;
  padding: 12px 14px 0;
}
.pm-call.hidden { display: none !important; }

/* --- gelen istek / giden istek --- */
.pm-invite, .pm-outgoing {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  padding: 22px 18px 18px;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, rgba(79,140,255,.14), rgba(123,92,255,.08) 60%, #121721);
  border: 1px solid rgba(79,140,255,.42);
  overflow: hidden;
}
.pm-invite.hidden, .pm-outgoing.hidden { display: none !important; }

.pm-invite-ring, .pm-out-ring { position: absolute; inset: 0; pointer-events: none; }
.pm-invite-ring i, .pm-out-ring i {
  position: absolute; top: 46px; left: 50%;
  width: 52px; height: 52px; margin: 0 0 0 -26px;
  border-radius: 50%;
  border: 2px solid rgba(79,140,255,.55);
  animation: pmInvRing 2.2s ease-out infinite;
}
.pm-invite-ring i:nth-child(2), .pm-out-ring i:nth-child(2) { animation-delay: .73s; }
.pm-invite-ring i:nth-child(3), .pm-out-ring i:nth-child(3) { animation-delay: 1.46s; }
@keyframes pmInvRing {
  0%   { transform: scale(.6); opacity: .85; }
  100% { transform: scale(3.2); opacity: 0; }
}

.pm-invite-avatar {
  position: relative;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 19px; font-weight: 800; color: #fff;
  border: 2px solid rgba(255,255,255,.3);
  box-shadow: 0 0 0 6px rgba(79,140,255,.16);
  animation: pmBob 1.9s ease-in-out infinite;
}
@keyframes pmBob {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50%     { transform: translateY(-5px) rotate(2deg); }
}
.pm-invite-title {
  position: relative;
  font-size: 14.5px; font-weight: 800; letter-spacing: -.2px;
  text-align: center;
  color: #c3d8ff;
}
.pm-invite-sub {
  position: relative;
  font-size: 11.5px; color: var(--txt-mute);
  text-align: center;
}
.pm-invite-actions {
  position: relative;
  display: flex; gap: 9px;
  width: 100%;
  margin-top: 6px;
}
.pm-invite-btn {
  flex: 1 1 auto;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px; font-weight: 700;
  border: 1px solid transparent;
  transition: filter .15s;
}
.pm-invite-btn.ok {
  background: linear-gradient(135deg, var(--ok), #1fae63);
  color: #06210f;
  box-shadow: 0 6px 18px rgba(47,208,122,.34);
}
.pm-invite-btn.no {
  background: rgba(255,255,255,.07);
  border-color: var(--line);
  color: var(--txt-dim);
  flex: 0 0 auto;
}
.pm-invite-btn:hover { filter: brightness(1.14); }

/* --- görüşme ekranı --- */
.pm-stage { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.pm-stage.hidden { display: none !important; }

.pm-remote {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 250px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #05070c;
  border: 1px solid rgba(47,208,122,.34);
  box-shadow: 0 0 0 2px rgba(47,208,122,.14) inset;
}
.pm-remote video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: none;
}
.pm-remote video.on { display: block; }

.pm-remote-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  font-size: 12px; color: var(--txt-mute);
  background: radial-gradient(400px 200px at 50% 0%, rgba(79,140,255,.08), transparent 70%), #080b12;
}
.pm-remote-ph p { margin: 0; }
.pm-remote-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 800; color: #fff;
}

.pm-remote-tag {
  position: absolute; top: 9px; left: 9px;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(5px);
  font-size: 11.5px; font-weight: 700;
  color: var(--txt);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--live);
  animation: pulse 1.5s infinite;
}

/* kendi küçük görüntün */
.pm-self {
  position: absolute;
  right: 9px; bottom: 9px;
  width: 108px; height: 74px;
  border-radius: 9px;
  overflow: hidden;
  background: #05070c;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: var(--shadow);
  z-index: 3;
}
.pm-self video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: none;
}
.pm-self video.on { display: block; }
.pm-self-ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800; color: #fff;
  background: #0a0e16;
}
.pm-self-label {
  position: absolute; left: 5px; bottom: 3px;
  font-size: 9.5px; font-weight: 700;
  color: rgba(255,255,255,.75);
}

.pm-call-timer {
  position: absolute; top: 9px; right: 9px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(5px);
  font-size: 11.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--txt);
}

.pm-call-bar {
  display: flex; justify-content: center; gap: 10px;
  padding-bottom: 4px;
}
.pm-call-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 17px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  transition: background .15s, border-color .15s, transform .1s;
}
.pm-call-btn:hover { background: var(--bg-4); border-color: #303a4c; }
.pm-call-btn:active { transform: scale(.94); }
.pm-call-btn.off {
  background: rgba(255,59,92,.14);
  border-color: rgba(255,59,92,.42);
  opacity: .75;
}
.pm-call-btn.danger {
  background: linear-gradient(135deg, var(--live), #d0203c);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(255,59,92,.36);
}

/* görüşme açıkken yazışma alanı daralır */
.pm-call:not(.hidden) + .pm-audio { margin-top: 10px; }

@media (max-width: 760px) {
  .pm-remote { max-height: 190px; }
  .pm-self { width: 88px; height: 60px; }
  .pm-call-btn { width: 40px; height: 40px; font-size: 15px; }
}
