/* 
 * main.css - Main CSS Entry Point for Archeway
 * Single import file for all organized CSS components
 * 
 * Architecture:
 * 1. Globals - Variables, reset, base styles
 * 2. Components - Reusable UI components
 * 3. Pages - Page-specific layouts and styles
 * 
 * This file structure is designed for Next.js migration compatibility
 */

/* ==========================================================================
   GLOBALS LAYER - Foundation styles that apply everywhere
   ========================================================================== */

@import url('./globals/variables.css');
@import url('./globals/reset.css');
@import url('./globals/utilities.css');

/* ==========================================================================
   COMPONENTS LAYER - Reusable UI components
   ========================================================================== */

/* Layout Components */
@import url('./components/layout/sidebar.css');
@import url('./components/layout/header.css');

/* UI Components */
@import url('./components/ui/button.css');
@import url('./components/ui/card.css');
@import url('./components/ui/form.css');
@import url('./components/ui/modal.css');
@import url('./components/ui/notification.css');
@import url('./components/ui/widget.css');
@import url('./components/ui/kanban.css');
@import url('./components/ui/job-listing.css');

/* ==========================================================================
   PAGES LAYER - Page-specific styles (loaded conditionally in templates)
   ========================================================================== */

/* Note: Page-specific CSS is loaded in individual templates:
 * - pages/dashboard.css (loaded in dashboard.html)
 * - pages/auth.css (loaded in auth templates) 
 * - pages/homepage.css (loaded in homepage.html)
 */

/* ==========================================================================
   UTILITIES LAYER - Utility classes for quick styling
   ========================================================================== */

/* Spacing Utilities */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: var(--space-xs); }
.ml-2 { margin-left: var(--space-sm); }
.ml-3 { margin-left: var(--space-md); }
.ml-4 { margin-left: var(--space-lg); }
.ml-5 { margin-left: var(--space-xl); }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: var(--space-xs); }
.mr-2 { margin-right: var(--space-sm); }
.mr-3 { margin-right: var(--space-md); }
.mr-4 { margin-right: var(--space-lg); }
.mr-5 { margin-right: var(--space-xl); }

/* Padding Utilities */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: var(--space-xs); }
.pt-2 { padding-top: var(--space-sm); }
.pt-3 { padding-top: var(--space-md); }
.pt-4 { padding-top: var(--space-lg); }
.pt-5 { padding-top: var(--space-xl); }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: var(--space-xs); }
.pb-2 { padding-bottom: var(--space-sm); }
.pb-3 { padding-bottom: var(--space-md); }
.pb-4 { padding-bottom: var(--space-lg); }
.pb-5 { padding-bottom: var(--space-xl); }

/* Display Utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flexbox Utilities */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.align-stretch { align-items: stretch; }

/* Text Utilities */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-muted { color: var(--text-light); }
.text-white { color: white; }

.font-weight-normal { font-weight: 400; }
.font-weight-medium { font-weight: 500; }
.font-weight-semibold { font-weight: 600; }
.font-weight-bold { font-weight: 700; }

.font-size-xs { font-size: var(--font-size-xs); }
.font-size-sm { font-size: var(--font-size-sm); }
.font-size-base { font-size: var(--font-size-base); }
.font-size-lg { font-size: var(--font-size-lg); }
.font-size-xl { font-size: var(--font-size-xl); }
.font-size-2xl { font-size: var(--font-size-2xl); }

/* Border Utilities */
.border { border: 1px solid var(--border-color); }
.border-top { border-top: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-left { border-left: 1px solid var(--border-color); }
.border-right { border-right: 1px solid var(--border-color); }
.border-0 { border: none; }

.rounded { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: 50%; }

/* Background Utilities */
.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-danger { background-color: var(--danger-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-light { background-color: var(--bg-color); }
.bg-white { background-color: white; }
.bg-transparent { background-color: transparent; }

/* Shadow Utilities */
.shadow-none { box-shadow: none; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }

/* Width Utilities */
.w-25 { width: 25%; }
.w-50 { width: 50%; }
.w-75 { width: 75%; }
.w-100 { width: 100%; }
.w-auto { width: auto; }

/* Height Utilities */
.h-25 { height: 25%; }
.h-50 { height: 50%; }
.h-75 { height: 75%; }
.h-100 { height: 100%; }
.h-auto { height: auto; }

/* Position Utilities */
.position-static { position: static; }
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

/* Overflow Utilities */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll { overflow: scroll; }

/* Visibility Utilities */
.visible { visibility: visible; }
.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;
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .d-md-none { display: none; }
  .d-md-block { display: block; }
  .d-md-flex { display: flex; }
  
  .text-md-center { text-align: center; }
  .text-md-left { text-align: left; }
  
  .w-md-100 { width: 100%; }
  .h-md-auto { height: auto; }
}

@media (max-width: 992px) {
  .d-lg-none { display: none; }
  .d-lg-block { display: block; }
  .d-lg-flex { display: flex; }
  
  .text-lg-center { text-align: center; }
  .text-lg-left { text-align: left; }
}

/* ==========================================================================
   MIGRATION HELPERS - Temporary classes to aid in transition
   ========================================================================== */

/* These help identify components that haven't been migrated yet */
.legacy-component {
  border: 2px dashed orange;
  position: relative;
}

.legacy-component::before {
  content: "LEGACY: Needs Migration";
  position: absolute;
  top: -10px;
  left: 10px;
  background: orange;
  color: white;
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 3px;
  z-index: 1000;
}