body {
  font-family: 'Inter', sans-serif;
  background-color: #f8f9fa;
  overflow-x: hidden;
}

.sidebar {
  height: 100vh;
  background: #212529;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  padding-top: 40px !important;
  overflow-y: auto;
}

.main-content {
  margin-left: 240px;
  padding: 40px;
  min-height: 100vh;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 0 !important;
  padding: 0;
}

/* Navigation Styling */
.nav-link {
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-link.active {
  color: #fff !important;
  font-weight: 600;
}

/* Content Sections */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.code-output {
  background: #f1f3f5;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  min-height: 300px;
}

@media (max-width: 767.98px) {
  .sidebar {
    position: fixed;
    /* Change from relative to fixed */
    top: 0;
    width: 100%;
    height: auto;
    z-index: 1050;
    /* padding: 10px 20px !important; */
    /* Slightly smaller padding for mobile */
  }

  .main-content {
    margin-left: 0;
    padding: 80px 20px 20px 20px;
    /* Add top padding so content doesn't hide under the fixed nav */
  }

  .navbar-toggler-icon {
    filter: invert(1);
  }
}

.error-message {
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 18px;
  /* Reserves space so content doesn't shift */
  margin-top: -5px;
  /* Adjust based on your category margin */
  transition: all 0.3s ease;
}

/* Optional: Add a subtle pulse to grab attention */
.error-message:not(:empty) {
  color: #dc3545;
  animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1060;
  /* Higher than sidebar/modals */
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.cookie-banner.show {
  transform: translateY(0);
}

#closeCookies {
  letter-spacing: 1px;
  transition: transform 0.2s;
}

#closeCookies:active {
  transform: scale(0.95);
}

#tokenDetails table td:nth-child(2),
#tokenDetails table td:nth-child(3) {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}
/*
#violationChart {
  max-width: 100% !important;
  max-height: 250px !important;
}
*/
.card-header h6 {
  letter-spacing: 0.5px;
  color: #495057;
}

#prompt-readonly-view {
  display: flex;
  flex-direction: column;
}

#readonlyPromptTextarea {
  resize: none;
  /* Disable manual resizing to maintain layout integrity */
  line-height: 1.6;
  color: #212529;
  outline: none;
  box-shadow: none;
  border-radius: 8px;
}

/* Custom scrollbar for a more technical look */
#readonlyPromptTextarea::-webkit-scrollbar {
  width: 8px;
}

#readonlyPromptTextarea::-webkit-scrollbar-thumb {
  background: #ced4da;
  border-radius: 4px;
}    

.pipeline-step {
border-left: 3px solid #e9ecef;
padding-left: 20px;
position: relative;
}   

.pipeline-step::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 11px;
    height: 11px;
    background: #0d6efd;
    border-radius: 50%;
}

.pipeline-step:last-child {
    border-left-color: transparent;
}

/* Restrict the chart container size so it never grows too large */
.chart-container-block {
  height: 380px;
  position: relative;
  width: 100%;
}

/* Ensure the chart canvas respects its container limits */
#violationChart {
  max-width: 100% !important;
  max-height: 100% !important;
}

/* Limit the table's card body height on desktop so it has an internal scrollbar */
@media (min-width: 992px) {
  .scrollable-table-body {
    height: 380px; /* Perfectly matches the height of the chart next to it */
    overflow-y: auto;
    overflow-x: hidden;
  }
}

/* On mobile, let the table expand naturally down the page flow */
@media (max-width: 991.98px) {
  .scrollable-table-body {
    overflow-y: visible;
    overflow-x: hidden;
  }
}

/* Fixed Table Layout & Mobile Wobble Prevention */
#categoryBreakdownTable {
  table-layout: fixed;
  width: 100%;
}

@media (max-width: 576px) {
  #categoryBreakdownTable th, 
  #categoryBreakdownTable td {
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
    font-size: 0.75rem !important;
  }
  
  .mobile-badge-shrink {
    min-width: 75px !important;
    font-size: 0.65rem !important;
    padding: 0.25rem 0.4rem !important;
  }
  
  .mobile-progress-shrink {
    width: 40px !important;
    display: inline-block;
  }
}
