body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Base.html might be a better place for these imports */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');


.nav-bar {
  display: flex;
  align-items: center;   /* centers children vertically */
  background-color: #0d6efd;
  padding: 0 2rem;
  height: 60px;          /* fixed height for navbar */
}

/* brand takes full height */
.nav-bar .brand {
  display: flex;
  align-items: center;   /* center text inside */
  height: 100%;          /* stretch to full navbar height */
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  text-decoration: none;
  margin-right: 2rem;
}

/* nav list also full height */
.nav-links {
  display: flex;
  align-items: center;   /* center the link text */
  height: 100%;          /* stretch to full navbar height */
  list-style: none;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

/* links fill nav height, center their text */
.nav-links a {
  display: flex;
  align-items: center;   /* vertical centering */
  height: 100%;          /* full navbar height */
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
}

h1, h2, h3, h4, h5 {
  color: #ffffff;
  border-bottom: 1px solid #333;
  margin-top: 2rem;
}

p, li, label {
  font-size: 1rem;
  line-height: 1.5;
}

#main-program-container {
  width: 90vw;
  max-width: 90vw;
  margin-left: 5vw;
}

textarea, input[type="text"], select {
  background-color: #1e1e1e;
  color: #eee;
  border: 1px solid #555;
  padding: 0.5rem;
  width: 100%;
  border-radius: 4px;
  margin-top: 0.3rem;
}

button {
  background-color: #3a3a3a;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* FLEX ROWS */
.button-group{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px;            /* spacing between buttons */
  margin-bottom:0.5rem;
}
.button-group form{ margin:0; display:inline-flex; }

/* utilities */
.grow{ flex:1 1 auto; }       /* stretches to fill row */
.push-right{ margin-left:auto; } /* pushes this item to the far right */

/* optional: make grouped buttons same width for a cleaner column */
.button-group .btn,
.button-group .btn-sm,
.button-group button {
  width: fit-content;   /* or 100% if you want full-width buttons */
}

/* simple left-padding helpers */
.ml-2 { margin-left: .5rem; }
.ml-4 { margin-left: 1rem; }
.ml-6 { margin-left: 1.5rem; }
.ml-8 { margin-left: 2rem; }
.ml-12 { margin-left: 3rem; }

/* optional responsive pad if you want it to scale a bit */
.ml-fluid { margin-left: clamp(1rem, 6vw, 5rem); }

button:hover {
  background-color: #444;
  border-color: #777;
}

button.btn-danger,
button[style*="red"] {
  background-color: #c0392b;
  border-color: #962d22;
  color: #fff !important;
}

button.btn-danger:hover {
  background-color: #e74c3c;
}

input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 8px;
  vertical-align: middle;
}

ul {
  list-style-type: none;
  padding-left: 1rem;
}

ul > li {
  margin-bottom: 0.75rem;
}

form.inline-form {
  display: inline;
}

hr {
  border-top: 1px solid #444;
  margin: 2rem 0;
}

a {
  color: #0af;
}

a:hover {
  text-decoration: underline;
}

pre {
  background-color: #1a1a1a;
  color: #ccc;
  padding: 0.75rem;
  border: 1px solid #333;
  overflow-x: auto;
}

.summary-block {
  background: #222;
  border: 1px solid #333;
  padding: 1rem;
  border-radius: 6px;
  margin-top: 2rem;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  margin: 4px 0;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background-color: #3b82f6; /* blue */
  transition: all 0.2s ease-in-out;
}

.btn-sm:hover {
  background-color: #2563eb; /* darker blue */
  transform: translateY(-1px);
}

.btn-sm:active {
  background-color: #1d4ed8; /* even darker */
  transform: translateY(0);
}

.btn-sm:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* ========== NEW SPACING ========== */
.goal-container {
  background-color: #1c1c1c;
  padding: 1rem;
  border: 1px solid #333;
  border-radius: 6px;
  margin-top: 1rem;
  margin-left: 0rem; /* stays flush left */
}

.objective-container {
  background-color: #202020;
  padding: 0.75rem;
  border: 1px solid #2c2c2c;
  border-radius: 4px;
  margin-top: 0.75rem;
  margin-left: 2rem; /* indented inside goal */
}

.checklist-container {
  margin-top: 0.5rem;
  margin-left: 3.5rem; /* indented under objective */
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 1rem;
}

.checklist-item form {
  display: inline-block;
}

.objective-header {
  margin-left: 2rem;
}

