/* Tailwind Theme Variables - Forge Theme: Deep Graphite & Molten Amber */
:root {
  /* Base - Deep Graphite */
  --background: 240 3% 4%; /* #0A0A0B - Deep graphite */
  --foreground: 0 0% 100%; /* Pure white */

  /* Cards - Slightly lighter graphite */
  --card: 240 3% 6%; /* Slightly lighter than background */
  --card-foreground: 0 0% 100%;

  /* Popovers */
  --popover: 240 3% 6%;
  --popover-foreground: 0 0% 100%;

  /* Primary - Molten Amber */
  --primary: 38 92% 50%; /* #F59E0B - Molten amber */
  --primary-foreground: 0 0% 0%; /* Black text on amber buttons */

  /* Secondary - Dark Gray */
  --secondary: 240 3% 10%; /* Dark gray for secondary backgrounds */
  --secondary-foreground: 0 0% 100%;

  /* Muted - For subtitles/secondary text */
  --muted: 240 3% 8%;
  --muted-foreground: 0 0% 70%; /* Light gray for muted text */

  /* Accent - For hovers */
  --accent: 240 3% 14%; /* Slightly lighter for hover states */
  --accent-foreground: 0 0% 100%;

  /* Destructive */
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 100%;

  /* Borders - Subtle white borders */
  --border: 240 3% 15%; /* Dark gray borders */
  --input: 240 3% 15%;
  --ring: 38 92% 50%; /* Molten amber ring to match primary */

  /* Radius */
  --radius: 0.5rem;
}

/* Base Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* JetBrains Mono for code elements */
code, pre, .font-mono, [class*="font-mono"] {
  font-family: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Utility Classes */
.text-glow {
  text-shadow: 0 0 20px hsla(35, 92%, 50%, 0.5);
}

.glass-card {
  background: linear-gradient(145deg, hsla(var(--card), 0.8), hsla(var(--card), 0.4));
  backdrop-filter: blur(12px);
  border: 1px solid hsla(var(--border), 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.grid-pattern {
  background-size: 40px 40px;
  background-image: linear-gradient(to right, hsla(var(--border), 0.1) 1px, transparent 1px),
                    linear-gradient(to bottom, hsla(var(--border), 0.1) 1px, transparent 1px);
}

/* Tailwind Color Utilities */
.bg-background { background-color: hsl(var(--background)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-primary { background-color: hsl(var(--primary)); }
.bg-secondary { background-color: hsl(var(--secondary)); }
.bg-muted { background-color: hsl(var(--muted)); }
.bg-accent { background-color: hsl(var(--accent)); }

.text-foreground { color: hsl(var(--foreground)); }
.text-primary { color: hsl(var(--primary)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }

.border-border { border-color: hsl(var(--border)); }
.border-white\/5 { border-color: rgba(255, 255, 255, 0.05); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-white\/20 { border-color: rgba(255, 255, 255, 0.2); }

/* Custom utilities for compatibility */
.bg-primary\/10 { background-color: hsla(var(--primary), 0.1); }
.bg-primary\/20 { background-color: hsla(var(--primary), 0.2); }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-secondary\/10 { background-color: hsla(var(--secondary), 0.1); }
.bg-secondary\/20 { background-color: hsla(var(--secondary), 0.2); }

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

/* Rotate utility */
.rotate-180 {
  transform: rotate(180deg);
}

/* Bootstrap dropdown styling to match theme */
.dropdown-menu {
  background-color: hsl(var(--card)) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
}

/* Ensure hidden dropdowns are not visible */
.dropdown-menu.hidden {
  display: none !important;
}

/* Bootstrap's .show class must override .hidden */
.dropdown-menu.show {
  display: block !important; /* Shown when Bootstrap adds .show class */
}

.dropdown-item {
  color: hsl(var(--foreground)) !important;
}

.dropdown-item:hover {
  background-color: hsl(var(--accent)) !important;
  color: hsl(var(--accent-foreground)) !important;
}

/* Bootstrap modal styling to match theme */
.modal {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1050 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden;
  outline: 0;
}

.modal.show {
  display: block !important;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem auto;
  pointer-events: none;
}

.modal-dialog-centered {
  display: flex !important;
  align-items: center !important;
  min-height: calc(100% - 3.5rem);
}

.modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1040 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(0, 0, 0, 0.7) !important;
}

.modal-backdrop.fade {
  opacity: 0;
}

.modal-backdrop.show {
  opacity: 1 !important;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: hsl(var(--card)) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: hsl(var(--foreground)) !important;
  border-radius: 0.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

.modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  color: hsl(var(--foreground)) !important;
  padding: 1.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.modal-title {
  color: hsl(var(--foreground)) !important;
}

.modal-body {
  color: hsl(var(--foreground)) !important;
  padding: 1.5rem !important;
}

.btn-close {
  filter: none !important; /* Remove filter since we're using Font Awesome icon */
  opacity: 0.8;
  padding: 0.5rem !important;
  margin: -0.5rem -0.5rem -0.5rem auto !important;
  background: none !important; /* Remove Bootstrap's background image */
  background-size: 1em !important;
  width: 1.5em !important;
  height: 1.5em !important;
  cursor: pointer;
  transition: opacity 0.2s ease, color 0.2s ease;
  color: hsl(var(--foreground)) !important; /* Use foreground color (white) */
}

.btn-close:hover {
  filter: none !important;
  opacity: 1 !important;
  color: hsl(var(--primary)) !important; /* Use primary color (amber) on hover */
}

.btn-close:focus {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

/* Ensure Font Awesome icons inside close button aren't filtered */
.btn-close i {
  filter: none !important;
}

