/* Tailwind Theme Variables - Forge Theme: Deep Graphite & Molten Amber */
:root {
  /* Forge Charcoal / Deep Steel / Warm White / Signal Orange */
  --background: 200 12% 5%; /* #0B0D0E */
  --foreground: 48 26% 93%; /* #F2F0E9 */

  --card: 200 13% 9%; /* #15191B */
  --card-foreground: 48 26% 93%;

  --popover: 200 13% 9%;
  --popover-foreground: 48 26% 93%;

  --primary: 21 89% 54%; /* #F26A21 Signal Orange */
  --primary-foreground: 200 12% 5%;

  --secondary: 200 13% 9%;
  --secondary-foreground: 48 26% 93%;

  --muted: 200 12% 8%;
  --muted-foreground: 198 9% 44%; /* #66747A Cool Steel */

  --accent: 200 10% 14%;
  --accent-foreground: 48 26% 93%;

  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 48 26% 93%;

  --border: 200 10% 16%;
  --input: 200 10% 16%;
  --ring: 21 89% 54%;

  --radius: 0.25rem;
}

/* 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: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* 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 */
.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;
}

