/* === Modal Ana Konteyner === */
#webrtc-call-container {
  width: 600px;
  height: 400px;
  position: fixed;
  top: 100px;
  left: 100px;
  background: #000;
  z-index: 9999;
  border: 2px solid #aaa;
  border-radius: 8px;
  overflow: hidden; /* ÖNEMLİ: video taşmalarını engeller */
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease-in-out;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* === Video Alanı (Remote ve Local video burada) === */
#webrtc-call-container .position-relative {
  overflow: hidden; /* ALT KONTEYNERDE DE GÜVENCE ALTINA ALINIR */
}

/* === Uzak Video (karşı taraf) === */
#remoteVideo {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Görüntü oranını korur, taşmayı önler */
  background-color: black;
  z-index: 1;
}

/* === Yerel Video (sen) === */
#localVideo {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 140px;
  height: 100px;
  object-fit: cover;
  border: 2px solid white;
  background: black;
  z-index: 10;
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

/* === Taşınabilirlik === */
.draggable-handle {
  cursor: move;
}

/* === Küçülmüş (collapsed) görünüm === */
.collapsed-call {
  width: 200px !important;
  height: 130px !important;
  bottom: 0 !important;
  right: 0 !important;
  top: auto !important;
  left: auto !important;
  margin: 1rem !important;
  position: fixed !important;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex !important;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(6px);
  transition: all 0.4s ease-in-out;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  animation: slideUpFadeIn 0.4s ease-out;
}

.collapsed-call #localVideo,
.collapsed-call button:not(.toggle-collapse-btn),
.collapsed-call .position-absolute {
  display: none !important;
}

.collapsed-call #remoteVideo {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* === Animasyon === */
@keyframes slideUpFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}