/* Bootstrap CSS Import */

/* ==================== FONTS ==================== */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url(/static/media/PlusJakartaSansVariableFont_wght.91a892b057d3b1e6c20b.ttf) format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url(/static/media/PlusJakartaSansItalicVariableFont_wght.8eca6f78230e2b1fc1f5.ttf) format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ==================== GLOBAL VARIABLES ==================== */
:root {
  /* Primary colors from Home page */
  --bs-primary: #1267B4;
  --bs-primary-hover: #0e5294;
  --bs-primary-rgb: 18, 103, 180;
  
  /* Typography - Base font size from Home */
  --font-size-base: 0.8rem;
  --font-size-large: 1.15em;
  
  /* Feature card colors from Home */
  --card-light-blue: #B8D4E3;
  --card-blue: #5B9BD5;
  --card-light-green: #C5D9B7;
  --card-light-gray: #D9D9D9;
  
  /* Spacing */
  --border-radius: 0.375rem;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ==================== GLOBAL BASE STYLES ==================== */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-size: 0.8rem;
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}

/* ==================== GLOBAL BUTTON STYLES ==================== */
.btn-primary {
  background-color: #1267B4;
  background-color: var(--bs-primary);
  border-color: #1267B4;
  border-color: var(--bs-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #0e5294;
  background-color: var(--bs-primary-hover);
  border-color: #0e5294;
  border-color: var(--bs-primary-hover);
}

.btn-outline-primary {
  color: #1267B4;
  color: var(--bs-primary);
  border-color: #1267B4;
  border-color: var(--bs-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: #1267B4;
  background-color: var(--bs-primary);
  border-color: #1267B4;
  border-color: var(--bs-primary);
}

/* ==================== CARD STYLES ==================== */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 0.375rem;
  border-radius: var(--border-radius);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
  box-shadow: var(--shadow-hover) !important;
}

/* Feature Cards from Home */
.feature-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-md);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  box-shadow: var(--shadow-lg);
}

.feature-card-light-blue {
  background-color: #B8D4E3;
  background-color: var(--card-light-blue);
}

.feature-card-blue {
  background-color: #5B9BD5;
  background-color: var(--card-blue);
}

.feature-card-light-green {
  background-color: #C5D9B7;
  background-color: var(--card-light-green);
}

.feature-card-light-gray {
  background-color: #D9D9D9;
  background-color: var(--card-light-gray);
}

.feature-icon {
  position: absolute;
  top: 15px;
  left: 15px;
}

.feature-plus-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #4A90E2;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
  color: white;
  border: 2px solid #4A90E2;
}

.feature-text {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 500;
  text-align: left;
  margin-top: 50px;
  padding-right: 10px;
}

/* Hover Cards (Subscriptions) */
.hover-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  border: 1px solid #dee2e6;
}

.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.hover-card .card-body {
  min-height: 320px;
}

.hover-card .display-3 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

/* ==================== TYPOGRAPHY ==================== */
.display-3 {
  font-weight: 700 !important;
}

