@keyframes gradient-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.gradient-border {
  position: relative;
  padding: 2px;
  border-radius: 0.5rem;
  background-size: 200% 200%;
  background-image: linear-gradient(to right, #6a11cb, #2575fc);
}

.animate-gradient-border {
  animation: gradient-shimmer 3s linear infinite;
}

#mobileMicBtn,
#mobileMicHelp {
  display: none;
}

@media (max-width: 768px) {
  #mobileMicBtn,
  #mobileMicHelp {
    display: inline-flex;
    align-items: center;
  }
}

#mobileMicOverlay {
  position: fixed;
  inset: 0;
  background: black;
  z-index: 10000;
}

@media print {
  textarea {
    height: auto !important;
    overflow: visible !important;
  }
}
.ai-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(51, 153, 255, 0.18);
  z-index: 5;
  border-radius: 0.5rem; /* match card */
  pointer-events: none;
  animation: aiOverlayFade 0.5s;
}

@keyframes aiOverlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.font-avenir{font-family:"Avenir",Helvetica,Arial,sans-serif;}
.glow{filter:drop-shadow(0 0 6px currentColor);}

/* Synapse Chat Styling */
#synapseSidebar {
  width: clamp(300px, 25vw, 450px);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  border-left: 1px solid rgba(107, 114, 128, 0.15);
}

/* Chat bubbles */
#chatMessages .user-message, 
#chatMessages .assistant-message,
#chatMessages .error-message {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 85%;
  margin-bottom: 12px;
  line-height: 1.5;
  position: relative;
  word-wrap: break-word;
  white-space: pre-wrap;
}

#chatMessages .user-message {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 2px;
}

#chatMessages .assistant-message {
  background: #f3f4f6;
  color: #111827;
  margin-right: auto;
  border-bottom-left-radius: 2px;
}

.dark #chatMessages .assistant-message {
  background: #374151;
  color: #f9fafb;
}

#chatMessages .error-message {
  background: #fee2e2;
  color: #991b1b;
  margin-left: auto;
  margin-right: auto;
  border-radius: 8px;
  padding: 8px 16px;
}

/* Typing indicator */
.typing-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6b7280;
  margin: 0 2px;
  display: inline-block;
  animation: typing-dot 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing-dot {
  0%, 80%, 100% { 
    transform: scale(0.6);
    opacity: 0.6;
  }
  40% { 
    transform: scale(1);
    opacity: 1;
  }
}

/* Scrollbar styling */
.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background-color: #9ca3af;
  border-radius: 3px;
}

.dark .scrollbar-thin::-webkit-scrollbar-thumb {
  background-color: #4b5563;
}

/* Synapse sidebar resizing */
#synapseDragHandle {
  width: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#synapseWrapper:hover #synapseDragHandle {
  opacity: 1;
}

/* Chat textarea auto-resize */
#chatInput {
  min-height: 40px;
  max-height: 150px;
  overflow-y: auto;
}

#discharge-instructions-textarea,
#dischargeInstructionsTextarea,
#template-dropdown,
#templateDropdown,
#snippet-dropdown,
#snippetDropdown {
  background: #fff !important;
  color: #111 !important;
  border: 1px solid #ccc !important;
}
#discharge-instructions-section textarea,
#discharge-instructions-section select,
#discharge-instructions-section input[type="text"] {
  background: #fff !important;
  color: #111 !important;
}

/* 🌈 Glowing Border */
.gradient-border {
  position: relative;
  overflow: hidden;
}

.gradient-border::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  z-index: 0;
  background: linear-gradient(45deg, #7f5af0, #3f83f8, #7f5af0);
  background-size: 400% 400%;
  animation: gradientGlow 4s ease infinite;
  border-radius: 0.5rem;
}

.gradient-border > * {
  position: relative;
  z-index: 10;
}

/* 💫 Shimmer Overlay */
.shimmer-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
  animation: shimmer 2s infinite;
  z-index: 5;
  border-radius: 0.5rem;
  pointer-events: none;
}

/* 🔁 Keyframes */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes gradientGlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes gradientShimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.animate-gradient-shimmer {
  animation: gradientShimmer 2s linear infinite;
}

/* Tooltip text color fix for onboarding (works for both light and dark mode) */
.tour-step,
.shepherd-content,
.introjs-tooltiptext,
.shepherd-text {
  color: #1e1e1e !important; /* Ensures dark text for visibility */
}

/* Synapse Chat UI Styles */
#chatMessages {
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

#chatMessages::-webkit-scrollbar {
  width: 6px;
}

#chatMessages::-webkit-scrollbar-track {
  background: transparent;
}

#chatMessages::-webkit-scrollbar-thumb {
  background-color: rgba(156, 163, 175, 0.5);
  border-radius: 3px;
}

/* Message bubbles */
.message-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  border-radius: 1rem 1rem 0.25rem 1rem;
  padding: 0.75rem 1rem;
  max-width: 85%;
  margin-left: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-assistant {
  align-self: flex-start;
  background: #f3f4f6;
  color: #111827;
  border-radius: 1rem 1rem 1rem 0.25rem;
  padding: 0.75rem 1rem;
  max-width: 85%;
  margin-right: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dark .message-assistant {
  background: #334155;
  color: #f3f4f6;
}

.message-error {
  align-self: center;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  max-width: 90%;
  margin: 0 auto;
  text-align: center;
}

/* Improved message wrapping and resizable sidebar styles */
.message-user, .message-assistant, .message-error {
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.5;
}

#chatMessages {
  word-break: break-word;
}

#chatInput {
  word-wrap: break-word;
  white-space: pre-wrap;
  min-height: 44px;
  line-height: 1.5;
  overflow: hidden;
}

#synapseResizeHandle {
  transition: background-color 0.15s;
}

