/* ============================================================
   UKA Technical Institute - AI Calling Agent UI Styles
   ============================================================ */

:root {
  --call-night: #060d26;
  --call-navy: #0b2a6f;
  --call-red: #e11d3a;
  --call-red2: #ff4d62;
  --call-green: #10b981;
  --call-green2: #25d366;
  --call-blue: #3b82f6;
}

/* Modal Overlay Backdrop */
.uka-call-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(3, 7, 24, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.uka-call-modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* Phone Screen Shell */
.uka-call-screen {
  width: 100%;
  max-width: 440px;
  background: radial-gradient(circle at 50% 10%, #112d75, #050c26 70%);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 36px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 28px 22px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  transform: scale(0.92) translateY(24px);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.uka-call-modal.active .uka-call-screen {
  transform: scale(1) translateY(0);
}

/* Top Status Bar */
.uka-call-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 16px;
  font-size: 13px;
  color: #a4b4e3;
}

.uka-call-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px 12px;
  font-weight: 700;
  font-size: 11.5px;
  color: #c9d5fb;
}

.uka-call-close {
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.uka-call-close:hover {
  background: rgba(225, 29, 58, 0.7);
}

/* Agent Identity Card */
.uka-call-agent-wrap {
  text-align: center;
  margin-bottom: 14px;
  position: relative;
}

.uka-agent-avatar-ring {
  width: 100px;
  height: 100px;
  margin: 0 auto 12px;
  border-radius: 50%;
  padding: 4px;
  position: relative;
  background: linear-gradient(135deg, var(--call-red), var(--call-navy), var(--call-green2));
}

.uka-agent-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #091a48, #050c26);
  display: grid;
  place-items: center;
  border: 3px solid #050c26;
  position: relative;
  overflow: hidden;
  color: #fff;
}

/* Ringing Halo Ripples */
.uka-call-screen.ringing .uka-agent-avatar-ring:before,
.uka-call-screen.ringing .uka-agent-avatar-ring:after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid var(--call-green2);
  opacity: 0.8;
  animation: callRingRipple 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.uka-call-screen.ringing .uka-agent-avatar-ring:after {
  animation-delay: 0.8s;
}

@keyframes callRingRipple {
  0% { transform: scale(0.9); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

.uka-agent-name {
  font: 800 23px/1.2 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 2px;
}

.uka-agent-role {
  color: #ff8595;
  font-size: 12.5px;
  font-weight: 700;
  display: block;
}

.uka-call-status {
  font-size: 13.5px;
  font-weight: 600;
  color: #c9d5fb;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.uka-call-status .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 8px #25d366;
}

.uka-call-timer {
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  color: #25d366;
  background: rgba(37, 211, 102, 0.12);
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid rgba(37, 211, 102, 0.25);
  display: inline-block;
  margin-top: 4px;
}

/* Sound Wave Equalizer (When AI speaks or listens) */
.uka-audio-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 40px;
  margin: 6px 0 12px;
}

.uka-audio-wave span {
  width: 5px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  transition: height 0.15s, background 0.2s;
}

.uka-call-screen.speaking .uka-audio-wave span {
  background: linear-gradient(180deg, var(--call-red2), #ff8595);
  animation: waveActive 0.75s ease-in-out infinite alternate;
}

.uka-call-screen.listening .uka-audio-wave span {
  background: linear-gradient(180deg, #10b981, #6ee7b7);
  animation: waveListen 1.1s ease-in-out infinite alternate;
}

.uka-call-screen.thinking .uka-audio-wave span {
  background: linear-gradient(180deg, #3b82f6, #93c5fd);
  animation: waveThinking 0.9s ease-in-out infinite alternate;
}

.uka-audio-wave span:nth-child(1) { animation-delay: 0.1s; }
.uka-audio-wave span:nth-child(2) { animation-delay: 0.25s; }
.uka-audio-wave span:nth-child(3) { animation-delay: 0.4s; }
.uka-audio-wave span:nth-child(4) { animation-delay: 0.15s; }
.uka-audio-wave span:nth-child(5) { animation-delay: 0.35s; }
.uka-audio-wave span:nth-child(6) { animation-delay: 0.2s; }
.uka-audio-wave span:nth-child(7) { animation-delay: 0.45s; }

@keyframes waveActive {
  0% { height: 8px; }
  100% { height: 38px; }
}

@keyframes waveListen {
  0% { height: 6px; }
  100% { height: 26px; }
}

@keyframes waveThinking {
  0% { height: 6px; }
  100% { height: 20px; }
}

/* Live Caption / Dialogue Bubble */
.uka-caption-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 12px 16px;
  min-height: 64px;
  max-height: 110px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.6;
  color: #e2e8f8;
  margin-bottom: 12px;
  text-align: left;
}

.uka-caption-speaker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--call-red2);
  display: block;
  margin-bottom: 2px;
}

/* Quick Topic Pills inside Call */
.uka-call-quick-chips {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
}

.uka-q-chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.uka-q-chip:hover {
  background: var(--call-red);
  border-color: var(--call-red);
  transform: translateY(-1px);
}

/* Candidate Extracted Data Badge Strip */
.uka-collected-pill {
  width: 100%;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}

.uka-chip-val {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #c9d5fb;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.uka-chip-val b {
  color: #25d366;
}

/* Call Control Buttons Bar */
.uka-call-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  padding-top: 6px;
}

.uka-ctrl-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.uka-ctrl-btn svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.uka-ctrl-btn.btn-hangup {
  background: linear-gradient(135deg, var(--call-red), var(--call-red2));
  transform: rotate(135deg);
}

.uka-ctrl-btn.btn-hangup:hover {
  transform: rotate(135deg) scale(1.08);
  box-shadow: 0 12px 28px rgba(225, 29, 58, 0.55);
}

.uka-ctrl-btn.btn-tool {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.uka-ctrl-btn.btn-tool:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.uka-ctrl-btn.btn-tool.active {
  background: var(--call-red);
  border-color: var(--call-red);
}

/* Fallback Keyboard Input Drawer */
.uka-call-text-input {
  display: none;
  width: 100%;
  margin-top: 12px;
}

.uka-call-text-input.open {
  display: flex;
  gap: 8px;
}

.uka-call-text-input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 30px;
  padding: 9px 16px;
  font: 500 13.5px 'Plus Jakarta Sans', sans-serif;
  color: #fff;
  outline: 0;
}

.uka-call-text-input input:focus {
  border-color: var(--call-red2);
  background: rgba(255, 255, 255, 0.18);
}

.uka-call-text-input button {
  background: var(--call-red);
  border: 0;
  border-radius: 30px;
  padding: 0 18px;
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.2s;
}

.uka-call-text-input button:hover {
  background: var(--call-red2);
}
