/*
 * 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.
 */

/* Accordion Styles */
.accordion-icon {
  display: inline-block;
  transition: transform 0.3s ease-in-out;
}

button[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

[data-accordion-target="content"] {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

[data-accordion-target="content"][aria-expanded="true"] {
  max-height: 1000px;
  overflow: auto;
}

/* Hide scrollbars but keep scroll behavior */
.hide-scrollbar {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

/* AI tables inside chat messages - using to override Tailwind */
.ai-table {
  display: table;
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.ai-table th,
.ai-table td {
  border: 1px solid #d1d5db;
  padding: 0.2rem 0.4rem;
  text-align: center;
  font-size: 0.78rem;
}

.ai-table thead th {
  background-color: #f3f4f6;
  font-weight: 700;
}

.ai-table tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

/* Dark mode overrides for AI tables */
.dark .ai-table {
  color: #e5e7eb;
}

.dark .ai-table th,
.dark .ai-table td {
  border-color: #4b5563;
}

.dark .ai-table thead th {
  background-color: #374151;
  color: #f9fafb;
}

.dark .ai-table tbody tr:nth-child(even) {
  background-color: #1f2937;
}

/* Hide Turbo Progress Bar to maintain SPA feel without breaking Turbo Streams */
.turbo-progress-bar {
  visibility: hidden !important;
}