#synapseSidebar {
  transition: transform 0.3s, width 0.1s;
}

/* Add a subtle highlight to the resize handle on hover */
#synapseResizeHandle:hover {
  background-color: rgba(59, 130, 246, 0.5);
}

/* Typing animation dots */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 3px;
  animation: typingAnimation 1.4s infinite both;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
  margin-right: 0;
}

@keyframes typingAnimation {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* Auto-resizing textarea */
#chatInput {
  resize: none;
  overflow-y: hidden;
  min-height: 44px;
  max-height: 120px;
  transition: height 0.1s ease;
}

/* Image preview styles */
#imagePreview {
  position: relative;
}

#imagePreview img {
  border-radius: 0.5rem;
  max-height: 150px;
  display: block;
  margin: 0 auto;
}

.remove-image-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Syntry Brand Colors and Gradients */
:root {
  --syntry-blue: #3B82F6;
  --syntry-purple: #8B5CF6;
  --syntry-accent: #10B981;
}

/* Syntry brand gradient */
.gradient-syntry {
  background: linear-gradient(135deg, var(--syntry-blue), var(--syntry-purple));
}

/* Syntry color utilities */
.text-syntry-blue { color: var(--syntry-blue); }
.text-syntry-purple { color: var(--syntry-purple); }
.text-syntry-accent { color: var(--syntry-accent); }

.bg-syntry-blue { background-color: var(--syntry-blue); }
.bg-syntry-purple { background-color: var(--syntry-purple); }
.bg-syntry-accent { background-color: var(--syntry-accent); }

/* Light background variants */
.bg-syntry-blue-10 { background-color: rgba(59, 130, 246, 0.1); }
.bg-syntry-purple-10 { background-color: rgba(139, 92, 246, 0.1); }
.bg-syntry-accent-10 { background-color: rgba(16, 185, 129, 0.1); }
.bg-emerald-10 { background-color: rgba(16, 185, 129, 0.1); }

/* Gradient glow effect */
.gradient-glow {
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
}

/* Fade-in animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.animate {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* Plan content display */
.plan-content {
  display: none;
}

.plan-content.active {
  display: block;
}

/* Plan indicators */
.plan-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #d1d5db;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.plan-indicator.active {
  background-color: var(--syntry-blue);
}

/* Responsive text sizing */
@media (max-width: 768px) {
  .text-5xl { font-size: 2.5rem; }
  .text-7xl { font-size: 3.5rem; }
}

/* Waveform Animation Styles */
@keyframes waveform-bounce {
  0%, 100% { 
    transform: scaleY(0.2);
    opacity: 0.6;
  }
  50% { 
    transform: scaleY(1);
    opacity: 1;
  }
}

.waveform-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

#waveformDisplay .waveform-bar {
  transform-origin: bottom;
  min-height: 6px;
  transition: all 0.1s ease;
}

/* More energetic wave animation */
@keyframes waveform-active {
  0% { 
    transform: scaleY(0.3) scaleX(1);
    opacity: 0.7;
  }
  25% { 
    transform: scaleY(0.8) scaleX(1.1);
    opacity: 0.9;
  }
  50% { 
    transform: scaleY(1.2) scaleX(1);
    opacity: 1;
  }
  75% { 
    transform: scaleY(0.6) scaleX(0.9);
    opacity: 0.8;
  }
  100% { 
    transform: scaleY(0.3) scaleX(1);
    opacity: 0.7;
  }
}

/* Recording pulse for mic circle (keeping this!) */
@keyframes recording-pulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(236, 72, 153, 0);
  }
}

#micCircle.recording {
  animation: recording-pulse 2s ease-in-out infinite;
}

/* Make waveform more active when recording */
#dashboardRecordingModal:not(.hidden) #waveformDisplay .waveform-bar {
  animation: waveform-active 1.5s ease-in-out infinite !important;
}

/* Individual Card Collapse Styles */
.card-collapsed {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.card-collapsed .card-content {
  transition: all 0.3s ease-out;
}

.card-collapse-btn {
  transition: transform 0.3s ease;
}

.card-collapse-btn.collapsed {
  transform: rotate(180deg);
}

.card-collapse-btn:hover {
  background-color: rgba(107, 114, 128, 0.1);
  border-radius: 4px;
}

.dark .card-collapse-btn:hover {
  background-color: rgba(156, 163, 175, 0.1);
}

/* Card content animation */
.card-content {
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out, margin 0.3s ease-out;
}

/* Visual feedback for collapsible cards */
.decision-card {
  transition: all 0.2s ease;
}

.decision-card:hover .card-collapse-btn {
  opacity: 1;
}

/* Ensure icons are properly sized */
.card-collapse-btn i {
  width: 16px;
  height: 16px;
}

/* Synapse Individual Card Collapse Styles */
.synapse-card-collapsed {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.synapse-card-collapsed .synapse-card-content {
  transition: all 0.3s ease-out;
}

.synapse-card-collapse-btn {
  transition: transform 0.3s ease;
}

.synapse-card-collapse-btn.collapsed {
  transform: rotate(180deg);
}

.synapse-card-collapse-btn:hover {
  background-color: rgba(107, 114, 128, 0.1);
  border-radius: 4px;
}

.dark .synapse-card-collapse-btn:hover {
  background-color: rgba(156, 163, 175, 0.1);
}

/* Synapse card content animation */
.synapse-card-content {
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out, margin 0.3s ease-out;
}

/* Visual feedback for collapsible Synapse cards */
.visual-card {
  transition: all 0.2s ease;
}

.visual-card:hover .synapse-card-collapse-btn {
  opacity: 1;
}

/* Ensure Synapse card icons are properly sized */
.synapse-card-collapse-btn i {
  width: 16px;
  height: 16px;
}


