/* Ooredoo Voice Agent — Custom styles (supplements Tailwind CDN) */

:root {
  --accent: #E30613;
}

/* ── Background glow ─────────────────────────────────────────────────────── */
.bg-glow {
  position: fixed;
  bottom: -10%;
  right: 10%;
  width: 50%;
  height: 50%;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

/* ── Status dot ──────────────────────────────────────────────────────────── */
.dot-active {
  background-color: #22c55e !important;
  animation: dot-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.dot-inactive {
  background-color: #d1d5db !important;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Tool indicator badge ────────────────────────────────────────────────── */
.tool-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: #fff1f2;
  border: 1px solid #fecaca;
  color: var(--accent);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* ── Waveform bars ───────────────────────────────────────────────────────── */
.bar {
  width: 6px;
  background-color: var(--accent);
  border-radius: 9999px;
  animation: wave 1.5s ease-in-out infinite;
  height: 20px;
}

.bar:nth-child(1)  { animation-delay: 0.00s; }
.bar:nth-child(2)  { animation-delay: 0.10s; }
.bar:nth-child(3)  { animation-delay: 0.20s; }
.bar:nth-child(4)  { animation-delay: 0.30s; }
.bar:nth-child(5)  { animation-delay: 0.40s; }
.bar:nth-child(6)  { animation-delay: 0.50s; }
.bar:nth-child(7)  { animation-delay: 0.40s; }
.bar:nth-child(8)  { animation-delay: 0.30s; }
.bar:nth-child(9)  { animation-delay: 0.20s; }
.bar:nth-child(10) { animation-delay: 0.10s; }
.bar:nth-child(11) { animation-delay: 0.05s; }
.bar:nth-child(12) { animation-delay: 0.00s; }

@keyframes wave {
  0%, 100% {
    height: 16px;
    opacity: 0.3;
  }
  50% {
    height: 80px;
    opacity: 1.0;
  }
}

/* ── Start button hover state for SVG color ─────────────────────────────── */
.start-btn:hover svg {
  color: var(--accent);
}

/* ── Capability card tooltips ────────────────────────────────────────────── */
.tool-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 20rem;
  max-width: 90vw;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 14px 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 50;
}

.capability-card:hover .tool-tooltip,
.capability-card:focus-within .tool-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* caret */
.tool-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #fff;
  filter: drop-shadow(0 1px 0 #e5e7eb);
}

.tool-tooltip h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.tool-tooltip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tool-tooltip li {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tool-tooltip li strong {
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
}

.tool-tooltip li span {
  font-size: 11px;
  line-height: 1.4;
  color: #6b7280;
}

/* ── Test data button ────────────────────────────────────────────────────── */
.test-data-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.test-data-btn:hover {
  background: #fff1f2;
  border-color: #fecaca;
  color: var(--accent);
}

.test-data-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #fff;
  border-color: #e5e7eb;
  color: #9ca3af;
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(2px);
}

.modal-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 880px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.modal-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 0 4px;
}

.modal-close:hover {
  color: var(--accent);
}

.modal-subtitle {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 16px;
}

.modal-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  margin-top: 24px;
  margin-bottom: 6px;
}

.modal-table-wrap {
  overflow: auto;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
}

/* ── Auth reference table ────────────────────────────────────────────────── */
.auth-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.auth-table th {
  text-align: left;
  background: #f9fafb;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
}

.auth-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  white-space: nowrap;
}

.auth-table tr:last-child td {
  border-bottom: none;
}

.auth-table tbody tr:hover td {
  background: #fff7f7;
}

.auth-table-empty {
  text-align: center;
  color: #9ca3af;
  white-space: normal;
}

/* ── Location map modal ──────────────────────────────────────────────────── */
.map-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #f3f4f6;
}

#location-map {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
}

.map-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.map-coords {
  font-size: 12px;
  color: #6b7280;
  margin-right: auto;
}

.map-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.map-btn:hover {
  background: #fff1f2;
  border-color: #fecaca;
  color: var(--accent);
}

.map-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.map-btn-primary:hover {
  background: #c40511;
  border-color: #c40511;
  color: #fff;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}
