/**
 * Main CSS - Entry point for all application styles
 *
 * This file imports all CSS modules in the correct order.
 * Include only this file in base templates for complete styling.
 *
 * Architecture:
 * 1. tokens.css     - CSS variables, brand colors, spacing, typography
 * 2. components.css - Base reusable components (buttons, cards, forms)
 * 3. surveys.css    - Survey forms (TMF, SCL)
 * 4. dashboard.css  - Dashboard, Power of One, charts
 * 5. consultation.css - Coach preparation, sessions, challenges
 * 6. accounts.css   - Authentication pages
 */

/* ===========================================
   1. DESIGN TOKENS & CSS VARIABLES
   =========================================== */
@import url('tokens.css');

/* ===========================================
   2. BASE LAYOUT (Sidebar, Navbar)
   =========================================== */
@import url('layout.css');

/* ===========================================
   3. BASE COMPONENTS
   =========================================== */
@import url('components.css');

/* ===========================================
   4. SECTION-SPECIFIC STYLES
   =========================================== */
@import url('surveys.css');
@import url('dashboard.css');
@import url('consultation.css');
@import url('accounts.css');
@import url('chat.css');
@import url('includes.css');

/* ===========================================
   4. UTILITY CLASSES
   =========================================== */

/* Hide elements */
[x-cloak] { display: none !important; }
.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Transitions */
.transition-all { transition: all 0.2s ease; }
.transition-fast { transition: all 0.15s ease; }
.transition-slow { transition: all 0.3s ease; }

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-ping { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }
.animate-bounce { animation: bounce 1s infinite; }

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

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

html.dark .custom-scrollbar::-webkit-scrollbar-track {
  background: #1e293b;
}

html.dark .custom-scrollbar::-webkit-scrollbar-thumb {
  background: #475569;
}

html.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Focus styles */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 132, 255, 0.15);
}

/* Text utilities */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===========================================
   5. PRINT STYLES
   =========================================== */
@media print {
  .no-print { display: none !important; }

  body {
    background: white !important;
    color: black !important;
  }

  .sidebar { display: none !important; }
  .main-content { margin-left: 0 !important; }

  a { text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; }
}