.objective-header h3 {
  border-bottom: 1px solid #333;
  display: inline-block;  /* limit border to text width */
}

.goal-header h3, .goal-header p {
  padding-left: 30px;
}

.goal-header form {
  padding-left: 15px;
}

.goal-header li {
  padding-left: 25px;
}

.goal-container p  {
  padding-left: 30px;
}

.chat-message-container {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.message-actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem; /* Creates space between buttons */
}

/* Basic styling for the new buttons */
.message-actions button {
  padding: 2px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  border: 1px solid #ccc;
  background-color: #f0f0f0;
  border-radius: 4px;
}

.message-actions button:hover {
  background-color: #e0e0e0;
}

.ai-output {
  margin: 8px 0;
  padding: 8px;
  background-color: #f3f9ff;
  border-left: 4px solid #08f;
  font-style: italic;
  white-space: pre-wrap;
}

/* Smooth scroll for in-page anchors */
html { scroll-behavior: smooth; }

/* Sticky top nav */
.topjump {
  position: sticky;       /* stays at the top while scrolling */
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  text-align: center;
  justify-content: center;   /* center the links */
  gap: 8px;                 /* more space between buttons */
  padding: 12px 0;           /* vertical breathing room */
  border-bottom: 1px solid #333;
  backdrop-filter: blur(6px);
}

/* “Button-like” links */
.topjump a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.90rem;
  font-weight: 500;
  color: #fff;
  background: #2563eb;
  text-decoration: none;
  border: 1px solid #1f3f8c;
  transition: background 0.2s ease, transform 0.15s ease;
}
.topjump a:hover { background: #1d4ed8; transform: translateY(-1px); }
.topjump a:active { transform: translateY(0); }
.topjump a.active { outline: 2px solid #93c5fd; outline-offset: 2px; }

/* Uniform height for all items in the nav */
.topjump {
  align-items: stretch;           /* make children match the row height */
}

/* Apply to both <a> and <button> inside the nav */
.topjump a,
.topjump button {
  /* force a fixed height and vertically center the label */
  height: 44px;                   /* ← set the exact height you want */
  display: inline-flex;           /* inline so gaps behave; flex for centering */
  align-items: center;            /* vertical centering */
  justify-content: center;        /* horizontal centering */

  padding: 0 14px;                /* strip vertical padding; keep horizontal */
  line-height: 1;                 /* avoid font-based height drift */
  box-sizing: border-box;         /* include border in the 44px */
  white-space: nowrap;            /* prevent text wrapping that would change height */
}

/* keep your existing styles (colors, hover, etc.) as-is */


/* Anchor offset for sticky header */
[id].anchor-target { scroll-margin-top: 80px; }

/* static/task.css or new static/modal.css */
dialog {
    border: none;
    padding: 20px;
    border-radius: 8px;
    background-color: #2a2a2a; /* Dark background */
    color: #ddd; /* Light text */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 80vw;
    max-height: 90vh; /* Allow scrolling for large content */
    overflow: auto; /* Enable scrolling for modal content */
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

.file-modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6);
    align-items: center; justify-content: center;
}
.file-modal.d-flex { display: flex; }
.file-modal-content {
    background-color: #282828; color: #ccc; margin: auto; padding: 20px; border: 1px solid #888;
    border-radius: 8px; position: relative;
    display: flex; flex-direction: column; max-height: 85vh;
}
.file-modal-content .file-search-close-button {
    color: #aaa; position: absolute; top: 10px; right: 15px; font-size: 28px; font-weight: bold;
}
.file-modal-content .file-search-close-button:hover, .file-modal-content .file-search-close-button:focus {
    color: #fff; text-decoration: none; cursor: pointer;
}
#file-search-modal-title { margin-top: 0; }
#file-search-results-container {
    overflow-y: auto;
    margin: 15px 0;
    border-top: 1px solid #444;
    border-bottom: 1px solid #444;
    padding: 10px 0;
}
.search-result-file { margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #3a3a3a; }
.search-result-file:last-child { border-bottom: none; }
.search-result-file h5 { margin: 0 0 8px 0; display: flex; align-items: center; font-size: 1.1em; }
.search-result-file h5 input { margin-right: 10px; }
.search-result-match {
    margin-left: 30px;
    font-size: 0.9em;
    padding: 4px 8px;
    background: #1a1a1a;
    border-radius: 4px;
    margin-bottom: 4px;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: monospace;
}
.search-result-match .line-num { color: #888; margin-right: 10px; display: inline-block; width: 40px; text-align: right; }
.file-modal-actions { text-align: right; padding-top: 15px; }
.file-modal-actions button { margin-left: 10px; }

.goc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.goc-modal-header h2 {
    margin: 0;
    color: #fff;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #aaa;
    cursor: pointer;
}

.close-button:hover {
    color: #fff;
}

.goc-modal-content {
    display: flex;
    gap: 20px; /* Space between token summary and prompt */
}

.goc-modal-section {
    flex: 1; /* Each section takes equal width */
    padding: 15px;
    background-color: #1a1a1a; /* Even darker background for sections */
    border-radius: 4px;
    border: 1px solid #333;
}

.goc-modal-section h3 {
    color: #eee;
    margin-top: 0;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.token-summary-table {
    width: 100%;
    border-collapse: collapse;
    color: #ccc;
    font-size: 0.9em;
}

.token-summary-table th, .token-summary-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.token-summary-table th {
    background-color: #333;
}

.token-summary-table tr:hover {
    background-color: #222;
}

.full-prompt-area {
    white-space: pre-wrap; /* Preserves whitespace and wraps lines */
    font-family: monospace;
    font-size: 0.85em;
    max-height: 90%; /* Limit height and enable scroll */
    height: 90vh; /* Limit height and enable scroll */
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #444;
    background: #0d0d0d;
    border-radius: 4px;
}

/* Add styles for flash messages */
.flashed-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.flashed-messages ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.flashed-messages li {
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 5px;
    font-weight: bold;
    opacity: 0.9;
}

.flashed-messages .success {
    background-color: #28a745;
    color: white;
}

.flashed-messages .danger {
    background-color: #dc3545;
    color: white;
}

.flashed-messages .warning {
    background-color: #ffc107;
    color: #343a40;
}

.flashed-messages .info {
    background-color: #17a2b8;
    color: white;
}

#chat-box {
    white-space: pre-wrap;
}

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    padding: 12px 18px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 15px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.21, 1.02, 0.73, 1);
    color: #fff;
}
.toast.show {
    opacity: 1;
    transform: translateX(0);
}
.toast.success { background-color: #28a745; }
.toast.error { background-color: #dc3545; }
.toast.info { background-color: #17a2b8; }

/* --- Image Upload --- */
#image-drop-zone {
  border: 2px dashed #555;
  padding: 20px;
  text-align: center;
  border-radius: 5px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

#image-drop-zone:hover, #image-drop-zone.dragover {
  border-color: #0af;
  background-color: #2a2a2a;
}

#image-preview-area {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.image-preview-wrapper {
  position: relative;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 5px;
  background: #2c2c2c;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-wrapper img {
  max-width: 100px;
  max-height: 100px;
  object-fit: cover;
}

.image-remove-btn {
  position: absolute;
  top: -1px;
  right: -1px;
  background: rgba(0,0,0,0.7);
  color: white;
  border: 1px solid #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  padding: 0;
}

.ldm__spinner {
    position: relative;
    width: 40px;
    height: 40px;
    border: none; /* Remove default spinner border */
    background: transparent;
}

.ldm__spinner::before,
.ldm__spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation: retro-scan 2s infinite linear, retro-pulse 1.5s infinite ease-in-out;
}

