/* ========================================
   WebRTC Calls Styles
   ======================================== */

/* Call Modal */
.call-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.call-modal.active {
  opacity: 1;
  visibility: visible;
}

.call-modal-content {
  text-align: center;
  color: white;
  padding: 40px;
  max-width: 400px;
  width: 100%;
}

.call-status {
  font-size: 16px;
  opacity: 0.8;
  margin-bottom: 8px;
}

.call-user-name {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 16px;
}

.call-timer {
  font-size: 20px;
  font-family: monospace;
  opacity: 0.9;
  margin-bottom: 24px;
}

/* Video Container */
.call-video-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 24px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

#remoteVideo {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

#localVideo {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Call Controls */
.call-controls {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}

.call-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.call-btn:hover {
  transform: scale(1.1);
}

.call-btn:active {
  transform: scale(0.95);
}

.call-btn.active {
  background: rgba(255, 255, 255, 0.4);
}

.call-btn-end {
  background: #ef4444;
  transform: rotate(135deg);
}

.call-btn-end:hover {
  background: #dc2626;
}

/* Incoming Call Controls */
.call-incoming-controls {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
}

.call-btn-accept {
  background: #22c55e;
  width: auto;
  padding: 16px 32px;
  border-radius: 32px;
  font-size: 16px;
}

.call-btn-accept:hover {
  background: #16a34a;
}

.call-btn-reject {
  background: #ef4444;
  width: auto;
  padding: 16px 32px;
  border-radius: 32px;
  font-size: 16px;
}

.call-btn-reject:hover {
  background: #dc2626;
}

/* Call Button in Chat Header */
.call-header-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s ease;
  color: var(--md-sys-color-on-surface);
}

.call-header-btn:hover {
  background: var(--md-sys-color-surface-container-high);
}

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

/* Mobile Responsive */
@media (max-width: 600px) {
  .call-modal-content {
    padding: 24px;
  }

  .call-user-name {
    font-size: 24px;
  }

  #localVideo {
    width: 80px;
    height: 60px;
    bottom: 8px;
    right: 8px;
  }

  .call-btn {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .call-controls {
    gap: 16px;
  }
}
