/* 
 * Common CSS for Structural Engineering Tools
 * Dark theme base styles and shared variables
 */

/* CSS Variables for consistent theming */
:root {
  --bg-primary: #111827;      /* gray-900 */
  --bg-secondary: #1f2937;    /* gray-800 */
  --bg-tertiary: #374151;     /* gray-700 */
  --bg-quaternary: #4b5563;   /* gray-600 */
  
  --text-primary: #f9fafb;    /* gray-100 */
  --text-secondary: #d1d5db;  /* gray-300 */
  --text-muted: #9ca3af;      /* gray-400 */
  
  --border-color: #6b7280;    /* gray-500 */
  --border-light: #4b5563;    /* gray-600 */
  
  --accent-blue: #2563eb;     /* blue-600 */
  --accent-blue-hover: #1d4ed8; /* blue-700 */
  --accent-green: #16a34a;    /* green-600 */
  --accent-green-hover: #15803d; /* green-700 */
  --accent-red: #dc2626;      /* red-600 */
  --accent-red-hover: #b91c1c; /* red-700 */
  
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --border-radius: 0.75rem;   /* rounded-xl */
  --border-radius-lg: 1rem;   /* rounded-2xl */
  --border-radius-sm: 0.375rem; /* rounded-md */
  
  --transition: all 0.2s ease-in-out;
}

/* Base body styling */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* Dark theme class */
.dark {
  color-scheme: dark;
}

/* Main container styling */
.main-container {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 72rem; /* max-w-6xl */
}

/* Typography */
.heading-1 {
  font-size: 1.875rem; /* text-3xl */
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.heading-2 {
  font-size: 1.5rem; /* text-2xl */
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.heading-3 {
  font-size: 1.25rem; /* text-xl */
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.text-description {
  color: var(--text-secondary);
  font-size: 0.875rem; /* text-sm */
}

/* Section styling */
.section-card {
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

/* Flexbox utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

/* Responsive utilities */
.hidden {
  display: none;
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .md\:col-span-2 {
    grid-column: span 2;
  }
  
  .md\:flex-row {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .lg\:col-span-2 {
    grid-column: span 2;
  }
}

/* Color utility classes */
.text-blue-400 {
  color: #60a5fa;
}

.text-green-400 {
  color: #4ade80;
}

.text-red-400 {
  color: #f87171;
}

.text-yellow-400 {
  color: #facc15;
}

.text-purple-400 {
  color: #c084fc;
}

/* Border utilities */
.border-gray-600 {
  border-color: var(--border-light);
}

.border-t {
  border-top-width: 1px;
}

.border {
  border-width: 1px;
}

/* Padding utilities */
.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.pt-6 {
  padding-top: 1.5rem;
}

/* Background utilities */
.bg-gray-600 {
  background-color: var(--bg-quaternary);
}

.bg-gray-700 {
  background-color: var(--bg-tertiary);
}

.bg-gray-800 {
  background-color: var(--bg-secondary);
}

/* Rounded corners */
.rounded {
  border-radius: 0.25rem;
}

.rounded-lg {
  border-radius: var(--border-radius-sm);
}

.rounded-xl {
  border-radius: var(--border-radius);
}

/* Overflow utilities */
.overflow-x-auto {
  overflow-x: auto;
}