.ldm__spinner::before {
    width: 30px;
    height: 30px;
    border: 2px solid limegreen;
    box-shadow: 0 0 5px limegreen, inset 0 0 5px limegreen;
    animation-delay: 0s;
    opacity: 0.8;
}

.ldm__spinner::after {
    width: 40px;
    height: 40px;
    border: 2px dashed cyan;
    box-shadow: 0 0 7px cyan, inset 0 0 7px cyan;
    animation-delay: 0.5s;
    opacity: 0.6;
}

@keyframes retro-scan {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes retro-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.ldm__text {
    font-family: 'Press Start 2P', cursive; /* A retro-style font */
    color: #eee;
    text-shadow: 0 0 5px #00f, 0 0 10px #00f, 0 0 15px #00f; /* Neon glow effect */
    animation: blink-text 1.5s infinite step-end;
}

@keyframes blink-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Loading Modal ===== */
.ldm[hidden]{ display:none !important; }
.ldm{ position:fixed; inset:0; z-index:9999; }
.ldm__backdrop{
  position:absolute; inset:0; background:rgba(0,0,0,.45); backdrop-filter:saturate(120%) blur(1px);
}
.ldm__panel{
      position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
      min-width:260px; max-width:80vw; padding:20px 24px;
      background:#121212; color:#fff; border:1px solid rgba(255,255,255,.08);
      border-radius:16px; box-shadow:0 10px 30px rgba(0,0,0,.35);
      display:flex; align-items:center; gap:16px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.checkbox-grid label, .format-as-container > label { /* Target the label inside format-as-container */
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #2a2a2a;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #444;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s;
}
.checkbox-grid label:hover, .format-as-container > label:hover {
    background-color: #3a3a3a;
}
.format-as-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    background-color: #2a2a2a;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #444;
}
.format-as-container input[type="text"] {
    flex-grow: 1;
    background: #1c1c1c;
    color: #eee;
    border: 1px solid #666;
    padding: 5px;
    border-radius: 3px;
}

.pill { padding: .5rem 1.75rem; border: 1px solid #9995; border-radius: 999px; }
#status { font-size: .9rem; opacity: .75; }
.interim { opacity: .6; }

.analysis-confirm-modal-content {
    display: flex;
    gap: 20px; /* Space between token summary and prompt */
}

.analysis-confirm-modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 10px;
}

.analysis-confirm-modal-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.analysis-confirm-modal-actions #accept-analysis {
    background-color: #28a745; /* Green for accept */
    color: white;
}

