/* globals.css */

/* CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  margin: 0;
  padding: 0;
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

/* Root variables for light mode */
:root {
  --background: 220, 13%, 95%;
  --foreground: 240, 5.3%, 26.1%;
  --primary: 197, 76%, 53%;
  --card: 255, 255, 255;
  --muted: 0, 0%, 96.1%;
  --border: 0, 0%, 89.8%;
  --radius: 8px;
  --accent: 291, 64%, 39%;
  --destructive: 0, 84.2%, 60.2%;
  
  /* Spacing system */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  
  /* Typography */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
}

/* Dark mode support */
.dark {
  --background: 220, 13%, 10%;
  --foreground: 220, 13%, 95%;
  --primary: 197, 76%, 53%;
  --card: 30, 30, 30;
  --muted: 220, 13%, 20%;
  --border: 220, 13%, 25%;
  --accent: 291, 64%, 45%;
  --destructive: 0, 62.8%, 30.6%;
}

/* Accessibility focus styles */
*:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}
/* sidebar color */ 
:root {
  --sidebar-bg: 210, 36%, 96%;   /* light blue-gray */
  --topbar-bg: 204, 70%, 85%;    /* light sky blue */
}

.dark {
  --sidebar-bg: 220, 20%, 20%;   /* dark bluish-gray */
  --topbar-bg: 220, 30%, 25%;    /* slightly lighter bluish-gray */
}


/* Card component */
.card {
  background-color: hsl(var(--card));
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  border: 1px solid hsl(var(--border));
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-primary {
  background-color: hsl(var(--primary));
  color: white;
  border: none;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-size: var(--text-base);
}

.btn-primary:hover {
  background-color: hsl(197, 76%, 45%);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: hsl(var(--foreground));
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

/* Links */
a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  text-decoration: underline;
  color: hsl(197, 76%, 45%);
}

/* Forms */
label,
input,
textarea,
select {
  color: hsl(var(--foreground));
  font-size: var(--text-base);
}

input::placeholder,
textarea::placeholder {
  color: hsl(var(--muted)) !important;
  opacity: 0.8;
}

.form-control {
  background-color: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--space-sm) var(--space-md);
  width: 100%;
  transition: border-color 0.3s ease;
  margin-bottom: var(--space-sm);
}

.form-control:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 0.2rem hsla(var(--primary), 0.25);
}

.form-label {
  color: hsl(var(--foreground));
  font-weight: bold;
  display: block;
  margin-bottom: var(--space-xs);
}

/* Utility classes */
.text-muted {
  color: hsl(var(--muted));
}

.text-accent {
  color: hsl(var(--accent));
}

.text-center {
  text-align: center;
}

/* Print styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }
  
  .btn-primary {
    display: none !important;
  }
}

/* Responsive base font size */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}