
/* WebRTC Video+Voice Call System Styles */
/* Modern, clean UI for call interfaces */

/* Call Popup Base Styles */
.call-buttons{
  max-width: calc(48px * 3);
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  gap: 0.5rem;
  margin-inline: 1rem;
  border-radius: 10px;
}
.call-buttons button{
  width: 48px;
  padding: 0.2rem ;
  border-radius: 10px;

  height: 100%;
 border: none;
 background-color: transparent;
  backdrop-filter: blur(25px);
  transition: 0.3 all background;
}
.call-buttons button:hover{
transform: scale(1);
background-color: var(--message-recieved-bg-deeper);
}

.webrtc-call-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(10px);
  animation: fadeInBackdrop 0.3s ease-out;
}

.webrtc-call-container {
  background: white;
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: slideInScale 0.3s ease-out;
  position: relative;
}

/* Incoming Call Styles */
.webrtc-incoming-call {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.webrtc-incoming-call .webrtc-call-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  animation: pulseGlow 2s infinite;
}

.webrtc-caller-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 20px;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.webrtc-caller-name {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 24px;
  font-weight: 600;
}

.webrtc-call-type {
  margin: 0 0 30px 0;
  color: #666;
  font-size: 16px;
  opacity: 0.8;
}

.webrtc-call-buttons {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  margin-top: 20px;
}

.webrtc-call-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.webrtc-call-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
}

.webrtc-call-btn:hover::before {
  width: 100%;
  height: 100%;
}

