/* ==========================================================================
   UP Jal Shakti AI Platform - Enterprise Stylesheet
   Compliant with NHP & Government Accessibility Guidelines (GIGW)
   ========================================================================== */

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Accessibility Font Size Scaling */
html.text-scale-sm {
  font-size: 14px;
}
html.text-scale-md {
  font-size: 16px;
}
html.text-scale-lg {
  font-size: 18px;
}

/* Markdown prose styling */
.prose-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.prose-content th {
  background-color: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}
.dark .prose-content th {
  background-color: #1e293b;
  color: #f8fafc;
  border-bottom-color: #334155;
}
.prose-content td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.dark .prose-content td {
  border-bottom-color: #1e293b;
  color: #cbd5e1;
}
.prose-content tr:nth-child(even) {
  background-color: #f8fafc;
}
.dark .prose-content tr:nth-child(even) {
  background-color: #0f172a;
}
.prose-content tr:hover {
  background-color: #f1f5f9;
}
.dark .prose-content tr:hover {
  background-color: #1e293b;
}
.prose-content p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.prose-content p:last-child {
  margin-bottom: 0;
}
.prose-content ul,
.prose-content ol {
  margin-left: 1.5rem;
  margin-bottom: 0.75rem;
}
.prose-content li {
  margin-bottom: 0.25rem;
}
.prose-content strong {
  color: #0f172a;
  font-weight: 600;
}
.dark .prose-content strong {
  color: #f8fafc;
}
.prose-content code {
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.85em;
  color: #0369a1;
  font-family: monospace;
}
.dark .prose-content code {
  background: #1e293b;
  color: #38bdf8;
}
.prose-content blockquote {
  border-left: 4px solid #0284c7;
  background: #f0f9ff;
  padding: 0.5rem 1rem;
  margin: 0.75rem 0;
  border-radius: 0 8px 8px 0;
}
.dark .prose-content blockquote {
  background: #082f49;
  border-left-color: #38bdf8;
}

/* Pulse animation */
@keyframes subtle-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(0.995);
  }
}
.thinking-card {
  animation: subtle-pulse 1.8s infinite ease-in-out;
}

/* Voice Recording Waves */
@keyframes wave-pulse {
  0%, 100% {
    height: 6px;
  }
  50% {
    height: 22px;
  }
}
.wave-bar {
  animation: wave-pulse 1.2s infinite ease-in-out;
}
.wave-bar:nth-child(2) {
  animation-delay: 0.2s;
}
.wave-bar:nth-child(3) {
  animation-delay: 0.4s;
}
.wave-bar:nth-child(4) {
  animation-delay: 0.1s;
}
.wave-bar:nth-child(5) {
  animation-delay: 0.3s;
}

/* Audio Speaker animation */
@keyframes speak-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.75;
  }
}
.speaking-active {
  animation: speak-pulse 1s infinite ease-in-out;
  color: #0284c7;
}

/* Sidebar Drawer Slide Transition */
#sidebar-drawer {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, border-width 0.3s ease;
  overflow: hidden;
}
#sidebar-drawer.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
  border-width: 0 !important;
  opacity: 0;
  pointer-events: none;
}

/* Landing Suggestion Cards Hover Elevation */
.landing-prompt-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.landing-prompt-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.12), 0 8px 10px -6px rgba(2, 132, 199, 0.08);
}

/* Printable Report Stylesheet */
@media print {
  header, aside, form, #voice-recording-banner, nav, button {
    display: none !important;
  }
  body, main, #messages-container {
    overflow: visible !important;
    height: auto !important;
    background: white !important;
    color: black !important;
  }
  .prose-content table {
    page-break-inside: avoid;
  }
}
