/* VoiceNote App - Custom CSS Styles */

/* Audio Player Styling */
audio {
  min-height: 36px;
  border-radius: 9999px;
  background-color: rgba(55, 65, 81, 0.6); /* gray-700 with opacity */
}

/* File Upload Button Styling */
input[type="file"]::file-selector-button {
  cursor: pointer;
}

/* Recording Modal Animation */
#recording-modal {
  animation: fadeIn 0.2s ease-out;
}

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

/* Recording Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

#stop-recording:not(.hidden) {
  animation: pulse 1.2s infinite;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
}

/* Custom Scrollbar for Dark Mode */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #1f2937; /* gray-800 */
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: #4b5563; /* gray-600 */
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b7280; /* gray-500 */
}

/* Additional styling for better accessibility with dark mode */
::placeholder {
  color: rgba(156, 163, 175, 0.8); /* gray-400 with opacity */
}

/* Additional classes for alerts and notifications */
.alert-success {
  background-color: rgba(16, 185, 129, 0.2); /* emerald-600 with opacity */
  color: #10b981; /* emerald-500 */
  border-left: 4px solid #10b981;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.2); /* red-500 with opacity */
  color: #ef4444; /* red-500 */
  border-left: 4px solid #ef4444;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

/* Focus styling for better accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #6366f1; /* indigo-500 */
  outline-offset: 2px;
}

/* Styling for color contrast - ensure text is readable */
.text-on-dark {
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.text-on-light {
  color: #111827; /* gray-900 */
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.4);
}

/* Helper for group colors with low opacity */
.group-bg {
  background-color: rgba(var(--group-color-rgb), 0.2);
}

/* Animation for upload progress */
@keyframes progressFill {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

.animate-progress {
  animation: progressFill 3s ease-in-out forwards;
}

/* Ensure modals are on top of everything */
.modal-z-index {
  z-index: 9999;
}

/* Minor enhancement for mobile views */
@media (max-width: 640px) {
  .mobile-stretch {
    width: 100% !important;
  }

  audio {
    width: 100%;
  }

  .mobile-stack {
    flex-direction: column !important;
  }

  .mobile-stack > * {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
}