.analysis-confirm-modal-actions #decline-analysis {
    background-color: #dc3545; /* Red for decline */
    color: white;
}

#analysis-confirm-modal .analysis-confirm-modal-token-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9em;
}
#analysis-confirm-modal .analysis-confirm-modal-token-table th,
#analysis-confirm-modal .analysis-confirm-modal-token-table td {
  border: 1px solid #4a4a4a;
  padding: 6px 10px;
  text-align: left;
}
#analysis-confirm-modal .analysis-confirm-modal-token-table th {
  background-color: #333;
  font-weight: bold;
}
/* Right-align numeric columns */
#analysis-confirm-modal .analysis-confirm-modal-token-table td:nth-child(2),
#analysis-confirm-modal .analysis-confirm-modal-token-table td:nth-child(3),
#analysis-confirm-modal .analysis-confirm-modal-token-table td:nth-child(4) {
  text-align: right;
  font-family: monospace, monospace;
}
#analysis-confirm-modal .analysis-confirm-modal-token-table .total-row td {
  font-weight: bold;
  border-top: 2px solid #666;
  background-color: #2c2c2c;
}

[hidden]{ display:none !important; }

#goc-confirm-modal { max-width: 90vw; border: 1px solid #555; }
#goc-editor-content { max-height: 70vh; overflow-y: auto; padding-right: 10px; }
#goc-editor-content .goc-goal {
    background: #2a2a2a; border: 1px solid #444; border-radius: 8px; padding: 15px; margin-bottom: 20px;
}
#goc-editor-content .goc-objective {
    background: #333; border: 1px solid #555; border-radius: 6px; padding: 10px; margin-left: 20px; margin-top: 15px; margin-bottom: 15px;
}
#goc-editor-content .goc-checklist-item {
    background: #3c3c3c; border-radius: 4px; padding: 8px; margin-left: 40px; margin-top: 10px; display: flex; align-items: center; gap: 10px;
}
#goc-editor-content input[type="text"], #goc-editor-content textarea {
    width: 100%; box-sizing: border-box; background: #1c1c1c; color: #eee; border: 1px solid #666; padding: 5px; margin-bottom: 5px;
}
#goc-editor-content .goc-controls { margin-top: 10px; display:flex; gap: 8px; }
#goc-editor-content .goc-controls button, #goc-editor-content .remove-btn {
    background: #444; color: white; border: none; padding: 4px 8px; cursor: pointer; font-size: 0.8em; border-radius: 4px;
}
#goc-editor-content .remove-btn { background: #800; margin-left: auto; }
#goc-editor-content .add-btn { background: #060; }

