/* ============================================================
   ASSETS/CSS/VIDEOCHIAMATA.CSS - Stili Modali e Notifica Chiamate
   ============================================================ */

/* 1. Finestra Modale Notifica Chiamata in Arrivo */
.call-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  animation: fadeInModal 0.25s ease-out;
}

/* Riquadro centrale della chiamata */
.call-box {
  background: #ffffff;
  border: 2px solid #0055ea;
  border-radius: 12px;
  width: 90%;
  max-width: 320px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  font-family: Tahoma, "Segoe UI", Verdana, sans-serif;
}

/* Animazione pulsante dell'avatar chiamante */
.call-avatar-pulse {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.call-avatar-pulse::after {
  content: "";
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 3px solid #28a745;
  border-radius: 50%;
  animation: ringPulse 1.4s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.call-avatar-pulse img {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  background: #f0f0f0;
}

/* Informazioni utente chiamante */
.call-box h3 {
  font-size: 16px;
  font-weight: bold;
  color: #003399;
  margin: 0 0 6px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-box p {
  font-size: 12px;
  color: #666666;
  margin: 0 0 22px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Pulsanti Azione (Accetta / Rifiuta) */
.call-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.btn-call {
  border: none;
  border-radius: 24px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 110px;
  transition: transform 0.15s ease, filter 0.15s ease;
  outline: none;
}

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

.btn-call.accept {
  background: #28a745;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(40, 167, 69, 0.35);
}

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

.btn-call.reject {
  background: #dc3545;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(220, 53, 69, 0.35);
}

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

/* 2. Overlay a Schermo Intero per Stanza Video Jitsi */
.jitsi-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
}

#jitsi-container {
  width: 100%;
  height: 100%;
  flex: 1;
}

#jitsi-container iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

/* 3. Animazioni */
@keyframes ringPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.35;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 4. Ottimizzazioni per Schermi Touch / Mobile */
@media (max-width: 480px) {
  .call-box {
    width: 85%;
    padding: 20px 16px;
  }
  .btn-call {
    min-width: 100px;
    padding: 10px 14px;
    font-size: 12px;
  }
}