/* PM 1:1 arama — panel içi */
.pm-call-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 6px;
}

.pm-call-header-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg-light);
  color: var(--accent);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.pm-call-header-btn:hover:not(:disabled) {
  background: var(--accent-light);
}

.pm-call-header-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pm-panel-body {
  position: relative;
}

.pm-call-host {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  background: var(--bg-chat);
  background-image: inherit;
}

.pm-call-host.hidden {
  display: none !important;
}

/* Panel / video — global .hidden yok; pm-call-host altında gizle */
.pm-call-host .hidden {
  display: none !important;
}

.pm-panel.pm-in-call .pm-messages-container {
  visibility: hidden;
  pointer-events: none;
}

.pm-panel.pm-in-call .pm-panel-footer {
  display: none;
}

.pm-call-in-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 12px;
}

.pm-call-stage {
  position: relative;
  flex: 1;
  min-height: 160px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(160deg, #1a237e 0%, #0d1b2a 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pm-call-remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}

.pm-call-local-video {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 88px;
  height: 118px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: #222;
  z-index: 2;
}

.pm-call-avatar-only {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 180px;
  gap: 12px;
  color: #fff;
}

.pm-call-big-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.pm-call-status {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  text-align: center;
  padding: 0 12px;
}

.pm-call-peer-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-align: center;
}

.pm-call-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.pm-call-ctrl {
  min-width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  font-size: 20px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transition: background 0.15s, transform 0.1s;
}

.pm-call-ctrl:hover {
  transform: scale(1.05);
}

.pm-call-ctrl.active {
  background: var(--accent);
}

.pm-call-ctrl.danger {
  background: var(--danger);
}

/* Gelen arama — panel içi */
.pm-call-incoming-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  text-align: center;
  gap: 8px;
}

.pm-call-incoming-panel h3 {
  margin: 8px 0 4px;
  font-size: 17px;
  color: var(--text-dark);
}

.pm-call-incoming-panel .pm-call-status {
  color: var(--text-mid);
}

.pm-call-incoming-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
  max-width: 280px;
  margin-top: 16px;
}

.pm-call-incoming-actions button {
  flex: 1;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.pm-call-incoming-actions .accept {
  background: var(--success);
  color: #fff;
}

.pm-call-incoming-actions .reject {
  background: var(--danger);
  color: #fff;
}

body.pm-call-active .pm-panel-backdrop.open {
  background: rgba(0, 0, 0, 0.5);
}

body.pm-call-active .chat-area {
  pointer-events: none;
}

body.pm-call-active .pm-panel {
  pointer-events: auto;
}