.goc-drag-handle { cursor: grab; color: #aaa; padding: 0 8px; user-select: none; }
.goc-drag-handle:hover { color: #333; }
.goc-toggle { background: none; border: none; cursor: pointer; font-size: 1.1em; padding: 0 5px; transition: transform 0.2s; }
.goc-toggle.collapsed { transform: rotate(-90deg); }
.goal-content.collapsed, .objective-content.collapsed { display: none; }
.editable-title { cursor: pointer; padding: 2px 4px; border-radius: 3px;transition: background-color 0.2s; }
.editable-title:hover { background-color: #e0e0e0; outline: 1px dashed #aaa; }
.inline-edit-input { font-size: inherit; font-family: inherit; border: 1px solid #007bff; padding: 2px 4px; border-radius: 3px; }
.sortable-ghost { opacity: 0.4; background: #c8ebfb; border: 1px dashed #007bff; }
.checklist-item-line { display: flex; align-items: center; gap: 8px; }
.checklist-item-line .checklist-toggle-form { display: inline-flex; align-items: center; margin: 0; padding: 0; }
#goc-controls { margin: 1em 0; padding: 0.5em; background-color: #f4f6f8; border-radius: 4px; border: 1px solid #ddd; }

.search-result-item {
padding: 8px;
border-bottom: 1px solid #eee;
cursor: pointer;
}
.search-result-item:hover {
background-color: #f5f5f5;
}
.search-result-item p {
margin: 4px 0 0 0;
font-size: 0.9em;
color: #555;
}
.search-result-item mark {
background-color: #fcf8e3;
padding: 0 2px;
border-radius: 2px;
}

#settings-hamburger-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1050; /* Ensure it's above other content */
  padding: 0.5rem;
  cursor: pointer;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
}
#settings-modal {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  max-width: 500px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
#settings-modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
}
#settings-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 20px;
}
#settings-modal-header h2 {
  margin: 0;
}
#settings-checkboxes label {
  display: block;
  margin-bottom: 10px;
  cursor: pointer;
}
#file-filter-controls {
    padding: 10px;
    border-top: 1px solid #333;
    background-color: #2a2d34;
    font-size: 14px;
}

#file-filter-controls label {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
}

#file-filter-controls input[type="checkbox"] {
    margin-right: 8px;
}

#filter-banner {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #3a3d44;
    border: 1px solid #4a4d54;
    border-radius: 4px;
    color: #ccc;
}

/* Negative Constraints Modal */
#negative-constraints-modal {
    position: relative;
    width: 60%; /* Adjust as needed */
    max-width: 800px;
    background-color: #2c2c2c; /* Dark background */
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 0; /* Remove default padding */
}

#negative-constraints-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

#negative-constraints-modal .constraints-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #444;
    color: #f0f0f0;
    background-color: #383838;
    border-radius: 8px 8px 0 0;
}

#negative-constraints-modal .constraints-modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

#negative-constraints-modal .close-button {
    background: none;
    border: none;
    font-size: 1.8em;
    color: #ccc;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

#negative-constraints-modal .close-button:hover {
    color: #fff;
}

#negative-constraints-modal .constraints-modal-content {
    padding: 20px;
    color: #e0e0e0;
}

#negative-constraints-modal .constraints-modal-content > p {
    margin-bottom: 20px;
    font-style: italic;
    color: #bbb;
}

#negative-constraints-modal .constraint-category {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #333;
}

#negative-constraints-modal .constraint-category h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #a0d0ff; /* Light blue for category titles */
    font-size: 1.2em;
}

#negative-constraints-modal textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #666;
    border-radius: 4px;
    background-color: #444;
    color: #f0f0f0;
    box-sizing: border-box;
    font-size: 0.95em;
    min-height: 80px;
    margin-bottom: 10px;
    resize: vertical;
}

#negative-constraints-modal textarea::placeholder {
    color: #999;
}

#negative-constraints-modal .preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

#negative-constraints-modal .nc-preset-btn {
    background-color: #555;
    color: #fff;
    border: 1px solid #666;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
}

#negative-constraints-modal .nc-preset-btn:hover {
    background-color: #666;
    border-color: #777;
}

#negative-constraints-modal .formatting-options {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #555;
}

#negative-constraints-modal .formatting-options h4 {
    color: #e0e0e0;
    margin-bottom: 15px;
}

#negative-constraints-modal .formatting-item label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

#negative-constraints-modal .formatting-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #ff4500; /* Orange highlight */
}

#negative-constraints-modal .constraints-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #444;
    background-color: #383838;
    border-radius: 0 0 8px 8px;
}

#negative-constraints-modal .constraints-modal-actions button {
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
}

#negative-constraints-modal #apply-negative-constraints-btn {
    background-color: #ff4500; /* Orange */
    color: white;
    border: none;
}

#negative-constraints-modal #apply-negative-constraints-btn:hover {
    background-color: #e03d00;
}

#negative-constraints-modal #clear-negative-constraints-btn {
    background-color: #dc3545; /* Red */
    color: white;
    border: none;
}

#negative-constraints-modal #clear-negative-constraints-btn:hover {
    background-color: #c82333;
}