/**
 * Rosmon Consulting Services — Bespoke PWA Incoming Voice Call UI
 * International-standard phone call interface with Rosmon Navy & Cyan branding
 */

.rosmon-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 15%, rgba(78, 180, 254, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 80% 85%, rgba(18, 184, 134, 0.18) 0%, transparent 45%),
    linear-gradient(165deg, #05071F 0%, #0D117A 52%, #070924 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.rosmon-call-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.rosmon-call-card {
  width: 100%;
  max-width: 420px;
  background: rgba(12, 16, 62, 0.76);
  border: 1px solid rgba(124, 152, 255, 0.28);
  border-radius: 28px;
  padding: 30px 24px 28px;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.rosmon-call-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(78, 180, 254, 0.15);
  border: 1px solid rgba(78, 180, 254, 0.38);
  color: #8FD0FF;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.rosmon-call-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12B886;
  box-shadow: 0 0 10px #12B886;
  animation: rosmonCallDotBlink 1s infinite alternate;
}

@keyframes rosmonCallDotBlink {
  0% { opacity: 0.35; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.2); }
}

/* Concentric Radar Rings around Rosmon Crest */
.rosmon-call-avatar-wrap {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 6px auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rosmon-call-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(78, 180, 254, 0.48);
  animation: rosmonRadarPulse 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.rosmon-call-ring.r2 {
  animation-delay: 0.8s;
  border-color: rgba(18, 184, 134, 0.42);
}

.rosmon-call-ring.r3 {
  animation-delay: 1.6s;
}

@keyframes rosmonRadarPulse {
  0% {
    transform: scale(0.88);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

.rosmon-call-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #4EB4FE;
  box-shadow: 0 10px 28px rgba(16, 20, 154, 0.65);
  position: relative;
  z-index: 2;
  background: #10149A;
}

.rosmon-call-overlay.is-ringing .rosmon-call-avatar {
  animation: rosmonPhoneShake 1.4s ease-in-out infinite;
}

@keyframes rosmonPhoneShake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  15% { transform: rotate(-7deg) scale(1.04); }
  30% { transform: rotate(7deg) scale(1.04); }
  45% { transform: rotate(-5deg) scale(1.02); }
  60% { transform: rotate(5deg) scale(1.02); }
  75% { transform: rotate(0deg) scale(1); }
}

.rosmon-call-caller {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px;
  line-height: 1.25;
}

.rosmon-call-subtitle {
  font-size: 13.5px;
  color: #B9C4FF;
  margin: 0 0 14px;
}

.rosmon-call-ref-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 16px;
}

/* Google Voice Audio Equalizer & Transcript Box */
.rosmon-call-voice-box {
  background: rgba(6, 9, 38, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 24px;
  text-align: left;
}

.rosmon-call-voice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #7CF0B2;
}

.rosmon-call-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}

.rosmon-call-bars span {
  width: 3px;
  height: 5px;
  border-radius: 2px;
  background: #4EB4FE;
  animation: rosmonVoiceWave 0.9s ease-in-out infinite alternate;
}

.rosmon-call-bars span:nth-child(2) { animation-delay: 0.15s; background: #7CF0B2; }
.rosmon-call-bars span:nth-child(3) { animation-delay: 0.3s; }
.rosmon-call-bars span:nth-child(4) { animation-delay: 0.45s; background: #7CF0B2; }
.rosmon-call-bars span:nth-child(5) { animation-delay: 0.2s; }
.rosmon-call-bars span:nth-child(6) { animation-delay: 0.4s; background: #7CF0B2; }

@keyframes rosmonVoiceWave {
  0% { height: 4px; opacity: 0.5; }
  100% { height: 14px; opacity: 1; }
}

.rosmon-call-transcript {
  font-size: 13px;
  line-height: 1.55;
  color: #E2E7FF;
  max-height: 92px;
  overflow-y: auto;
  margin: 0;
}

/* International Phone Call Pop Buttons (Dismiss + Pick Call for Admin, Pick Call only for Client) */
.rosmon-call-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  margin-top: 8px;
}

.rosmon-call-pop-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
}

.rosmon-call-pop-btn[hidden] {
  display: none !important;
}

.rosmon-call-pop-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rosmon-call-pop-btn.answer .rosmon-call-pop-circle {
  background: linear-gradient(135deg, #12B886 0%, #0CA678 100%);
  box-shadow: 0 0 0 0 rgba(18, 184, 134, 0.7), 0 12px 26px rgba(12, 166, 120, 0.45);
  animation: rosmonAnswerPopPulse 1.5s infinite;
}

@keyframes rosmonAnswerPopPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(18, 184, 134, 0.75), 0 12px 26px rgba(12, 166, 120, 0.45);
  }
  70% {
    transform: scale(1.07);
    box-shadow: 0 0 0 18px rgba(18, 184, 134, 0), 0 14px 30px rgba(12, 166, 120, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(18, 184, 134, 0), 0 12px 26px rgba(12, 166, 120, 0.45);
  }
}

.rosmon-call-pop-btn.decline .rosmon-call-pop-circle {
  background: linear-gradient(135deg, #FA5252 0%, #C92A2A 100%);
  box-shadow: 0 10px 24px rgba(201, 42, 42, 0.42);
}

.rosmon-call-pop-btn:hover .rosmon-call-pop-circle {
  transform: scale(1.08);
}

.rosmon-call-pop-label {
  font-size: 13px;
  font-weight: 600;
  color: #D8E0FF;
}