/* ==================== BACKGROUNDS ==================== */
.bg-primary {
  background: linear-gradient(135deg, #1267B4 0%, #0e5294 100%) !important;
}

/* ==================== IMAGES ==================== */
.header-image {
  max-height: 400px;
  width: 100%;
  object-fit: cover;
}

.about-image {
  max-width: 100%;
  height: auto;
}

.no-subscription-logo {
  max-width: 200px;
  height: auto;
}

/* ==================== HEADER STYLES ==================== */
.navbar.bg-white {
  border-bottom: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
}

.navbar-nav .nav-link.active {
  color: #1267B4 !important;
  color: var(--bs-primary) !important;
  border-bottom: 2px solid #1267B4 !important;
  border-bottom: 2px solid var(--bs-primary) !important;
}

.navbar-brand {
  font-size: 1.15em !important;
  font-size: var(--font-size-large) !important;
}

.navbar-nav .nav-link {
  font-size: 1.15em !important;
  font-size: var(--font-size-large) !important;
}

/* ==================== FOOTER STYLES ==================== */
.footer-link {
  color: #000000 !important;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #1267B4 !important;
  color: var(--bs-primary) !important;
  text-decoration: none;
}

.footer-link.active {
  color: #1267B4 !important;
  color: var(--bs-primary) !important;
}

.footer-link .me-2 {
  font-size: 0.88em;
  color: #000000;
  transition: color 0.3s ease;
}

.footer-link:hover .me-2 {
  color: #1267B4;
  color: var(--bs-primary);
}

/* Brand icons */
.footer-link .fa-linkedin {
  color: #0077B5;
}

.footer-link .fa-twitter {
  color: #1DA1F2;
}

.footer-link .fa-facebook {
  color: #4267B2;
}

.footer-link .fa-youtube {
  color: #FF0000;
}

.footer-link:hover .fa-linkedin,
.footer-link:hover .fa-twitter,
.footer-link:hover .fa-facebook,
.footer-link:hover .fa-youtube {
  color: #1267B4;
  color: var(--bs-primary);
}

/* ==================== USER MENU STYLES ==================== */
.user-avatar-button {
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

.user-avatar-button:hover,
.user-avatar-button:focus {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1267B4, #0e5a9e);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.user-avatar:hover {
  transform: scale(1.03);
  border-color: rgba(18, 103, 180, 0.2);
  box-shadow: 0 2px 6px rgba(18, 103, 180, 0.15);
}

.user-offcanvas {
  width: 340px !important;
  border-left: 1px solid #e9ecef;
}

.user-offcanvas .offcanvas-header {
  background: white;
  color: #212529;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.user-offcanvas .offcanvas-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1267B4;
}

.user-offcanvas .btn-close {
  opacity: 0.6;
}

.user-offcanvas .btn-close:hover {
  opacity: 1;
}

.user-info-section {
  background: #f8f9fa !important;
  border-bottom: 1px solid #e9ecef !important;
}

.user-avatar-large {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1267B4, #0e5a9e);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 auto;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(18, 103, 180, 0.15);
}

.user-details {
  margin-top: 1rem;
}

.user-details .fw-bold {
  color: #212529;
  margin-bottom: 0.5rem;
}

.user-details .text-muted {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

/* ==================== SUBSCRIPTIONS PAGE ==================== */
.subscription-table-header {
  padding: 12px 16px !important;
  border-bottom: 1px solid #dee2e6 !important;
  font-weight: 600 !important;
  background-color: #f8f9fa !important;
  border-top: none !important;
}

.hover-card .btn:not(:disabled):hover {
  background-color: #1a1a1a !important;
  border-color: #1a1a1a !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hover-card .btn {
  transition: all 0.2s ease-in-out;
}

.info-icon-large {
  font-size: 1.5rem;
}

.marketplace-button:hover {
  background-color: #005a9e !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 120, 212, 0.3);
}

.marketplace-button {
  transition: all 0.2s ease-in-out;
}

.subscription-table-row {
  border-bottom: 1px solid #f8f9fa;
}

.subscription-table-row:last-child {
  border-bottom: none;
}

.subscription-table-cell {
  padding: 12px 16px;
  vertical-align: middle;
}

.subscription-plan-main {
  font-weight: 500;
  color: #212529;
}

.subscription-plan-sub {
  font-size: 0.875rem;
  color: #6c757d;
}

.subscription-quantity {
  font-weight: 500;
}

.subscription-active {
  font-weight: 500;
  color: #198754;
}

.subscription-date {
  color: #6c757d;
}

.subscription-status-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.subscription-dropdown-toggle {
  background-color: transparent !important;
  border: none !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  color: #6c757d !important;
  cursor: pointer !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.subscription-dropdown-toggle:hover,
.subscription-dropdown-toggle:focus,
.subscription-dropdown-toggle:active {
  background-color: #f8f9fa !important;
  color: #212529 !important;
  border: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.subscription-dropdown-toggle:after {
  display: none !important;
}

.subscription-table-container .dropdown-toggle:not(.dropdown-toggle-split):after {
  display: none !important;
}

.subscription-table-container .btn-link:hover {
  color: #212529 !important;
  text-decoration: none !important;
}

.subscription-table-container .btn:focus {
  box-shadow: none !important;
}

.subscription-dropdown-container .btn.dropdown-toggle {
  background-color: transparent !important;
  border-color: transparent !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

.subscription-dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  z-index: 9999 !important;
  min-width: 160px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 6px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.175);
  background-color: white;
}

.subscription-dropdown-item {
  padding: 8px 16px;
  font-size: 14px;
  color: #212529;
  text-decoration: none;
  display: block;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.subscription-dropdown-item:hover {
  background-color: #f8f9fa;
  color: #212529;
}

.subscription-dropdown-item.danger {
  color: #dc3545;
}

.subscription-dropdown-item.danger:hover {
  background-color: #f8f9fa;
  color: #dc3545;
}

.subscription-dropdown-divider {
  height: 0;
  margin: 4px 0;
  overflow: hidden;
  border-top: 1px solid #dee2e6;
}

/* ==================== WASTE CODES LIST PAGE ==================== */
.loading-container {
  min-height: 300px;
}

.table-primary th {
  background-color: #1267B4 !important;
  background-color: var(--bs-primary) !important;
  color: white !important;
  border-color: #1267B4 !important;
  border-color: var(--bs-primary) !important;
}

/* ==================== CARBOWASTE BDO PAGE ==================== */
.carbowaste-bdo-page {
  padding: 0;
  margin: 0;
  min-height: 100vh;
  position: relative;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

.carbowaste-bdo-page .d-flex {
  min-height: 100vh;
  align-items: flex-start;
}

.sidebar {
  min-width: 25%;
  max-width: 25%;
  width: 25%;
  border-right: 1px solid #dee2e6;
  background-color: #f8f9fa !important;
  padding: 1rem !important;
}

.sidebar h4 {
  color: #495057;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.sidebar h3 {
  color: #343a40;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  flex-shrink: 0;
  min-height: 2rem !important;
  display: flex !important;
  align-items: center !important;
}

.sidebar h6 {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem !important;
  margin-top: 0.25rem !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.sidebar .btn {
  border-radius: 0.375rem;
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  text-align: left;
  word-wrap: break-word;
}

.sidebar ul.list-unstyled {
  margin: 0;
  padding: 0;
  flex: 1 1;
  min-height: 0;
  overflow-y: auto;
}

.sidebar ul.list-unstyled li {
  margin-bottom: 0.125rem;
}

.toc-button {
  padding: 0.1875rem 0.25rem !important;
  color: #000 !important;
  text-decoration: none !important;
  border: none !important;
  background: transparent !important;
  font-size: 0.875rem;
  line-height: 1.2;
  display: block !important;
  width: 100% !important;
  text-align: left !important;
  font-weight: normal;
  transition: font-weight 0.2s ease-in-out, -webkit-text-decoration 0.2s ease-in-out;
  transition: text-decoration 0.2s ease-in-out, font-weight 0.2s ease-in-out;
  transition: text-decoration 0.2s ease-in-out, font-weight 0.2s ease-in-out, -webkit-text-decoration 0.2s ease-in-out;
}

.toc-button:hover {
  color: #000 !important;
  text-decoration: underline !important;
  background: transparent !important;
}

.toc-button:focus {
  color: #000 !important;
  text-decoration: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.toc-button-active {
  color: #000 !important;
  background: transparent !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.content-area {
  flex: 1 1;
  background-color: white;
  padding: 2rem;
  max-width: calc(100% - 500px);
  overflow-x: auto;
  margin: 0 !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.markdown-content {
  line-height: 1.6;
  color: #333;
  font-size: 0.8rem;
}

.markdown-content h1 {
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
}

.markdown-content h2 {
  color: #34495e;
  border-bottom: 1px solid #bdc3c7;
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

.markdown-content h3 {
  color: #34495e;
  margin-bottom: 0.75rem;
  margin-top: 1.25rem;
}

.markdown-content p {
  margin-bottom: 1rem;
  text-align: justify;
}

.markdown-content ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.markdown-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  list-style-type: decimal;
}

.markdown-content ul ul {
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  list-style-type: circle;
}

.markdown-content ol ol {
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  list-style-type: lower-alpha;
}

.markdown-content ul ol,
.markdown-content ol ul {
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

.markdown-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* ==================== RESPONSIVE STYLES ==================== */
@media (max-width: 768px) {
  .d-flex.gap-2 {
    flex-direction: column;
    gap: 0.5rem !important;
  }
  
  .d-flex.gap-2 .btn {
    width: 100%;
  }
  
  .footer-link {
    font-size: 0.72rem;
  }
  
  .container-90 {
    max-width: 95% !important;
  }
  
  .cookie-consent-banner {
    padding: 1rem;
  }
  
  .cookie-consent-banner .small {
    font-size: 0.7rem;
  }
}

/* ==================== LAYOUT STYLES ==================== */
.container-90 {
  max-width: 90% !important;
}

#root {
  height: 100vh;
}

/* ==================== COOKIE CONSENT STYLES ==================== */
.cookie-consent-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0;
}

.cookie-consent-banner {
  border-radius: 0;
  border: none;
  border-top: 3px solid #1267B4;
  border-top: 3px solid var(--bs-primary);
  margin: 0;
  padding: 1rem 1.5rem;
  background-color: rgba(248, 249, 250, 0.98);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.cookie-consent-info-icon {
  font-size: 0.96rem;
}

/* ==================== CARBOWASTE BDO PAGE STYLES ==================== */
.carbowaste-bdo-page {
    padding: 0;
    margin: 0;
    min-height: 100vh;
    position: relative;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.carbowaste-bdo-page .d-flex {
    min-height: 100vh;
    align-items: flex-start;
}

.sidebar {
    min-width:25%;
    max-width: 25%;
    width: 25%;
    border-right: 1px solid #dee2e6;
    background-color: #f8f9fa !important;
    padding: 1rem !important;
}

.sidebar h4 {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.sidebar h3 {
    color: #343a40;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    flex-shrink: 0;
    min-height: 2rem !important;
    display: flex !important;
    align-items: center !important;
}

.sidebar h6 {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem !important;
    margin-top: 0.25rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.sidebar .btn {
    border-radius: 0.375rem;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    text-align: left;
    word-wrap: break-word;
}

.sidebar ul.list-unstyled {
    margin: 0;
    padding: 0;
    flex: 1 1;
    min-height: 0;
    overflow-y: auto;
}

.sidebar ul.list-unstyled li {
    margin-bottom: 0.125rem;
}

/* Custom styles for table of contents buttons */
.toc-button {
    padding: 0.1875rem 0.25rem !important;
    color: #000 !important;
    text-decoration: none !important;
    border: none !important;
    background: transparent !important;
    font-size: 0.875rem;
    line-height: 1.2;
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    font-weight: normal;
    transition: font-weight 0.2s ease-in-out, -webkit-text-decoration 0.2s ease-in-out;
    transition: text-decoration 0.2s ease-in-out, font-weight 0.2s ease-in-out;
    transition: text-decoration 0.2s ease-in-out, font-weight 0.2s ease-in-out, -webkit-text-decoration 0.2s ease-in-out;
}

.toc-button:hover {
    color: #000 !important;
    text-decoration: underline !important;
    background: transparent !important;
}

.toc-button:focus {
    color: #000 !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.toc-button-active {
    color: #000 !important;
    background: transparent !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.content-area {
    flex: 1 1;
    background-color: white;
    padding: 2rem;
    max-width: calc(100% - 500px);
    overflow-x: auto;
    margin: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.document-content {
    line-height: 1.6;
    height: auto;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.8rem;
}

.document-content h1,
.document-content h2,
.document-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #343a40;
    font-weight: 600;
}

.document-content h1 {
    font-size: 1.6rem;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-top: 0;
}

.document-content h2 {
    font-size: 1.28rem;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.3rem;
}

.document-content h3 {
    font-size: 1.04rem;
    color: #6c757d;
}

.document-content p {
    margin-bottom: 1rem;
    color: #495057;
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.document-content strong {
    font-weight: 600;
    color: #343a40;
}

.document-content em {
    font-style: italic;
    color: #6c757d;
}

.document-content ul,
.document-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.document-content li {
    margin-bottom: 0.5rem;
    color: #495057;
}

.document-content code {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 0.125rem 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.72em;
    color: #e83e8c;
}

.document-content pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    max-width: 100%;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.document-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: #495057;
    font-size: 0.7rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.document-content a {
    color: #007bff;
    text-decoration: none;
    word-break: break-all;
    overflow-wrap: break-word;
}

.document-content a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.document-content table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    font-size: 0.8rem;
    table-layout: fixed;
}

.document-content table.table-bordered {
    border: 1px solid #dee2e6;
}

.document-content table.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.document-content table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
    vertical-align: top;
    width: auto;
}

.document-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.markdown-content table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    font-size: 0.8rem;
    table-layout: fixed;
}

.markdown-content table.table-bordered {
    border: 1px solid #dee2e6;
}

.markdown-content table.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.markdown-content table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
    vertical-align: top;
    width: auto;
}

.markdown-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* TOC Sidebar Styles - "Na tej stronie" */
.toc-sidebar {
    min-width: 200px;
    max-width: 20%;
    width: 20%;
    border-left: 1px solid #dee2e6;
    background-color: #f8f9fa !important;
    position: -webkit-sticky;
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 70px);
    height: -webkit-fit-content;
    height: fit-content;
    min-height: 200px;
    overflow-y: auto;
    z-index: 100;
    padding: 0.75rem !important;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
}

.toc-sidebar h6 {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem !important;
    background-color: #f8f9fa;
    margin-top: 0 !important;
    padding-top: 0.5rem;
    flex-shrink: 0;
}

.toc-links {
    flex: 1 1;
    overflow-y: auto;
    padding-top: 0;
}

.toc-link {
    position: relative;
    padding-top: 0.125rem;
    padding-right: 0px;
    padding-bottom: 0.125rem;
    padding-left: 0.125rem;
    margin-bottom: 0rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}

.toc-link a {
    display: block;
    color: #000 !important;
    text-decoration: none !important;
    font-size: 0.7875rem;
    line-height: 1.3;
    font-weight: normal;
    transition: font-weight 0.2s ease-in-out, color 0.2s ease-in-out;
}

.toc-link:hover {
    background-color: transparent;
}

.toc-link:hover a {
    color: #000 !important;
    font-weight: 500;
    text-decoration: none !important;
}

.toc-link-active {
    border-left-color: #000;
    background-color: transparent;
}

.toc-link-active a {
    color: #000 !important;
    font-weight: bold !important;
    text-decoration: none !important;
}

/* Level-specific indentation for TOC */
.toc-level-1 {
    padding-left: 5px;
}

.toc-level-2 {
    padding-left: 15px;
}

.toc-level-3 {
    padding-left: 20px;
}

.toc-level-4 {
    padding-left: 30px;
}

.toc-level-5 {
    padding-left: 40px;
}

.toc-level-6 {
    padding-left: 50px;
}

/* Scrollspy content area styles */
.content-area-scrollspy {
    height: auto;
    overflow-y: visible;
}

/* Document category header styling */
.category-header {
    font-weight: bold;
    color: #6c757d;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.category-header.level-0 { padding-left: 0rem; }
.category-header.level-1 { padding-left: 1rem; }
.category-header.level-2 { padding-left: 2rem; }
.category-header.level-3 { padding-left: 3rem; }
.category-header.level-4 { padding-left: 4rem; }

.toc-button.level-0 { padding-left: 0rem !important; }
.toc-button.level-1 { padding-left: 1rem !important; }
.toc-button.level-2 { padding-left: 2rem !important; }
.toc-button.level-3 { padding-left: 3rem !important; }
.toc-button.level-4 { padding-left: 4rem !important; }

/* Markdown content image styles */
.markdown-content img {
    display: block;
    margin: 1.5rem auto;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.markdown-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments for CarbowasteBdo */
@media (max-width: 1200px) {
    .toc-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        min-width: 250px;
        max-width: 280px;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .sidebar h4 {
        font-size: 0.8rem;
    }
    
    .document-content {
        font-size: 0.72rem;
    }
    
    .document-content h1 {
        font-size: 1.1rem;
    }
    
    .document-content h2 {
        font-size: 1.04rem;
    }
    
    .document-content h3 {
        font-size: 0.88rem;
    }
    
    .document-content pre {
        padding: 0.5rem;
        font-size: 0.64rem;
    }
    
    .document-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 576px) {
    .carbowaste-bdo-page {
        flex-direction: column;
    }
    
    .sidebar {
        min-width: 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .content-area {
        padding: 0.75rem;
    }
}