.webrtc-call-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.webrtc-btn-accept {
  background: linear-gradient(135deg, #4CAF50, #45a049);
}

.webrtc-btn-decline {
  background: linear-gradient(135deg, #f44336, #d32f2f);
}

.webrtc-btn-end {
  background: linear-gradient(135deg, #f44336, #d32f2f);
}

.webrtc-btn-mute {
  background: linear-gradient(135deg, #4CAF50, #45a049);
}

.webrtc-btn-mute.muted {
  background: linear-gradient(135deg, #f44336, #d32f2f);
}

.webrtc-btn-video {
  background: linear-gradient(135deg, #2196F3, #1976D2);
}

.webrtc-btn-video.disabled {
  background: linear-gradient(135deg, #757575, #616161);
}

.webrtc-btn-switch-camera {
  background: linear-gradient(135deg, #FF9800, #F57C00);
}

.webrtc-btn-switch-camera:disabled {
  background: linear-gradient(135deg, #BDBDBD, #9E9E9E);
  cursor: not-allowed;
}

/* Active Call Interface */
.webrtc-call-interface {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  color: white;
  overflow: hidden;
}

.webrtc-call-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
}

.webrtc-user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.webrtc-user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.webrtc-user-details h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.webrtc-call-status {
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
}

.webrtc-call-timer {
  font-size: 18px;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
}

.webrtc-video-container {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  z-index: 0;
  /* Prefer a cinematic aspect on wide screens; mobile will still fill */
  aspect-ratio: 16 / 9;
  width: 100%;
  height: 100%;
}

.webrtc-remote-video {
  position: absolute;
  inset: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  background: #333;
  aspect-ratio: auto;
  align-self: center;
  justify-self: center;
}
.webrtc-remote-video.webrtc-fit-contain {
  object-fit: contain;
  background: #000;
}

.webrtc-remote-video.webrtc-fit-cover {
  object-fit: cover;
}

/* When sharing a screen, prefer showing entire content without crop */
.webrtc-call-interface.webrtc-sharing .webrtc-remote-video {
  object-fit: contain;
  background: #000;
}
.webrtc-call-user{
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}
.webrtc-call-avatar{
  width: 40px;
  height: 40px;
}
.webrtc-local-video {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 150px;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 1;
}

.webrtc-local-video:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.6);
}

.webrtc-audio-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.webrtc-audio-icon {
  font-size: 120px;
  margin-bottom: 30px;
  opacity: 0.6;
  animation: pulseIcon 2s infinite;
}

.webrtc-audio-text {
  font-size: 28px;
  margin: 0;
  font-weight: 300;
  opacity: 0.8;
}

.webrtc-call-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 30px;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
}

.webrtc-control-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.webrtc-control-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
}

.webrtc-control-btn:hover::before {
  width: 120%;
  height: 120%;
}

.webrtc-control-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Call History Popup */
.webrtc-history-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeInBackdrop 0.3s ease-out;
}

.webrtc-history-container {
  background: white;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: slideInScale 0.3s ease-out;
}

.webrtc-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.webrtc-history-title {
  margin: 0;
  color: white;
  font-size: 20px;
  font-weight: 600;
}

.webrtc-history-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.webrtc-history-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.webrtc-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.webrtc-history-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin-bottom: 5px;
}

.webrtc-history-item:hover {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.webrtc-history-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
  border: 2px solid #e9ecef;
}

.webrtc-history-info {
  flex: 1;
}

.webrtc-history-name {
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
  font-size: 16px;
}

.webrtc-history-details {
  font-size: 14px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
}

.webrtc-history-details i {
  width: 14px;
  text-align: center;
}

.webrtc-history-timestamp {
  font-size: 12px;
  color: #999;
  text-align: right;
}

.webrtc-no-history {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 40px;
  background: #f8f9fa;
  margin: 20px;
  border-radius: 10px;
}

/* Error Popup */
.webrtc-error-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  text-align: center;
  max-width: 400px;
  width: 90%;
  animation: slideInScale 0.3s ease-out;
}

.webrtc-error-icon {
  color: #f44336;
  font-size: 48px;
  margin-bottom: 15px;
}

.webrtc-error-title {
  color: #333;
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 600;
}

.webrtc-error-message {
  margin: 0 0 15px 0;
  color: #666;
  font-size: 16px;
  font-weight: 500;
}

.webrtc-error-suggestions {
  margin: 0 0 25px 0;
  color: #888;
  font-size: 14px;
  line-height: 1.4;
}

.webrtc-error-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.webrtc-error-btn {
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 80px;
}

.webrtc-error-btn.primary {
  background: linear-gradient(135deg, #2196F3, #1976D2);
  color: white;
}

.webrtc-error-btn.primary:hover {
  background: linear-gradient(135deg, #1976D2, #1565C0);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.webrtc-error-btn.secondary {
  background: linear-gradient(135deg, #f44336, #d32f2f);
  color: white;
}

.webrtc-error-btn.secondary:hover {
  background: linear-gradient(135deg, #d32f2f, #c62828);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

/* Animations */
@keyframes fadeInBackdrop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes cameraSwitch {
  0% { transform: scale(1) rotateY(0deg); }
  50% { transform: scale(0.8) rotateY(180deg); }
  100% { transform: scale(1) rotateY(360deg); }
}

#local-video.switching {
  filter: brightness(0.6);
  transition: filter 0.4s ease;
}
@keyframes slideInScale {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
  }
}

@keyframes pulseIcon {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* Connection Status Indicators */
.webrtc-connection-indicator {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  gap: 6px;
}

.webrtc-connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulseIcon 1.5s infinite;
}

.webrtc-connection-dot.connected {
  background: #4CAF50;
}

.webrtc-connection-dot.connecting {
  background: #FF9800;
}

.webrtc-connection-dot.disconnected {
  background: #f44336;
}

/* Responsive Design */
@media (max-width: 768px) {
  .webrtc-call-container {
    padding: 20px;
    margin: 20px;
  }

  .webrtc-caller-avatar {
    width: 60px;
    height: 60px;
  }

  .webrtc-caller-name {
    font-size: 20px;
  }

  .webrtc-call-type {
    font-size: 14px;
  }

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

  .webrtc-call-header {
    padding: 15px;
  }

  .webrtc-user-avatar {
    width: 40px;
    height: 40px;
  }

  .webrtc-user-details h3 {
    font-size: 16px;
  }

  .webrtc-call-timer {
    font-size: 16px;
    padding: 6px 12px;
  }

  .webrtc-local-video {
    width: 100px;
    height: 130px;
    top: 15px;
    right: 15px;
  }

  .webrtc-audio-icon {
    font-size: 80px;
  }

  .webrtc-audio-text {
    font-size: 20px;
  }

  .webrtc-call-controls {
    padding: 20px;
    gap: 20px;
  }

  .webrtc-control-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .webrtc-btn-switch-camera {
    order: 2; /* Position between video and end call buttons */
  }

  .webrtc-history-container {
    margin: 20px;
    max-height: calc(100vh - 40px);
  }

  .webrtc-history-header {
    padding: 15px;
  }

  .webrtc-history-title {
    font-size: 18px;
  }

  .webrtc-history-close {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .webrtc-history-item {
    padding: 12px;
  }

  .webrtc-history-avatar {
    width: 35px;
    height: 35px;
  }

  .webrtc-history-name {
    font-size: 14px;
  }

  .webrtc-history-details {
    font-size: 12px;
  }

  .webrtc-error-popup {
    padding: 20px;
    margin: 20px;
  }

  .webrtc-error-icon {
    font-size: 40px;
  }

  .webrtc-error-title {
    font-size: 18px;
  }

  .webrtc-error-message {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .webrtc-call-buttons {
    gap: 15px;
  }

  .webrtc-call-btn {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .webrtc-local-video {
    width: 80px;
    height: 100px;
  }

  .webrtc-call-controls {
    gap: 15px;
    padding: 15px;
  }

  .webrtc-control-btn {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .webrtc-call-controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .webrtc-btn-switch-camera {
    order: 2;
  }

  .webrtc-history-item {
    padding: 10px;
  }

  .webrtc-history-avatar {
    width: 30px;
    height: 30px;
    margin-right: 10px;
  }
}

/* Utility Classes */
.webrtc-hidden {
  display: none !important;
}

.webrtc-fade-in {
  animation: fadeInBackdrop 0.3s ease-out;
}

.webrtc-slide-in {
  animation: slideInScale 0.3s ease-out;
}

.webrtc-pulse {
  animation: pulseGlow 2s infinite;
}

/* Auto-hide UI: header/controls hidden state */
.webrtc-ui-hidden .webrtc-call-header,
.webrtc-ui-hidden .webrtc-call-controls {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
}

.webrtc-ui-visible .webrtc-call-header,
.webrtc-ui-visible .webrtc-call-controls {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Tap-to-show hint overlay */
.webrtc-tap-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.0) 40%, rgba(0,0,0,0.15) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.webrtc-ui-visible .webrtc-tap-overlay {
  opacity: 1;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .webrtc-call-container {
    background: #2d2d2d;
    color: white;
  }

  .webrtc-caller-name {
    color: white;
  }

  .webrtc-call-type {
    color: #ccc;
  }

  .webrtc-history-container {
    background: #2d2d2d;
    color: white;
  }

  .webrtc-history-item {
    border-bottom-color: #444;
  }

  .webrtc-history-item:hover {
    background: linear-gradient(135deg, #3a3a3a, #444);
  }

  .webrtc-history-name {
    color: white;
  }

  .webrtc-error-popup {
    background: #2d2d2d;
    color: white;
  }

  .webrtc-error-title {
    color: white;
  }
}

/* Ringtone Settings Styles */
.webrtc-settings-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.webrtc-settings-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: webrtc-slideIn 0.3s ease-out;
}

.webrtc-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #eee;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px 20px 0 0;
}

.webrtc-settings-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.webrtc-settings-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.webrtc-settings-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.webrtc-ringtone-settings {
  padding: 25px;
}

.webrtc-settings-title {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.webrtc-settings-description {
  margin: 0 0 20px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.webrtc-ringtone-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 25px;
}

.webrtc-ringtone-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 2px solid #eee;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fafafa;
}

.webrtc-ringtone-item:hover {
  border-color: #667eea;
  background: #f8f9ff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.webrtc-ringtone-item.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.webrtc-ringtone-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.webrtc-ringtone-name {
  font-weight: 600;
  font-size: 16px;
}

.webrtc-ringtone-id {
  font-size: 12px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.webrtc-ringtone-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.webrtc-preview-btn,
.webrtc-select-btn {
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  color: #667eea;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 12px;
}

.webrtc-preview-btn:hover {
  background: #667eea;
  color: white;
  transform: scale(1.1);
}

.webrtc-select-btn {
  background: #4CAF50;
  border-color: #4CAF50;
  color: white;
}

.webrtc-ringtone-item.selected .webrtc-preview-btn {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.webrtc-ringtone-item.selected .webrtc-preview-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.webrtc-notification-section {
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.webrtc-notification-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.webrtc-notification-description {
  margin: 0 0 15px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.webrtc-notification-toggle {
  background: #f0f0f0;
  border: 2px solid #ddd;
  color: #666;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.webrtc-notification-toggle:hover {
  background: #e0e0e0;
  border-color: #ccc;
}

.webrtc-notification-toggle.enabled {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  border-color: #4CAF50;
  color: white;
}

.webrtc-notification-toggle.enabled:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40);
}

.webrtc-notification-toggle.blocked {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  border-color: #ff6b6b;
  color: white;
}

.webrtc-notification-toggle.blocked:hover {
  background: linear-gradient(135deg, #ee5a24, #d63031);
}

/* Dark theme support for ringtone settings */
@media (prefers-color-scheme: dark) {
  .webrtc-settings-container {
    background: #2d2d2d;
    color: white;
  }

  .webrtc-settings-title {
    color: white;
  }

  .webrtc-settings-description {
    color: #ccc;
  }

  .webrtc-ringtone-item {
    background: #3a3a3a;
    border-color: #555;
    color: white;
  }

  .webrtc-ringtone-item:hover {
    background: #4a4a4a;
    border-color: #667eea;
  }

  .webrtc-ringtone-item.selected {
    background: linear-gradient(135deg, #667eea, #764ba2);
  }

  .webrtc-notification-section {
    border-top-color: #555;
  }

  .webrtc-notification-title {
    color: white;
  }

  .webrtc-notification-description {
    color: #ccc;
  }

  .webrtc-notification-toggle {
    background: #4a4a4a;
    border-color: #666;
    color: #ccc;
  }

  .webrtc-notification-toggle:hover {
    background: #5a5a5a;
    border-color: #777;
  }

  .webrtc-notification-toggle.blocked {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-color: #ff6b6b;
    color: white;
  }

  .webrtc-notification-toggle.blocked:hover {
    background: linear-gradient(135deg, #ee5a24, #d63031);
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .webrtc-settings-container {
    width: 95%;
    max-height: 90vh;
    margin: 10px;
  }

  .webrtc-settings-header {
    padding: 15px 20px;
  }

  .webrtc-ringtone-settings {
    padding: 20px;
  }

  .webrtc-ringtone-item {
    padding: 12px;
  }

  .webrtc-ringtone-name {
    font-size: 15px;
  }

  .webrtc-ringtone-controls {
    gap: 6px;
  }

  .webrtc-preview-btn,
  .webrtc-select-btn {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }
}

/* Call Ended Popup Styles */
.webrtc-call-ended {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.webrtc-call-container {
  text-align: center;
  padding: 40px 30px;
}

.webrtc-call-ended-icon {
  font-size: 64px;
  color: #ff6b6b;
  margin-bottom: 20px;
  animation: callEndedPulse 1s infinite;
}

.webrtc-call-ended-title {
  font-size: 28px;
  font-weight: 600;
  color: white;
  margin: 0 0 15px 0;
}

.webrtc-call-ended-message {
  font-size: 16px;
  color: #ccc;
  margin: 0 0 30px 0;
  line-height: 1.5;
}

.webrtc-close-btn {
  background: #666;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}

.webrtc-close-btn:hover {
  background: #555;
  transform: translateY(-2px);
}

@keyframes callEndedPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Mobile responsiveness for call ended popup */
@media (max-width: 768px) {
  .webrtc-call-ended-icon {
    font-size: 48px;
  }

  .webrtc-call-ended-title {
    font-size: 24px;
  }

  .webrtc-call-ended-message {
    font-size: 14px;
  }
}