/* Custom styles for K-PharmaReviewer UI */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", "맑은 고딕", sans-serif;
}

.agent-card {
  transition: all 0.2s ease-in-out;
}

.agent-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.08);
}

.badge-approval {
  background-color: #DEF7EC;
  color: #03543F;
  border: 1px solid #BCF0DA;
}

.badge-conditional {
  background-color: #E1EFFE;
  color: #1E429F;
  border: 1px solid #B4C6FC;
}

.badge-deficiency {
  background-color: #FEF08A;
  color: #713F12;
  border: 1px solid #FDE047;
}

.badge-rejection {
  background-color: #FDE8E8;
  color: #9B1C1C;
  border: 1px solid #F8B4B4;
}

.badge-pending {
  background-color: #F3F4F6;
  color: #374151;
  border: 1px solid #E5E7EB;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* D3.js Palantir Ontology Graph Styling */
.d3-node {
  cursor: pointer;
  transition: r 0.2s, stroke-width 0.2s;
}

.d3-node:hover {
  stroke: #ffffff !important;
  stroke-width: 3px !important;
}

.d3-node-semantic {
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.4));
}

.d3-node-kinetic {
  filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.5));
}

.d3-node-dynamic {
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.8));
  animation: pulse-dynamic 2.5s infinite ease-in-out;
}

@keyframes pulse-dynamic {
  0% { filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.5)); }
  50% { filter: drop-shadow(0 0 14px rgba(168, 85, 247, 1)); }
  100% { filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.5)); }
}

.d3-link {
  stroke: #334155;
  stroke-opacity: 0.6;
  transition: stroke 0.2s, stroke-opacity 0.2s;
}

.d3-link.highlighted {
  stroke: #60A5FA !important;
  stroke-opacity: 1 !important;
  stroke-width: 2.5px !important;
}

.d3-edge-label {
  font-size: 9px;
  fill: #94A3B8;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}



/* Palantir Foundry Tier Shapes & Animations */
.d3-node-diamond {
  transform: rotate(45deg);
  transform-origin: center;
}

.d3-node-group.dimmed {
  opacity: 0.12 !important;
  transition: opacity 0.3s ease;
}

.d3-link.dimmed {
  opacity: 0.05 !important;
  transition: opacity 0.3s ease;
}

/* Regulatory Causality Path Tracer Highlights */
.path-highlight-node {
  stroke: #FBBF24 !important;
  stroke-width: 4.5px !important;
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.95)) !important;
  animation: pulse-path-node 1.8s infinite ease-in-out;
}

@keyframes pulse-path-node {
  0% { filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.7)); }
  50% { filter: drop-shadow(0 0 20px rgba(245, 158, 11, 1)); }
  100% { filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.7)); }
}

.path-highlight-edge {
  stroke: #F59E0B !important;
  stroke-width: 3.5px !important;
  stroke-dasharray: 6 3;
  stroke-opacity: 1 !important;
  animation: dash-flow 1s linear infinite;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.8));
}

@keyframes dash-flow {
  from { stroke-dashoffset: 18; }
  to { stroke-dashoffset: 0; }
}

/* Foundry Inspector Subtabs */
.inspector-tab-btn.active {
  background-color: #2563EB !important;
  color: #ffffff !important;
  border-color: #2563EB !important;
}

/* Layout Buttons */
.layout-btn.active {
  background-color: #4F46E5 !important;
  color: #ffffff !important;
}


/* Phase 1: Reviewer Cockpit & 2-Way Synchronization */
.ectd-leaf-card {
  transition: all 0.3s ease;
}

.ectd-leaf-card:hover {
  border-color: #93C5FD;
}

.ectd-leaf-highlight {
  border-color: #F59E0B !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.5) !important;
  background-color: #FFFBEB !important;
  animation: leaf-flash 2.4s ease-in-out;
}

@keyframes leaf-flash {
  0% { transform: scale(1.02); background-color: #FEF3C7; }
  50% { transform: scale(1.01); background-color: #FFFBEB; }
  100% { transform: scale(1); }
}

.cockpit-mod-btn.active {
  background-color: #2563EB !important;
  color: #ffffff !important;
}

.adcom-slide {
  animation: fadeInSlide 0.3s ease-in-out;
}

@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   Multimodal Voice Reviewer Assistant (K-Pharma Voice Co-Pilot) Styling
   ========================================================================= */

/* Floating Voice Trigger Button / Voice Orb */
.voice-trigger-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.voice-trigger-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 24px -4px rgba(37, 99, 235, 0.45);
}

.voice-orb-glow {
  position: relative;
}

.voice-orb-glow::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.6) 0%, rgba(37, 99, 235, 0) 70%);
  animation: orb-breathe 3s infinite ease-in-out;
  z-index: -1;
}

@keyframes orb-breathe {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.25); opacity: 0.9; }
}

/* Voice States */
.voice-state-listening {
  border-color: #10B981 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6) !important;
  animation: pulse-listening 1.5s infinite ease-in-out !important;
}

@keyframes pulse-listening {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.voice-state-thinking {
  border-color: #8B5CF6 !important;
  animation: spin-thinking 2s linear infinite !important;
}

@keyframes spin-thinking {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.voice-state-speaking {
  border-color: #38BDF8 !important;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.7) !important;
}

/* Emotional Voice Aura Variations */
.voice-state-speaking.emotion-danger {
  border-color: #F43F5E !important;
  box-shadow: 0 0 28px rgba(244, 63, 94, 0.85) !important;
}

.voice-state-speaking.emotion-success {
  border-color: #10B981 !important;
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.85) !important;
}

.voice-state-speaking.emotion-debate {
  border-color: #F59E0B !important;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.85) !important;
}

.voice-state-speaking.emotion-briefing {
  border-color: #38BDF8 !important;
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.85) !important;
}

.voice-state-action {
  border-color: #F59E0B !important;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.9) !important;
  animation: pulse-action 0.8s ease-in-out;
}

@keyframes pulse-action {
  0% { transform: scale(0.97); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Voice Equalizer Visualizer Canvas */
.voice-wave-canvas {
  width: 100%;
  height: 48px;
  background: #0f172a;
  border-radius: 8px;
}

/* Voice HUD Panel */
.voice-hud-card {
  backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(51, 65, 85, 0.8);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.5), 0 0 2px 1px rgba(59, 130, 246, 0.3);
}

.voice-chip {
  transition: all 0.15s ease-in-out;
}

.voice-chip:hover {
  background-color: #1e293b;
  border-color: #60a5fa;
  color: #93c5fd;
  transform: translateY(-1px);
}

