/* Solo estilos específicos de la aplicación - Tailwind está en tailwind.css */

/* Chat specific styles */
.chat-container {
  height: calc(100vh - 4rem); /* Account for header height */
}

.chat-messages {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

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

/* Professional Typography System */

/* Base font settings for professional appearance */
html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  font-variation-settings: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography scale for consistent sizing */
.text-display-xl { font-size: 3.75rem; line-height: 1; font-weight: 800; letter-spacing: -0.02em; }
.text-display-lg { font-size: 3rem; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.text-display-md { font-size: 2.25rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.text-display-sm { font-size: 1.875rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.02em; }

.text-heading-xl { font-size: 1.5rem; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; }
.text-heading-lg { font-size: 1.25rem; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; }
.text-heading-md { font-size: 1.125rem; line-height: 1.5; font-weight: 600; letter-spacing: -0.01em; }
.text-heading-sm { font-size: 1rem; line-height: 1.5; font-weight: 600; }

.text-body-xl { font-size: 1.125rem; line-height: 1.6; font-weight: 400; }
.text-body-lg { font-size: 1rem; line-height: 1.6; font-weight: 400; }
.text-body-md { font-size: 0.875rem; line-height: 1.5; font-weight: 400; }
.text-body-sm { font-size: 0.75rem; line-height: 1.4; font-weight: 400; }

.text-label-xl { font-size: 1rem; line-height: 1.5; font-weight: 500; }
.text-label-lg { font-size: 0.875rem; line-height: 1.4; font-weight: 500; }
.text-label-md { font-size: 0.75rem; line-height: 1.3; font-weight: 500; }
.text-label-sm { font-size: 0.6875rem; line-height: 1.2; font-weight: 500; letter-spacing: 0.025em; }

/* Professional spacing and readability optimizations */
.card {
  line-height: 1.6;
}

.card-title {
  letter-spacing: -0.01em;
}

/* Improve readability for data tables and definition lists */
dt {
  font-weight: 500;
  letter-spacing: 0.01em;
}

dd {
  line-height: 1.6;
}

/* Button typography improvements */
.btn {
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Tab typography */
.tab {
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Badge typography */
.badge {
  font-weight: 500;
  letter-spacing: 0.025em;
}

/* Collapsible Sidebar Styles */

/* Sidebar transitions */
.sidebar-transitioning {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Sidebar base styles */
.sidebar {
  width: 16rem; /* 64 * 0.25rem = 256px */
  overflow: visible;
}

/* Collapsed sidebar styles */
.sidebar.sidebar-collapsed {
  width: 4rem; /* 64px - just enough for icons */
}

/* Hide text elements when collapsed */
.sidebar.sidebar-collapsed .nav-text,
.sidebar.sidebar-collapsed .logo-text,
.sidebar.sidebar-collapsed .section-title {
  display: none !important;
}

/* Adjust nav items when collapsed */
.sidebar.sidebar-collapsed .nav-item {
  justify-content: center !important;
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

/* Center icons when collapsed */
.sidebar.sidebar-collapsed .nav-icon {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

/* Ensure icons are visible when collapsed */
.sidebar.sidebar-collapsed .nav-item svg {
  display: block !important;
  opacity: 1 !important;
}

/* Hide dividers and section headers when collapsed */
.sidebar.sidebar-collapsed .nav-divider,
.sidebar.sidebar-collapsed .nav-section {
  display: none;
}

/* Logo area when collapsed - center the icon */
.sidebar.sidebar-collapsed .sidebar header > div:first-child {
  justify-content: center !important;
}

/* Hide logo text but keep icon visible */
.sidebar.sidebar-collapsed .logo-text {
  display: none !important;
}

/* Ensure logo icon is centered when collapsed */
.sidebar.sidebar-collapsed .nav-icon {
  margin: 0 !important;
}

/* Theme button adjustments when collapsed */
.sidebar.sidebar-collapsed button.nav-item {
  justify-content: center !important;
  padding: 0.375rem !important;
}

/* Adjust main content when sidebar is collapsed */
@media (min-width: 1024px) {
  .main-content {
    margin-left: 16rem; /* Default sidebar width */
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media (min-width: 1024px) {
  .main-content.sidebar-collapsed {
    margin-left: 4rem; /* Collapsed sidebar width */
  }
}

/* Collapse button styles */
.collapse-button {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.collapse-button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Tooltip styles for collapsed sidebar */
.sidebar.sidebar-collapsed .nav-item {
  position: relative;
}

.sidebar.sidebar-collapsed .nav-item:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: oklch(var(--b1));
  color: oklch(var(--bc));
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid oklch(var(--b3));
  z-index: 50;
  opacity: 0;
  animation: tooltip-fade-in 0.2s ease forwards;
}

.sidebar.sidebar-collapsed .nav-item:hover::before {
  content: '';
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 6px 6px 0;
  border-color: transparent oklch(var(--b1)) transparent transparent;
  z-index: 51;
  opacity: 0;
  animation: tooltip-fade-in 0.2s ease forwards;
}

@keyframes tooltip-fade-in {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* Responsive behavior */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed !important;
    z-index: 40;
  }
  
  .main-content {
    margin-left: 0 !important;
  }
  
  .collapse-button {
    display: none;
  }
}