/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Global Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Slower pulse animation */
@keyframes slow-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

.slow-pulse {
  animation: slow-pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Green glow animation for button border */
@keyframes green-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.8), 0 0 20px rgba(16, 185, 129, 0.6), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  }
}

.animate-green-glow {
  animation: green-glow 2s ease-in-out infinite;
}

/* Static green glow for hover */
.hover-green-glow:hover {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.8), 0 0 20px rgba(16, 185, 129, 0.6), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Audio clip border colors */
.border-clip-0 {
  border-left-color: #3b82f6; /* Blue 500 */
}

.border-clip-1 {
  border-left-color: #10b981; /* Green 500 */
}

.border-clip-2 {
  border-left-color: #f59e0b; /* Amber 500 */
}

.border-clip-3 {
  border-left-color: #8b5cf6; /* Purple 500 */
}

.border-clip-4 {
  border-left-color: #ef4444; /* Red 500 */
}

/* Fade in up animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in-up-delay-200 {
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.animate-fade-in-up-delay-400 {
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

/* Blue glow animation for updated items */
@keyframes blue-glow-flash {
  0% {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.8), 0 0 20px rgba(59, 130, 246, 0.6);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0), 0 0 0 rgba(59, 130, 246, 0);
  }
}

.animate-blue-glow-flash {
  animation: blue-glow-flash 2s ease-out forwards;
}

/* App header */
.app-header {
  flex-shrink: 0;
  border-bottom: 1px solid #d9dee7;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03), 0 10px 24px rgba(15, 23, 42, 0.03);
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 3.75rem;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .app-header-inner {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

.app-header-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
}

.app-header-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.875rem;
}

.app-header-home {
  display: inline-flex;
  align-items: center;
  min-height: 3.75rem;
  color: #111827;
  text-decoration: none;
}

.app-header-home:hover {
  color: #0f172a;
}

.app-header-name {
  display: inline-flex;
  align-items: center;
  color: #111827;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.app-header-context {
  display: inline-flex;
  min-width: 0;
  max-width: min(42vw, 24rem);
  height: 1.875rem;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 0.8125rem;
  border: 1px solid #dbe2ea;
  border-radius: 0.375rem;
  background: #f8fafc;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
}

.app-header-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
}

.app-launcher-button {
  display: inline-flex;
  width: 2.125rem;
  height: 2.125rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #d2d8e2;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.app-launcher-button.hidden {
  display: none;
}

@media (min-width: 1024px) {
  .app-launcher-button.lg\:hidden {
    display: none;
  }

  .app-launcher-button.lg\:flex {
    display: inline-flex;
  }
}

.app-launcher-button:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  color: #111827;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.app-launcher-button:focus-visible {
  outline: 2px solid #0f172a;
  outline-offset: 2px;
}

/* Sidebar collapse */
#ai-list {
  transition: none;
}

#ai-list .app-sidebar-toggle-bar {
  transition: padding 0.2s ease;
}

@media (min-width: 1024px) {
  #ai-list.app-launcher-panel {
    top: 4.25rem;
  }

  #ai-list.app-launcher-panel.app-sidebar--collapsed {
    transform: translateX(calc(100% + 1.5rem)) !important;
    border-left-color: transparent !important;
  }

  #ai-list.app-sidebar--collapsed .app-sidebar-toggle-bar {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #ai-list.app-sidebar--collapsed .app-sidebar-content {
    display: none;
  }

  #ai-list.app-sidebar--collapsed .app-sidebar-brand {
    display: none;
  }
}

.app-header-name {
  font-size: 1.25rem;
}

@media (min-width: 768px) {
  .app-header-name {
    font-size: 1.5rem;
  }
}

.app-floating-sidebar {
  top: 4.25rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  border: 1px solid #d9dee7;
  border-radius: 0.5rem;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  transition: none;
}

.app-right-sidebar {
  transition: none;
}

@media (max-width: 1023.98px) {
  .app-floating-sidebar.translate-x-full {
    transform: translateX(calc(100% + 1.5rem));
  }
}

.app-right-sidebar-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}
