.webcall-hidden {
  display: none !important;
}

#webcall-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
}

.webcall-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(2px);
}

.webcall-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #0b0b0f;
  color: #fff;
  border-radius: 18px;
  padding: 26px 22px 22px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.webcall-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.webcall-status {
  min-height: 24px;
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 600;
}

.phone-wrapper {
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0 auto 18px;
}

.phone-core {
  position: absolute;
  inset: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #2b2f3a, #171922);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.phone-icon {
  width: 34px;
  height: 34px;
  fill: #ff4d6d;
  transform-origin: 50% 50%;
}

.webcall-state-ringing .phone-icon {
  animation: phoneShake 1s ease-in-out infinite;
}

@keyframes phoneShake {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-12deg); }
  45% { transform: rotate(10deg); }
  60% { transform: rotate(-8deg); }
  75% { transform: rotate(5deg); }
  100% { transform: rotate(0deg); }
}

.ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid rgba(255, 77, 109, 0.65);
  opacity: 0;
  transform: scale(0.55);
}

.webcall-state-ringing .ring {
  display: block;
}

.ring1 {
  animation: ringPulse 1.8s linear infinite;
}
.ring2 {
  animation: ringPulse 1.8s linear infinite 0.45s;
}
.ring3 {
  animation: ringPulse 1.8s linear infinite 0.9s;
}

@keyframes ringPulse {
  0% {
    transform: scale(0.55);
    opacity: 0.82;
  }
  70% {
    transform: scale(1.38);
    opacity: 0;
  }
  100% {
    transform: scale(1.38);
    opacity: 0;
  }
}

#webcall-actions {
  margin-top: 18px;
}

.webcall-end-btn {
  min-width: 150px;
  border: 0;
  background: #ff2f4f;
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.webcall-end-btn:hover {
  background: #e12744;
}

.webcall-note {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.72);
}

/* ICON STATES */

#webcall-phone.ringing {
  animation: pulse 1.2s infinite;
}

#webcall-phone.connected {
  background: #22c55e;
  animation: none;
}

/* ANIMATION */
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* 🔥 TIMER GRANDE */
.webcall-timer {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
  text-align: center;
}

/* 🔥 RING SOLO CUANDO LLAMA */
#webcall-phone.is-ringing .ring {
  opacity: 1;
  animation: pulse 1.2s infinite;
}

/* 🔥 CONECTADO (VERDE, SIN ANIMACIÓN) */
#webcall-phone.is-connected .ring {
  display: none;
}

#webcall-phone.is-connected .phone-core {
  background: #22c55e;
}

/* 🔥 ANIMACIÓN */
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* CUANDO CONECTA */
#webcall-phone.is-connected .phone-icon {
  fill: #fff; /* blanco */
}

/* O negro si quieres */
#webcall-phone.is-connected.dark .phone-icon {
  fill: #000;
}