/**
 * CKAN 2.10 Compatibility Fixes for UNESCO Theme
 *
 * This file contains critical CSS fixes for compatibility with CKAN 2.10
 * and ckanext-schemingdcat plugin integration.
 *
 * Issues fixed:
 * - Facet icons not displaying in sidebar
 * - Text truncation in dataset lists
 * - Module content padding and layout
 * - Format badges visibility in dataset list
 */

/* ===== FORMAT BADGES VISIBILITY FIX - HIGHEST PRIORITY ===== */
/* This must come first for maximum specificity override */

body .dataset-item ul.dataset-resources.list-unstyled,
body li.dataset-item ul.dataset-resources.list-unstyled,
body .dataset-list .dataset-item ul.dataset-resources.list-unstyled,
body ul.dataset-list li.dataset-item ul.dataset-resources.list-unstyled {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 12px !important;
  padding: 0 !important;
  list-style: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body .dataset-item ul.dataset-resources.list-unstyled li,
body li.dataset-item ul.dataset-resources.list-unstyled li,
body .dataset-list .dataset-item ul.dataset-resources.list-unstyled li,
body ul.dataset-list li.dataset-item ul.dataset-resources.list-unstyled li {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
}

body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label,
body li.dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label,
body .dataset-list .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label,
body ul.dataset-list li.dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label,
body ul.dataset-resources li a.label.badge-label,
body .dataset-resources li a.label.badge-label,
body a.label.badge-label {
  display: inline-block !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  border-radius: 3px !important;
  color: white !important;
  text-decoration: none !important;
  /* Removed background-color to let schemingdcat CSS handle format-specific colors */
  visibility: visible !important;
  opacity: 1 !important;
  line-height: 1.4 !important;
  min-width: 20px !important;
  min-height: 18px !important;
  text-align: center !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Default background for badges without specific format color */
body a.label.badge-label:not([data-format]),
body ul.dataset-resources li a.label.badge-label:not([data-format]) {
  background-color: #6c757d !important;
}

/* Format-specific colors - must have same or higher specificity than general rule */
/* CSV - Green */
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="csv"],
body ul.dataset-resources li a.label.badge-label[data-format="csv"],
body a.label.badge-label[data-format="csv"],
a.label.badge-label[data-format="csv"] {
  background-color: #28a745 !important;
}

/* JSON - Yellow/Orange */
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="json"],
body ul.dataset-resources li a.label.badge-label[data-format="json"],
body a.label.badge-label[data-format="json"],
a.label.badge-label[data-format="json"] {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

/* PDF - Red */
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="pdf"],
body ul.dataset-resources li a.label.badge-label[data-format="pdf"],
body a.label.badge-label[data-format="pdf"],
a.label.badge-label[data-format="pdf"] {
  background-color: #dc3545 !important;
}

/* XLS/XLSX - Cyan */
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="xls"],
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="xlsx"],
body ul.dataset-resources li a.label.badge-label[data-format="xls"],
body ul.dataset-resources li a.label.badge-label[data-format="xlsx"],
body a.label.badge-label[data-format="xls"],
body a.label.badge-label[data-format="xlsx"],
a.label.badge-label[data-format="xls"],
a.label.badge-label[data-format="xlsx"] {
  background-color: #17a2b8 !important;
}

/* SHP - Teal */
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="shp"],
body ul.dataset-resources li a.label.badge-label[data-format="shp"],
body a.label.badge-label[data-format="shp"],
a.label.badge-label[data-format="shp"] {
  background-color: #36849a !important;
}

/* TIF/TIFF/GeoTIFF - Purple */
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="tif"],
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="tiff"],
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="geotiff"],
body ul.dataset-resources li a.label.badge-label[data-format="tif"],
body ul.dataset-resources li a.label.badge-label[data-format="tiff"],
body ul.dataset-resources li a.label.badge-label[data-format="geotiff"],
body a.label.badge-label[data-format="tif"],
body a.label.badge-label[data-format="tiff"],
body a.label.badge-label[data-format="geotiff"],
a.label.badge-label[data-format="tif"],
a.label.badge-label[data-format="tiff"],
a.label.badge-label[data-format="geotiff"] {
  background-color: #6f42c1 !important;
}

/* XML - Orange */
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="xml"],
body ul.dataset-resources li a.label.badge-label[data-format="xml"],
body a.label.badge-label[data-format="xml"],
a.label.badge-label[data-format="xml"] {
  background-color: #fd7e14 !important;
}

/* SLD - Brown */
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="sld"],
body ul.dataset-resources li a.label.badge-label[data-format="sld"],
body a.label.badge-label[data-format="sld"],
a.label.badge-label[data-format="sld"] {
  background-color: #8B4513 !important;
}

/* ZIP - Dark Gray */
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="zip"],
body ul.dataset-resources li a.label.badge-label[data-format="zip"],
body a.label.badge-label[data-format="zip"],
a.label.badge-label[data-format="zip"] {
  background-color: #5a5a5a !important;
}

/* WMS - Blue */
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="wms"],
body ul.dataset-resources li a.label.badge-label[data-format="wms"],
body a.label.badge-label[data-format="wms"],
a.label.badge-label[data-format="wms"] {
  background-color: #0069B4 !important;
}

/* API - Pink */
body .dataset-item ul.dataset-resources.list-unstyled li a.label.badge-label[data-format="api"],
body ul.dataset-resources li a.label.badge-label[data-format="api"],
body a.label.badge-label[data-format="api"],
a.label.badge-label[data-format="api"] {
  background-color: #e83e8c !important;
}

/* ===== DATASET ITEM HEIGHT FIX - CRITICAL ===== */
/* Fix for dataset items not expanding to show format badges */

body .dataset-list .dataset-item,
body ul.dataset-list li.dataset-item,
body li.dataset-item {
  min-height: auto !important;
  height: auto !important;
  overflow: visible !important;
  display: block !important; /* Override flex-direction: column which causes issues */
}

body .dataset-list .dataset-item .row,
body ul.dataset-list li.dataset-item .row,
body li.dataset-item .row,
body .dataset-item > .row {
  min-height: auto !important;
  height: auto !important;
  overflow: visible !important;
  display: flex !important;
  flex-wrap: wrap !important;
}

body .dataset-list .dataset-item .col-md-12,
body .dataset-list .dataset-item .col-md-12.d-flex,
body ul.dataset-list li.dataset-item .col-md-12,
body ul.dataset-list li.dataset-item .col-md-12.d-flex,
body li.dataset-item .col-md-12,
body li.dataset-item .col-md-12.d-flex,
body .dataset-item .col-md-12.d-flex {
  min-height: auto !important;
  height: auto !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
}

body .dataset-list .dataset-item .dataset-content,
body ul.dataset-list li.dataset-item .dataset-content,
body li.dataset-item .dataset-content,
body .dataset-item .dataset-content {
  flex: 1 1 auto !important;
  min-height: auto !important;
  height: auto !important;
  overflow: visible !important;
  display: block !important; /* Use block instead of flex-column to ensure natural flow */
}

/* Ensure resources list is visible at the bottom of dataset-content */
body .dataset-item .dataset-content ul.dataset-resources,
body .dataset-item ul.dataset-resources.list-unstyled {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 12px !important;
  padding: 0 !important;
  list-style: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
}

/* ===== FACET ICONS FIX - CRITICAL FOR CKAN 2.10 ===== */

/* Base facet icon styles with maximum specificity for CKAN 2.10 */
.secondary img.facet-icon,
.secondary .module img.facet-icon,
.secondary .module-content img.facet-icon,
.secondary .nav-facet img.facet-icon,
.secondary nav.nav-facet li a img.facet-icon,
.filters img.facet-icon,
.filters .module img.facet-icon,
.filters .module-content img.facet-icon,
.filters .nav-facet img.facet-icon,
nav.nav-facet li a img.facet-icon,
ul.nav-facet li a img.facet-icon,
.module-content .nav-facet li a img.facet-icon,
img.facet-icon {
  display: inline-block !important;
  width: 1.3em !important;
  height: 1.3em !important;
  min-width: 1.3em !important;
  min-height: 1.3em !important;
  max-width: 20px !important;
  max-height: 20px !important;
  margin-right: 8px !important;
  border-radius: 50% !important;
  vertical-align: middle !important;
  object-fit: contain !important;
  opacity: 1 !important;
  visibility: visible !important;
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Ensure parent containers don't hide the icons */
.secondary .module-content,
.secondary .nav-facet,
.secondary nav,
.filters .module-content,
.filters .nav-facet,
.filters nav {
  overflow: visible !important;
}

/* Fix nav-facet list items for icon display */
.secondary .nav-facet li,
.secondary nav.nav-facet li,
.filters .nav-facet li,
.filters nav.nav-facet li,
nav.nav-facet li {
  display: block !important;
  overflow: visible !important;
  position: relative !important;
}

/* Facet links with proper flex layout for icons */
.secondary .nav-facet li a,
.secondary nav.nav-facet li a,
.filters .nav-facet li a,
.filters nav.nav-facet li a,
nav.nav-facet li a {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  padding: 8px 5px !important;
  color: #495057 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  border-radius: 4px !important;
  margin: 2px 0 !important;
  position: relative !important;
  overflow: visible !important;
}

.secondary .nav-facet li a:hover,
.secondary nav.nav-facet li a:hover,
.filters .nav-facet li a:hover,
.filters nav.nav-facet li a:hover,
nav.nav-facet li a:hover {
  background-color: rgba(0, 105, 180, 0.08) !important;
  color: #0069B4 !important;
}

.secondary .nav-facet li.active a,
.secondary nav.nav-facet li.active a,
.filters .nav-facet li.active a,
.filters nav.nav-facet li.active a,
nav.nav-facet li.active a {
  background-color: rgba(0, 105, 180, 0.12) !important;
  color: #0069B4 !important;
  font-weight: 600 !important;
}

/* Item label text - prevent excessive truncation */
.secondary .nav-facet li a .item-label,
.secondary nav.nav-facet li a .item-label,
.filters .nav-facet li a .item-label,
.filters nav.nav-facet li a .item-label,
nav.nav-facet li a .item-label,
.nav-facet .item-label {
  flex: 1 1 auto !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;  /* Changed from nowrap to normal for better text display */
  font-size: 13px !important;
  line-height: 1.4 !important;  /* Better line height for readability */
  max-width: 100% !important;
}

/* Badge/count */
.secondary .nav-facet li a .badge,
.secondary nav.nav-facet li a .badge,
.secondary .nav-facet li a .item-count,
.secondary nav.nav-facet li a .item-count,
.filters .nav-facet li a .badge,
.filters nav.nav-facet li a .badge,
.filters .nav-facet li a .item-count,
.filters nav.nav-facet li a .item-count,
nav.nav-facet li a .badge,
nav.nav-facet li a .item-count {
  flex-shrink: 0 !important;
  margin-left: auto !important;
  padding: 2px 8px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  background-color: #e9ecef !important;
  color: #495057 !important;
  border-radius: 10px !important;
  min-width: 24px !important;  /* Ensure badge doesn't collapse */
  text-align: center !important;
}

.secondary .nav-facet li.active a .badge,
.secondary nav.nav-facet li.active a .badge,
.filters .nav-facet li.active a .badge,
.filters nav.nav-facet li.active a .badge,
nav.nav-facet li.active a .badge {
  background-color: #0069B4 !important;
  color: white !important;
}

/* Separator - hide it */
.secondary .nav-facet li a .separator,
.secondary nav.nav-facet li a .separator,
.filters .nav-facet li a .separator,
.filters nav.nav-facet li a .separator,
nav.nav-facet li a .separator {
  display: none !important;
}

/* ===== DATASET LIST TEXT TRUNCATION FIX ===== */

/* Dataset item headings - prevent excessive truncation */
.dataset-list .dataset-item .dataset-heading,
.dataset-item .dataset-heading,
.dataset-item h2.dataset-heading,
.dataset-item h3.dataset-heading {
  margin: 0 0 10px 0 !important;
  font-size: 18px !important;
  line-height: 1.4 !important;
  overflow: visible !important;  /* Don't hide overflow */
  white-space: normal !important;  /* Allow text wrapping */
  text-overflow: clip !important;  /* Don't use ellipsis */
}

/* Dataset content/notes - allow better text display */
.dataset-item .dataset-content,
.dataset-item .notes {
  color: #6c757d !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  margin-bottom: 15px !important;
  max-height: none !important;  /* Remove height restriction */
  overflow: visible !important;  /* Show all text */
  text-overflow: clip !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;  /* Limit to 3 lines but show full words */
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* ===== MODULE CONTENT FIXES ===== */

/* Fix module content padding for proper display */
.secondary .module-content {
  padding: 12px 15px !important;
  overflow: visible !important;
}

.filters .module-content {
  padding: 12px 15px !important;
  overflow: visible !important;
}

/* Module headings */
.secondary .module-heading,
.filters .module-heading {
  background: #f8f9fa !important;
  border-bottom: 1px solid #e9ecef !important;
  padding: 12px 15px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #495057 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* ===== SIDEBAR MODULE FIXES ===== */

/* Fix sidebar module styling for CKAN 2.10 */
.secondary .module.module-narrow {
  background: #fff !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
  margin-bottom: 15px !important;
  overflow: visible !important;
}

/* Module footer */
.secondary .module-footer,
.filters .module-footer {
  padding: 10px 15px !important;
  border-top: 1px solid #e9ecef !important;
  background-color: #fafafa !important;
  text-align: center !important;
}

.secondary .module-footer a,
.filters .module-footer a,
.module-footer a.read-more {
  color: #0069B4 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

.secondary .module-footer a:hover,
.filters .module-footer a:hover,
.module-footer a.read-more:hover {
  text-decoration: underline !important;
}

/* ===== DATASET CATEGORIES ICONS FIX ===== */

/* Ensure category icons display properly on dataset items */
.dataset-categories {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  margin-top: 10px !important;
}

.dataset-categories a,
.dataset-categories img {
  display: inline-block !important;
  width: 40px !important;
  height: 40px !important;
  object-fit: contain !important;
  border-radius: 4px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Category spatial_uri images */
.category-spatial_uri {
  width: 40px !important;
  height: 40px !important;
  background-repeat: no-repeat !important;
  background-size: 30px auto !important;
  background-position: center center !important;
  object-fit: contain !important;
  display: inline-block !important;
}

/* ===== RESPONSIVE FIXES ===== */

@media (max-width: 768px) {
  /* Adjust facet icons for mobile */
  .secondary .nav-facet li a img.facet-icon,
  .filters .nav-facet li a img.facet-icon,
  nav.nav-facet li a img.facet-icon,
  img.facet-icon {
    width: 1.2em !important;
    height: 1.2em !important;
    max-width: 18px !important;
    max-height: 18px !important;
    margin-right: 6px !important;
  }

  /* Adjust module content padding for mobile */
  .secondary .module-content,
  .filters .module-content {
    padding: 10px 12px !important;
  }

  /* Hide category icons on very small screens if needed */
  .dataset-categories a,
  .category-spatial_uri {
    width: 32px !important;
    height: 32px !important;
    background-size: 24px auto !important;
  }
}

/* ===== ADDITIONAL SCHEMINGDCAT COMPATIBILITY ===== */

/* Ensure scheming icon list displays correctly */
.scheming-icon-list {
  list-style-type: none !important;
  padding-left: 1em !important;
  line-height: 2em !important;
}

.scheming-icon-list-icon {
  vertical-align: middle !important;
  height: 1.6em !important;
  display: inline-block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Spatial URI icons */
img.spatial_uri-icon {
  vertical-align: middle !important;
  height: 1.6em !important;
  display: inline-block !important;
  border-radius: 50% !important;
  margin-left: 1em !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ===== SEARCH FORM FIXES ===== */

/* Fix search heading with sorting controls */
.module-heading.search_heading {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
}

.search_heading_span {
  flex: 1 1 auto !important;
  min-width: 50% !important;
}

.sorting_heading {
  display: flex !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
}

/* Sorting controls */
.filters .module .sorting {
  position: relative !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 5px !important;
  background-color: rgba(255,255,255,0.7) !important;
  border: 1px solid #ffffff !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.filters .module .sorting:hover {
  border: 1px solid #000 !important;
  background-color: rgba(255,255,255,0.9) !important;
}

/* ===== FORCE VISIBILITY OF ALL IMAGES IN SIDEBAR ===== */

/* Nuclear option: force all images in secondary sidebar to be visible */
.secondary img,
.filters img {
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-block !important;
  max-width: 100% !important;
}

/* Ensure nav items don't hide content */
.secondary .nav-item,
.filters .nav-item,
.secondary nav li,
.filters nav li {
  overflow: visible !important;
  position: relative !important;
}

/* Ensure links in nav don't hide images */
.secondary .nav-item a,
.filters .nav-item a,
.secondary nav li a,
.filters nav li a {
  overflow: visible !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

/* ===== DATASET SEARCH PAGE LAYOUT FIXES ===== */

/* Add spacing between sidebar and dataset list - fix for datasets being too close to sidebar */
.primary .module-content {
  padding-left: 20px !important;
  padding-right: 20px !important;
  padding-top: 5px !important;
}

/* Fix dataset item layout to show icon and content properly */
.dataset-list .dataset-item .row,
li.dataset-item .row {
  display: flex !important;
  align-items: stretch !important;
}

.dataset-list .dataset-item .col-md-12,
li.dataset-item .col-md-12,
.dataset-list .dataset-item .col-md-12.d-flex,
li.dataset-item .col-md-12.d-flex {
  display: flex !important;
  flex-direction: row !important;
  width: 100% !important;
  min-height: auto !important;
  height: auto !important;
  align-items: stretch !important;
}

/* Dataset content takes most space and should expand to show all content */
.dataset-list .dataset-item .dataset-content,
li.dataset-item .dataset-content {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  padding-right: 15px !important;
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: auto !important;
}

/* Ensure dataset heading doesn't shrink */
.dataset-list .dataset-item .dataset-content .dataset-heading,
li.dataset-item .dataset-content .dataset-heading {
  flex-shrink: 0 !important;
}

/* Ensure description doesn't shrink */
.dataset-list .dataset-item .dataset-content > div,
li.dataset-item .dataset-content > div {
  flex-shrink: 0 !important;
}

/* Dataset resources list should be at the bottom and fully visible */
.dataset-list .dataset-item .dataset-content ul.dataset-resources,
li.dataset-item .dataset-content ul.dataset-resources,
.dataset-content ul.dataset-resources.list-unstyled {
  flex-shrink: 0 !important;
  margin-top: auto !important;
  padding-top: 10px !important;
}

/* Dataset categories (INSPIRE icon) fixed width on the right */
.dataset-list .dataset-item .dataset-categories,
li.dataset-item .dataset-categories,
.dataset-categories {
  flex: 0 0 auto !important;
  width: 50px !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: flex-start !important;
  padding-top: 5px !important;
}

/* Ensure category icons display properly */
.category-theme,
.category-theme_eu,
.category-theme_es,
a.category-theme,
a.category-theme_eu,
a.category-theme_es {
  display: block !important;
  width: 40px !important;
  height: 40px !important;
  background-repeat: no-repeat !important;
  background-size: 30px auto !important;
  background-position: center center !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Resource format badges/tags in dataset list */
.dataset-list .dataset-item .dataset-resources ul,
li.dataset-item .dataset-resources ul,
ul.dataset-resources {
  list-style: none !important;
  padding: 0 !important;
  margin: 10px 0 0 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

.dataset-list .dataset-item .dataset-resources li,
li.dataset-item .dataset-resources li,
ul.dataset-resources li {
  list-style: none !important;
  display: inline-block !important;
  margin: 0 !important;
}

.dataset-list .dataset-item .dataset-resources a.badge-label,
.dataset-list .dataset-item .dataset-resources a.label,
.dataset-list .dataset-item .dataset-resources .label,
li.dataset-item .dataset-resources a.badge-label,
li.dataset-item .dataset-resources a.label,
li.dataset-item .dataset-resources .label,
ul.dataset-resources a.badge-label,
ul.dataset-resources a.label,
ul.dataset-resources .label,
a.badge-label,
.badge-label {
  display: inline-block !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  border-radius: 3px !important;
  color: white !important;
  text-decoration: none !important;
  background-color: #6c757d !important;
  transition: all 0.2s ease !important;
}

.dataset-resources a.badge-label:hover,
.dataset-resources a.label:hover,
a.badge-label:hover {
  opacity: 0.85 !important;
  transform: translateY(-1px) !important;
}

/* Format-specific colors for resource badges */
a.badge-label[data-format="csv"],
a.badge-label[data-format*="csv"],
a.label[data-format="csv"],
a.label[data-format*="csv"] {
  background-color: #28a745 !important;
}

a.badge-label[data-format="json"],
a.badge-label[data-format*="json"],
a.label[data-format="json"],
a.label[data-format*="json"] {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

a.badge-label[data-format="pdf"],
a.badge-label[data-format*="pdf"],
a.label[data-format="pdf"],
a.label[data-format*="pdf"] {
  background-color: #dc3545 !important;
}

a.badge-label[data-format="xls"],
a.badge-label[data-format*="xls"],
a.badge-label[data-format*="xlsx"],
a.label[data-format="xls"],
a.label[data-format*="xls"],
a.label[data-format*="xlsx"] {
  background-color: #17a2b8 !important;
}

a.badge-label[data-format="xml"],
a.badge-label[data-format*="xml"],
a.label[data-format="xml"],
a.label[data-format*="xml"] {
  background-color: #fd7e14 !important;
}

a.badge-label[data-format="tif"],
a.badge-label[data-format*="tif"],
a.badge-label[data-format*="tiff"],
a.badge-label[data-format*="geotiff"],
a.label[data-format="tif"],
a.label[data-format*="tif"],
a.label[data-format*="tiff"],
a.label[data-format*="geotiff"] {
  background-color: #6f42c1 !important;
}

a.badge-label[data-format="shp"],
a.badge-label[data-format*="shp"],
a.badge-label[data-format*="shapefile"],
a.label[data-format="shp"],
a.label[data-format*="shp"],
a.label[data-format*="shapefile"] {
  background-color: #20c997 !important;
}

a.badge-label[data-format="zip"],
a.badge-label[data-format*="zip"],
a.label[data-format="zip"],
a.label[data-format*="zip"] {
  background-color: #6c757d !important;
}

a.badge-label[data-format="wms"],
a.badge-label[data-format*="wms"],
a.label[data-format="wms"],
a.label[data-format*="wms"] {
  background-color: #0069B4 !important;
}

a.badge-label[data-format="api"],
a.badge-label[data-format*="api"],
a.label[data-format="api"],
a.label[data-format*="api"] {
  background-color: #e83e8c !important;
}

/* Fix for very narrow viewports */
@media (max-width: 992px) {
  .primary .module-content {
    padding-left: 15px !important;
  }
  
  .dataset-categories {
    display: none !important;
  }
}

@media (min-width: 993px) {
  /* Ensure proper spacing between columns */
  .row .primary {
    padding-left: 30px !important;
  }
}

/* ===== FORCE VISIBILITY OF FORMAT BADGES - CRITICAL FIX ===== */

/* Ultra-specific selectors to force format badges to show */
.dataset-item ul.dataset-resources,
.dataset-item .dataset-resources,
li.dataset-item ul.dataset-resources,
li.dataset-item .dataset-resources,
.dataset-list .dataset-item ul.dataset-resources,
.dataset-list .dataset-item .dataset-resources,
ul.dataset-resources.list-unstyled,
.dataset-resources.list-unstyled {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 12px !important;
  padding: 0 !important;
  list-style: none !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.dataset-item ul.dataset-resources li,
.dataset-item .dataset-resources li,
li.dataset-item ul.dataset-resources li,
li.dataset-item .dataset-resources li,
.dataset-list .dataset-item ul.dataset-resources li,
.dataset-list .dataset-item .dataset-resources li,
ul.dataset-resources.list-unstyled li,
.dataset-resources.list-unstyled li {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.dataset-item ul.dataset-resources li a,
.dataset-item .dataset-resources li a,
li.dataset-item ul.dataset-resources li a,
li.dataset-item .dataset-resources li a,
.dataset-list .dataset-item ul.dataset-resources li a,
.dataset-list .dataset-item .dataset-resources li a,
ul.dataset-resources.list-unstyled li a,
.dataset-resources.list-unstyled li a,
ul.dataset-resources li a.label,
ul.dataset-resources li a.badge-label,
.dataset-resources li a.label,
.dataset-resources li a.badge-label,
a.label.badge-label[data-format],
a.label[data-format],
a.badge-label[data-format] {
  display: inline-block !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  border-radius: 3px !important;
  color: white !important;
  text-decoration: none !important;
  background-color: #6c757d !important;
  visibility: visible !important;
  opacity: 1 !important;
  line-height: 1.4 !important;
  min-width: 20px !important;
  text-align: center !important;
}

/* Format-specific colors with maximum specificity */
ul.dataset-resources li a.label[data-format="csv"],
ul.dataset-resources li a.badge-label[data-format="csv"],
.dataset-resources li a.label[data-format="csv"],
.dataset-resources li a.badge-label[data-format="csv"],
a.label.badge-label[data-format="csv"],
a.label[data-format="csv"],
a.badge-label[data-format="csv"] {
  background-color: #28a745 !important;
}

ul.dataset-resources li a.label[data-format="json"],
ul.dataset-resources li a.badge-label[data-format="json"],
.dataset-resources li a.label[data-format="json"],
.dataset-resources li a.badge-label[data-format="json"],
a.label.badge-label[data-format="json"],
a.label[data-format="json"],
a.badge-label[data-format="json"] {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

ul.dataset-resources li a.label[data-format="pdf"],
ul.dataset-resources li a.badge-label[data-format="pdf"],
.dataset-resources li a.label[data-format="pdf"],
.dataset-resources li a.badge-label[data-format="pdf"],
a.label.badge-label[data-format="pdf"],
a.label[data-format="pdf"],
a.badge-label[data-format="pdf"] {
  background-color: #dc3545 !important;
}

ul.dataset-resources li a.label[data-format="xls"],
ul.dataset-resources li a.badge-label[data-format="xls"],
ul.dataset-resources li a.label[data-format="xlsx"],
ul.dataset-resources li a.badge-label[data-format="xlsx"],
.dataset-resources li a.label[data-format="xls"],
.dataset-resources li a.badge-label[data-format="xls"],
.dataset-resources li a.label[data-format="xlsx"],
.dataset-resources li a.badge-label[data-format="xlsx"],
a.label.badge-label[data-format="xls"],
a.label[data-format="xls"],
a.badge-label[data-format="xls"],
a.label.badge-label[data-format="xlsx"],
a.label[data-format="xlsx"],
a.badge-label[data-format="xlsx"] {
  background-color: #17a2b8 !important;
}

ul.dataset-resources li a.label[data-format="shp"],
ul.dataset-resources li a.badge-label[data-format="shp"],
.dataset-resources li a.label[data-format="shp"],
.dataset-resources li a.badge-label[data-format="shp"],
a.label.badge-label[data-format="shp"],
a.label[data-format="shp"],
a.badge-label[data-format="shp"] {
  background-color: #36849a !important;
}

ul.dataset-resources li a.label[data-format="tif"],
ul.dataset-resources li a.badge-label[data-format="tif"],
ul.dataset-resources li a.label[data-format="tiff"],
ul.dataset-resources li a.badge-label[data-format="tiff"],
ul.dataset-resources li a.label[data-format="geotiff"],
ul.dataset-resources li a.badge-label[data-format="geotiff"],
.dataset-resources li a.label[data-format="tif"],
.dataset-resources li a.badge-label[data-format="tif"],
.dataset-resources li a.label[data-format="tiff"],
.dataset-resources li a.badge-label[data-format="tiff"],
a.label.badge-label[data-format="tif"],
a.label[data-format="tif"],
a.badge-label[data-format="tif"],
a.label.badge-label[data-format="tiff"],
a.label[data-format="tiff"],
a.badge-label[data-format="tiff"],
a.label.badge-label[data-format="geotiff"],
a.label[data-format="geotiff"],
a.badge-label[data-format="geotiff"] {
  background-color: #6f42c1 !important;
}

ul.dataset-resources li a.label[data-format="xml"],
ul.dataset-resources li a.badge-label[data-format="xml"],
.dataset-resources li a.label[data-format="xml"],
.dataset-resources li a.badge-label[data-format="xml"],
a.label.badge-label[data-format="xml"],
a.label[data-format="xml"],
a.badge-label[data-format="xml"] {
  background-color: #fd7e14 !important;
}

ul.dataset-resources li a.label[data-format="zip"],
ul.dataset-resources li a.badge-label[data-format="zip"],
.dataset-resources li a.label[data-format="zip"],
.dataset-resources li a.badge-label[data-format="zip"],
a.label.badge-label[data-format="zip"],
a.label[data-format="zip"],
a.badge-label[data-format="zip"] {
  background-color: #6c757d !important;
}

ul.dataset-resources li a.label[data-format="wms"],
ul.dataset-resources li a.badge-label[data-format="wms"],
.dataset-resources li a.label[data-format="wms"],
.dataset-resources li a.badge-label[data-format="wms"],
a.label.badge-label[data-format="wms"],
a.label[data-format="wms"],
a.badge-label[data-format="wms"] {
  background-color: #0069B4 !important;
}

ul.dataset-resources li a.label[data-format="api"],
ul.dataset-resources li a.badge-label[data-format="api"],
.dataset-resources li a.label[data-format="api"],
.dataset-resources li a.badge-label[data-format="api"],
a.label.badge-label[data-format="api"],
a.label[data-format="api"],
a.badge-label[data-format="api"] {
  background-color: #e83e8c !important;
}

/* Hover effect for format badges */
ul.dataset-resources li a:hover,
.dataset-resources li a:hover,
a.label.badge-label[data-format]:hover,
a.label[data-format]:hover,
a.badge-label[data-format]:hover {
  opacity: 0.85 !important;
  text-decoration: none !important;
  transform: translateY(-1px) !important;
}

/* ===== SEARCH CONFIG OR/AND BUTTONS - CONTRAST FIX ===== */

/* Container styling */
body .filters .container__filter__type__search_and__or,
body .secondary .container__filter__type__search_and__or,
.container__filter__type__search_and__or {
  display: flex !important;
  justify-content: center !important;
  gap: 0 !important;
  margin: 15px 0 !important;
}

/* Button group styling */
body .filters .container__filter__type__search_and__or .btn-group,
body .secondary .container__filter__type__search_and__or .btn-group,
.container__filter__type__search_and__or .btn-group {
  display: flex !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Base button styles */
body .filters .container__filter__type__search_and__or .btn,
body .secondary .container__filter__type__search_and__or .btn,
.container__filter__type__search_and__or .btn {
  padding: 8px 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 0 !important;
  transition: all 0.2s ease !important;
}

/* Inactive button - light gray background with dark text */
body .filters .container__filter__type__search_and__or .btn:not(.active),
body .secondary .container__filter__type__search_and__or .btn:not(.active),
.container__filter__type__search_and__or .btn:not(.active) {
  background-color: #f8f9fa !important;
  border-color: #dee2e6 !important;
  color: #495057 !important;
}

body .filters .container__filter__type__search_and__or .btn:not(.active) a,
body .secondary .container__filter__type__search_and__or .btn:not(.active) a,
.container__filter__type__search_and__or .btn:not(.active) a {
  color: #495057 !important;
  text-decoration: none !important;
}

/* Active button - UNESCO blue background with white text */
body .filters .container__filter__type__search_and__or .btn.active,
body .secondary .container__filter__type__search_and__or .btn.active,
.container__filter__type__search_and__or .btn.active {
  background-color: #0069B4 !important;
  border-color: #0069B4 !important;
  color: white !important;
}

body .filters .container__filter__type__search_and__or .btn.active a,
body .secondary .container__filter__type__search_and__or .btn.active a,
.container__filter__type__search_and__or .btn.active a {
  color: white !important;
  text-decoration: none !important;
}

/* Hover states */
body .filters .container__filter__type__search_and__or .btn:not(.active):hover,
body .secondary .container__filter__type__search_and__or .btn:not(.active):hover,
.container__filter__type__search_and__or .btn:not(.active):hover {
  background-color: #e9ecef !important;
  border-color: #ced4da !important;
}

body .filters .container__filter__type__search_and__or .btn.active:hover,
body .secondary .container__filter__type__search_and__or .btn.active:hover,
.container__filter__type__search_and__or .btn.active:hover {
  background-color: #005a9e !important;
  border-color: #005a9e !important;
}

/* First and last button border radius */
body .container__filter__type__search_and__or .btn-group .btn:first-child,
.container__filter__type__search_and__or .btn-group .btn:first-child {
  border-radius: 6px 0 0 6px !important;
}

body .container__filter__type__search_and__or .btn-group .btn:last-child,
.container__filter__type__search_and__or .btn-group .btn:last-child {
  border-radius: 0 6px 6px 0 !important;
}

/* ===== DATASET PAGE - RESOURCE LIST FIX ===== */
/* Complete rewrite for proper layout and dropdown positioning */

/* Resource list container */
body ul.resource-list,
body .resource-list,
html body ul.resource-list,
html body .resource-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 20px 0 !important;
}

/* Individual resource item - Enhanced with better visual feedback */
body ul.resource-list li.resource-item,
body .resource-list .resource-item,
body li.resource-item,
html body ul.resource-list li.resource-item,
html body .resource-list .resource-item,
html body li.resource-item {
  background: #fff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 8px !important;
  margin-bottom: 14px !important;
  padding: 18px 22px !important;
  transition: all 0.25s ease !important;
  position: relative !important;
  overflow: visible !important;
  z-index: 1 !important;
}

body ul.resource-list li.resource-item:hover,
body .resource-list .resource-item:hover,
body li.resource-item:hover,
html body ul.resource-list li.resource-item:hover,
html body .resource-list .resource-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  border-color: #0069B4 !important;
  transform: translateY(-2px) !important;
  z-index: 100 !important;
}

body ul.resource-list li.resource-item:active,
body .resource-list .resource-item:active,
body li.resource-item:active {
  transform: translateY(0) !important;
}

/* When dropdown is open, ensure high z-index */
body ul.resource-list li.resource-item:has(.dropdown.open),
body ul.resource-list li.resource-item:has(.dropdown-menu.show),
body .resource-list .resource-item:has(.dropdown.open),
body .resource-list .resource-item:has(.dropdown-menu.show),
body li.resource-item:has(.dropdown.open),
body li.resource-item:has(.dropdown-menu.show) {
  z-index: 1000 !important;
}

/* ===== RESOURCE LIST LAYOUT REDESIGN ===== */
/* Matching the requested layout: Icon left, Title/Desc right stacked */

/* 1. Grid Container */
body ul.resource-list li.resource-item,
body .resource-list .resource-item,
.resource-item {
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  grid-template-rows: auto auto !important;
  gap: 8px 15px !important;
  align-items: start !important;
  padding: 15px 20px !important;
}

/* 2. Unwrap resource-title-row to allow grid placement of children */
body .resource-item .resource-title-row,
html body .resource-item .resource-title-row,
.resource-item .resource-title-row {
  display: contents !important;
}

/* 3. Icon (Format Label) - Col 1, Row 1-2 */
body .resource-item .resource-title-row .format-label,
html body .resource-item .resource-title-row .format-label,
.resource-item .resource-title-row .format-label,
span.format-label[property="dc:format"] {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
  align-self: center !important;
  justify-self: start !important;

  /* Text-based format label styling */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  min-width: 56px !important;
  padding: 8px 14px !important;
  margin: 0 !important;

  /* Typography */
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;

  /* Colors - white text on colored background */
  color: #ffffff !important;

  /* Styling */
  border: none !important;
  border-radius: 6px !important;

  position: relative !important;
  z-index: 1 !important;
  overflow: visible !important;

  /* Smooth transitions */
  transition: all 0.2s ease !important;
}

/* Hover effect for format labels */
body .resource-item .resource-title-row .format-label:hover,
.resource-item .resource-title-row .format-label:hover {
  transform: translateY(-2px) !important;
}

/* Fix for non-sprite icons (images) */
body .resource-item .resource-title-row .format-label:has(img),
.resource-item .resource-title-row .format-label:has(img) {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  transform: none !important;
  margin: 0 !important;
  background: none !important;
  display: flex !important;
  align-items: center !important;
}

body .resource-item .resource-title-row .format-label img,
.resource-item .resource-title-row .format-label img {
  max-width: 40px !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
}

/* 4. Title - Col 2, Row 1 */
body .resource-item .resource-title-row .heading,
body .resource-item .resource-title-row a.heading,
html body .resource-item .resource-title-row .heading,
.resource-item .resource-title-row .heading {
  grid-column: 2 !important;
  grid-row: 1 !important;
  margin: 0 0 6px 0 !important;
  align-self: center !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #1a1a1a !important;
  text-decoration: none !important;
  line-height: 1.4 !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  transition: color 0.2s ease !important;
}

body .resource-item .resource-title-row .heading:hover,
.resource-item .resource-title-row .heading:hover {
  color: #0069B4 !important;
  text-decoration: none !important;
}

/* 5. Description - Col 2, Row 2 */
body .resource-item .description,
body .resource-item p.description,
.resource-item .description {
  grid-column: 2 !important;
  grid-row: 2 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  color: #4a4a4a !important;
  line-height: 1.6 !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  max-height: none !important;
  overflow: visible !important;
}

/* 6. Button - Col 3, Row 1-2 */
body .resource-item .btn-group,
body .resource-item .dropdown.btn-group,
.resource-item .btn-group,
.resource-item .dropdown.btn-group {
  grid-column: 3 !important;
  grid-row: 1 / 3 !important;
  align-self: center !important;
  justify-self: end !important;
  position: relative !important;
  z-index: 10 !important;
}

/* Explore button styling - Modern & Professional */
body .resource-item .btn-group .btn,
body .resource-item .btn-group .btn-primary,
body .resource-item .btn-group .dropdown-toggle,
.resource-item .btn-group .btn,
.resource-item .btn-group .btn-primary,
.resource-item .btn-group .dropdown-toggle {
  padding: 10px 20px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: linear-gradient(180deg, #0074cc 0%, #0069B4 100%) !important;
  border: 1px solid #0069B4 !important;
  color: white !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 1px 3px rgba(0, 105, 180, 0.15) !important;
}

body .resource-item .btn-group .btn i,
body .resource-item .btn-group .btn-primary i,
.resource-item .btn-group .btn i,
.resource-item .btn-group .btn-primary i {
  margin-right: 6px !important;
  font-size: 13px !important;
}

body .resource-item .btn-group .btn:hover,
body .resource-item .btn-group .btn-primary:hover,
body .resource-item .btn-group .dropdown-toggle:hover,
.resource-item .btn-group .btn:hover,
.resource-item .btn-group .btn-primary:hover,
.resource-item .btn-group .dropdown-toggle:hover {
  background: linear-gradient(180deg, #005fa3 0%, #005a9e 100%) !important;
  border-color: #005a9e !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 10px rgba(0, 105, 180, 0.3) !important;
}

body .resource-item .btn-group .btn:active,
body .resource-item .btn-group .btn-primary:active,
body .resource-item .btn-group .dropdown-toggle:active,
.resource-item .btn-group .btn:active,
.resource-item .btn-group .btn-primary:active,
.resource-item .btn-group .dropdown-toggle:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 3px rgba(0, 105, 180, 0.2) inset !important;
}

/* Dropdown toggle specific styling */
body .resource-item .btn-group .dropdown-toggle,
.resource-item .btn-group .dropdown-toggle {
  padding-left: 12px !important;
  padding-right: 12px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body .resource-item .btn-group .dropdown-toggle .caret,
.resource-item .btn-group .dropdown-toggle .caret {
  margin-left: 0 !important;
  border-top-color: rgba(255, 255, 255, 0.9) !important;
  transition: transform 0.2s ease !important;
}

/* When dropdown is open, rotate caret */
body .resource-item .btn-group.open .dropdown-toggle .caret,
body .resource-item .dropdown.open .dropdown-toggle .caret,
.resource-item .btn-group.open .dropdown-toggle .caret,
.resource-item .dropdown.open .dropdown-toggle .caret {
  transform: rotate(180deg) !important;
}

/* Active state when dropdown is open */
body .resource-item .btn-group.open .btn-primary,
body .resource-item .btn-group.open .dropdown-toggle,
body .resource-item .dropdown.open .btn-primary,
body .resource-item .dropdown.open .dropdown-toggle,
.resource-item .btn-group.open .btn-primary,
.resource-item .btn-group.open .dropdown-toggle,
.resource-item .dropdown.open .btn-primary,
.resource-item .dropdown.open .dropdown-toggle {
  background: linear-gradient(180deg, #005fa3 0%, #005a9e 100%) !important;
  border-color: #005a9e !important;
  box-shadow: 0 1px 3px rgba(0, 105, 180, 0.2) inset, 0 3px 10px rgba(0, 105, 180, 0.3) !important;
}

/* If img exists, reset the span styles to wrap the image nicely */
body .resource-item .resource-title-row .format-label:has(img),
.resource-item .resource-title-row .format-label:has(img) {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  transform: none !important;
  margin: 0 !important;
  background: none !important;
}

/* Heading link inside resource-title-row */
body .resource-item .resource-title-row .heading,
body .resource-item .resource-title-row a.heading,
html body .resource-item .resource-title-row .heading,
.resource-item .resource-title-row .heading {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: block !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #333 !important;
  text-decoration: none !important;
  margin: 0 0 4px 0 !important;
  line-height: 1.3 !important;
  text-align: left !important;
  align-self: end !important;
}

body .resource-item .resource-title-row .heading:hover,
.resource-item .resource-title-row .heading:hover {
  text-decoration: underline !important;
  color: #005090 !important;
}

/* Description - Column 2, Row 2 */
body .resource-item p.description,
body .resource-item .description,
body li.resource-item p.description,
html body .resource-item p.description,
html body .resource-item .description,
.resource-item p.description,
.resource-item .description {
  grid-column: 2 !important;
  grid-row: 2 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  color: #666 !important;
  line-height: 1.5 !important;
  text-align: left !important;
}

/* Button group - Column 3, spans both rows - CRITICAL: position relative */
body .resource-item .btn-group,
body .resource-item .dropdown.btn-group,
body li.resource-item .btn-group,
body li.resource-item .dropdown.btn-group,
html body .resource-item .btn-group,
html body .resource-item .dropdown.btn-group,
.resource-item .btn-group,
.resource-item .dropdown.btn-group {
  grid-column: 3 !important;
  grid-row: 1 / 3 !important;
  align-self: center !important;
  justify-self: end !important;
  position: relative !important;
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  z-index: 10 !important;
}

body .resource-item .btn-group .btn,
body li.resource-item .btn-group .btn,
html body .resource-item .btn-group .btn {
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

body .resource-item .btn-group .btn-primary,
body li.resource-item .btn-group .btn-primary,
html body .resource-item .btn-group .btn-primary {
  background-color: #0069B4 !important;
  border-color: #0069B4 !important;
  color: white !important;
  border-radius: 4px 0 0 4px !important;
}

body .resource-item .btn-group .btn-primary:hover,
body li.resource-item .btn-group .btn-primary:hover,
html body .resource-item .btn-group .btn-primary:hover {
  background-color: #005a9e !important;
  border-color: #005a9e !important;
}

body .resource-item .btn-group .dropdown-toggle,
body li.resource-item .btn-group .dropdown-toggle,
html body .resource-item .btn-group .dropdown-toggle {
  border-radius: 0 4px 4px 0 !important;
  padding: 8px 10px !important;
}

/* Fallback: Format label as direct child (older CKAN structure) */
body .resource-item > .format-label,
html body .resource-item > .format-label,
.resource-item > .format-label {
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: none !important;
}



/* ===== DATASET PAGE - ADDITIONAL INFO SECTIONS FIX ===== */

/* Additional info tables/sections */
body .additional-info,
body .module.module-info,
body section.module {
  margin-bottom: 20px !important;
}

/* Section headers */
body .additional-info h3,
body .module-heading,
body section.module h2,
body .dataset-additional-info h3 {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #333 !important;
  padding: 12px 15px !important;
  background-color: #f8f9fa !important;
  border-bottom: 1px solid #e9ecef !important;
  margin: 0 !important;
}

/* Info table styling */
body .additional-info table,
body .module table.table,
body table.table-striped {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 0 !important;
}

body .additional-info table th,
body .additional-info table td,
body .module table.table th,
body .module table.table td,
body table.table-striped th,
body table.table-striped td {
  padding: 10px 15px !important;
  border-bottom: 1px solid #e9ecef !important;
  vertical-align: top !important;
  font-size: 13px !important;
}

body .additional-info table th,
body .module table.table th,
body table.table-striped th {
  width: 35% !important;
  font-weight: 600 !important;
  color: #495057 !important;
  background-color: #fafafa !important;
}

body .additional-info table td,
body .module table.table td,
body table.table-striped td {
  color: #333 !important;
  word-break: break-word !important;
}

/* Links in table cells */
body .additional-info table td a,
body .module table.table td a,
body table.table-striped td a {
  color: #0069B4 !important;
  text-decoration: none !important;
}

body .additional-info table td a:hover,
body .module table.table td a:hover,
body table.table-striped td a:hover {
  text-decoration: underline !important;
}

/* Show more buttons */
body .show-more-btn,
body .module-footer a,
body a.read-more {
  display: inline-block !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  color: #0069B4 !important;
  background-color: #f0f7fc !important;
  border: 1px solid #0069B4 !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  margin-top: 10px !important;
  cursor: pointer !important;
}

body .show-more-btn:hover,
body .module-footer a:hover,
body a.read-more:hover {
  background-color: #0069B4 !important;
  color: white !important;
}

/* Download button section */
body .btn-download,
body a.btn[download],
body .resource-url-analytics {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* Cite this as section */
body .cite-this,
body .citation-section {
  background: #f8f9fa !important;
  border: 1px solid #e9ecef !important;
  border-radius: 8px !important;
  padding: 15px !important;
  margin: 20px 0 !important;
}

/* ===== DROPDOWN MENU FIX FOR EXPLORE BUTTON ===== */

/* Ensure dropdown container has proper positioning */
body .resource-item .dropdown.btn-group,
body .resource-item .btn-group.dropdown,
.resource-item .dropdown.btn-group {
  position: relative !important;
  z-index: 10 !important;
}

/* Dropdown menu styling - Professional & Modern */
body .resource-item .dropdown-menu,
body .resource-item .btn-group .dropdown-menu,
.resource-item .dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  z-index: 2000 !important;
  min-width: 200px !important;
  padding: 6px 0 !important;
  margin: 4px 0 0 !important;
  background-color: #ffffff !important;
  border: 1px solid #d0d7de !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  display: none !important;
  opacity: 0 !important;
  transform: translateY(-8px) scale(0.95) !important;
  transition: opacity 0.15s ease, transform 0.15s ease !important;
  overflow: hidden !important;
}

/* Show dropdown when open - Bootstrap 3 uses .open class, Bootstrap 5 uses .show class */
body .resource-item .dropdown.open .dropdown-menu,
body .resource-item .btn-group.open .dropdown-menu,
body .resource-item .dropdown-menu.show,
body .resource-item .btn-group .dropdown-menu.show,
.resource-item .dropdown.open .dropdown-menu,
.resource-item .btn-group.open .dropdown-menu,
.resource-item .dropdown-menu.show,
.btn-group .dropdown-menu.show {
  display: block !important;
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* Dropdown menu items */
body .resource-item .dropdown-menu li,
.resource-item .dropdown-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body .resource-item .dropdown-menu li a,
.resource-item .dropdown-menu li a {
  display: flex !important;
  align-items: center !important;
  padding: 11px 16px !important;
  color: #24292f !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  transition: all 0.12s ease !important;
  border-radius: 0 !important;
  position: relative !important;
}

body .resource-item .dropdown-menu li a:hover,
body .resource-item .dropdown-menu li a:focus,
.resource-item .dropdown-menu li a:hover,
.resource-item .dropdown-menu li a:focus {
  background-color: #f6f8fa !important;
  color: #0969da !important;
}

body .resource-item .dropdown-menu li a:active,
.resource-item .dropdown-menu li a:active {
  background-color: #e1e4e8 !important;
}

/* Icon styling in dropdown - ENSURE VISIBILITY */
body .resource-item .dropdown-menu li a i,
body .resource-item .dropdown-menu li a i.fa,
.resource-item .dropdown-menu li a i,
.resource-item .dropdown-menu li a i.fa,
html body .resource-item .dropdown-menu li a i,
html body .resource-item .dropdown-menu li a i.fa {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-right: 12px !important;
  width: 20px !important;
  text-align: center !important;
  font-size: 15px !important;
  line-height: 1 !important;
  font-family: "FontAwesome" !important;
  font-style: normal !important;
  font-weight: normal !important;
  flex-shrink: 0 !important;
  color: #57606a !important;
  transition: color 0.12s ease !important;
}

body .resource-item .dropdown-menu li a:hover i,
body .resource-item .dropdown-menu li a:focus i,
.resource-item .dropdown-menu li a:hover i,
.resource-item .dropdown-menu li a:focus i {
  color: #0969da !important;
}

/* Specific icon colors */
body .resource-item .dropdown-menu li a i.fa-bar-chart-o,
body .resource-item .dropdown-menu li a i.fa-info-circle,
.resource-item .dropdown-menu li a i.fa-bar-chart-o,
.resource-item .dropdown-menu li a i.fa-info-circle {
  color: #0969da !important;
}

body .resource-item .dropdown-menu li a i.fa-arrow-circle-o-down,
body .resource-item .dropdown-menu li a i.fa-download,
.resource-item .dropdown-menu li a i.fa-arrow-circle-o-down,
.resource-item .dropdown-menu li a i.fa-download {
  color: #2da44e !important;
}

body .resource-item .dropdown-menu li a i.fa-external-link,
.resource-item .dropdown-menu li a i.fa-external-link {
  color: #8250df !important;
}

body .resource-item .dropdown-menu li a i.fa-pencil-square-o,
body .resource-item .dropdown-menu li a i.fa-edit,
.resource-item .dropdown-menu li a i.fa-pencil-square-o,
.resource-item .dropdown-menu li a i.fa-edit,
.resource-item .dropdown-menu li a i.fa-pencil {
  color: #bf8700 !important;
}

/* Dropdown menu divider */
body .resource-item .dropdown-menu .divider,
body .resource-item .dropdown-menu hr,
.resource-item .dropdown-menu .divider,
.resource-item .dropdown-menu hr {
  height: 1px !important;
  margin: 6px 0 !important;
  background-color: #d0d7de !important;
  border: none !important;
}

/* First and last item border radius */
body .resource-item .dropdown-menu li:first-child a,
.resource-item .dropdown-menu li:first-child a {
  border-radius: 8px 8px 0 0 !important;
}

body .resource-item .dropdown-menu li:last-child a,
.resource-item .dropdown-menu li:last-child a {
  border-radius: 0 0 8px 8px !important;
}


/* ===== DOWNLOAD LINKS BAR FIX - HORIZONTAL LAYOUT ===== */
/* Fix for download bar elements being stacked vertically */

html body .download-links,
body .download-links,
.download-links {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 10px !important;
}

html body .download-links .btn-group,
body .download-links .btn-group,
.download-links .btn-group {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

html body .download-links .btn-group .btn,
body .download-links .btn-group .btn,
.download-links .btn-group .btn {
  white-space: nowrap !important;
}

/* Datastore download section fix */
html body .datastore-download,
html body .metadata-download,
body .datastore-download,
body .metadata-download,
.datastore-download,
.metadata-download {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

/* Resource actions - horizontal layout */
html body .resource-actions,
html body .resource-item-actions,
body .resource-actions,
body .resource-item-actions,
.resource-actions,
.resource-item-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

/* Badge/status next to download button - inline */
html body .resource-item .label:not(.format-label),
html body .resource-item .badge:not(.format-label),
body .resource-item .label:not(.format-label),
body .resource-item .badge:not(.format-label),
.resource-item .label:not(.format-label),
.resource-item .badge:not(.format-label) {
  display: inline-block !important;
  vertical-align: middle !important;
  margin-left: 8px !important;
}

/* ===== RESPONSIVE FIX FOR RESOURCE ITEMS ===== */

@media (max-width: 768px) {
  html body ul.resource-list li.resource-item,
  html body .resource-list .resource-item,
  html body li.resource-item,
  body ul.resource-list li.resource-item,
  body .resource-list .resource-item,
  body li.resource-item {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto auto !important;
    padding: 14px 16px !important;
  }

  html body .resource-item .resource-title-row .format-label,
  body .resource-item .resource-title-row .format-label,
  .resource-item .resource-title-row .format-label {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    margin-bottom: 8px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  html body .resource-item .resource-title-row .heading,
  html body .resource-item .resource-title-row a.heading,
  body .resource-item .resource-title-row .heading,
  body .resource-item .resource-title-row a.heading,
  .resource-item .resource-title-row .heading {
    grid-column: 1 !important;
    grid-row: 2 !important;
    font-size: 15px !important;
  }

  html body .resource-item p.description,
  html body .resource-item .description,
  body .resource-item p.description,
  body .resource-item .description,
  .resource-item p.description,
  .resource-item .description {
    grid-column: 1 !important;
    grid-row: 3 !important;
    font-size: 13px !important;
  }

  html body .resource-item .btn-group,
  html body .resource-item .dropdown.btn-group,
  body .resource-item .btn-group,
  body .resource-item .dropdown.btn-group,
  .resource-item .btn-group,
  .resource-item .dropdown.btn-group {
    grid-column: 1 !important;
    grid-row: 4 !important;
    justify-self: start !important;
    margin-top: 12px !important;
  }
}

/* ===== FORMAT LABEL COLORS - CKANEXT-SCHEMINGDCAT INTEGRATION ===== */
/* Format-specific colors matching ckanext-schemingdcat */

/* CSV, TSV, XLS, XLSX, Spreadsheets - Green */
body .resource-item .format-label[data-format="csv"],
body .resource-item .format-label[data-format*="csv"],
body .resource-item .format-label[data-format*="tsv"],
body .resource-item .format-label[data-format*="xls"],
body .resource-item .format-label[data-format*="xlsx"],
body .resource-item .format-label[data-format*="gspread"],
body .resource-item .format-label[data-format*="gsheet"],
body .resource-item .format-label[data-format*="sheet"],
.resource-item .format-label[data-format="csv"],
.resource-item .format-label[data-format*="csv"],
.resource-item .format-label[data-format*="xls"],
.resource-item .format-label[data-format*="xlsx"],
span.format-label[data-format="csv"],
span.format-label[data-format*="csv"],
span.format-label[data-format*="xls"],
span.format-label[data-format*="xlsx"] {
  background-color: #45b058 !important;
  color: #ffffff !important;
}

/* JSON, GeoJSON - Orange/Yellow */
body .resource-item .format-label[data-format="geojson"],
body .resource-item .format-label[data-format="json"],
body .resource-item .format-label[data-format*="json"],
.resource-item .format-label[data-format="json"],
.resource-item .format-label[data-format*="json"],
span.format-label[data-format="json"],
span.format-label[data-format*="json"] {
  background-color: #eeaf4b !important;
  color: #ffffff !important;
}

/* XML - Orange */
body .resource-item .format-label[data-format="xml"],
body .resource-item .format-label[data-format*="xml"],
.resource-item .format-label[data-format="xml"],
.resource-item .format-label[data-format*="xml"],
span.format-label[data-format="xml"],
span.format-label[data-format*="xml"] {
  background-color: #fc7b24 !important;
  color: #ffffff !important;
}

/* Shapefile, GDB - Teal */
body .resource-item .format-label[data-format="shp"],
body .resource-item .format-label[data-format*="shp"],
body .resource-item .format-label[data-format*="shapefile"],
body .resource-item .format-label[data-format*="gdb"],
body .resource-item .format-label[data-format*="geodatabase"],
.resource-item .format-label[data-format="shp"],
.resource-item .format-label[data-format*="shp"],
span.format-label[data-format="shp"],
span.format-label[data-format*="shp"] {
  background-color: #36849a !important;
  color: #ffffff !important;
}

/* WMS - Yellow/Green */
body .resource-item .format-label[data-format="wms"],
body .resource-item .format-label[data-format*="wms"],
.resource-item .format-label[data-format="wms"],
.resource-item .format-label[data-format*="wms"],
span.format-label[data-format="wms"],
span.format-label[data-format*="wms"] {
  background-color: #ADAB46 !important;
  color: #ffffff !important;
}

/* WFS - Blue */
body .resource-item .format-label[data-format="wfs"],
body .resource-item .format-label[data-format*="wfs"],
.resource-item .format-label[data-format="wfs"],
.resource-item .format-label[data-format*="wfs"],
span.format-label[data-format="wfs"],
span.format-label[data-format*="wfs"] {
  background-color: #5783A3 !important;
  color: #ffffff !important;
}

/* WCS - Dark Blue */
body .resource-item .format-label[data-format="wcs"],
body .resource-item .format-label[data-format*="wcs"],
.resource-item .format-label[data-format="wcs"],
.resource-item .format-label[data-format*="wcs"],
span.format-label[data-format="wcs"],
span.format-label[data-format*="wcs"] {
  background-color: #38586C !important;
  color: #ffffff !important;
}

/* WMTS - Brown */
body .resource-item .format-label[data-format="wmts"],
body .resource-item .format-label[data-format*="wmts"],
.resource-item .format-label[data-format="wmts"],
.resource-item .format-label[data-format*="wmts"],
span.format-label[data-format="wmts"],
span.format-label[data-format*="wmts"] {
  background-color: #6E512F !important;
  color: #ffffff !important;
}

/* CSW, OWS, OGC - Brown */
body .resource-item .format-label[data-format="csw"],
body .resource-item .format-label[data-format*="csw"],
body .resource-item .format-label[data-format*="ows"],
body .resource-item .format-label[data-format*="ogc"],
.resource-item .format-label[data-format*="csw"],
span.format-label[data-format*="csw"] {
  background-color: #5e4f11 !important;
  color: #ffffff !important;
}

/* ZIP - Yellow */
body .resource-item .format-label[data-format="zip"],
body .resource-item .format-label[data-format*="zip"],
.resource-item .format-label[data-format="zip"],
.resource-item .format-label[data-format*="zip"],
span.format-label[data-format="zip"],
span.format-label[data-format*="zip"] {
  background-color: #fcba2f !important;
  color: #333333 !important;
}

/* DOC, DOCX, ODT, MD, TEX, TXT - Blue */
body .resource-item .format-label[data-format="doc"],
body .resource-item .format-label[data-format*="docx"],
body .resource-item .format-label[data-format*="odt"],
body .resource-item .format-label[data-format*="md"],
body .resource-item .format-label[data-format*="tex"],
body .resource-item .format-label[data-format="txt"],
body .resource-item .format-label[data-format*="txt"],
.resource-item .format-label[data-format="txt"],
.resource-item .format-label[data-format*="txt"],
span.format-label[data-format="txt"],
span.format-label[data-format*="txt"] {
  background-color: #42a5f5 !important;
  color: #ffffff !important;
}

/* KML, KMZ - Purple */
body .resource-item .format-label[data-format="kml"],
body .resource-item .format-label[data-format="kmz"],
body .resource-item .format-label[data-format*="kmz"],
.resource-item .format-label[data-format="kml"],
.resource-item .format-label[data-format="kmz"],
span.format-label[data-format="kml"],
span.format-label[data-format="kmz"] {
  background-color: #8D6FA9 !important;
  color: #ffffff !important;
}

/* PNG - Green */
body .resource-item .format-label[data-format="png"],
body .resource-item .format-label[data-format*="png"],
.resource-item .format-label[data-format="png"],
span.format-label[data-format="png"] {
  background-color: #659c35 !important;
  color: #ffffff !important;
}

/* JPEG, JPG - Teal */
body .resource-item .format-label[data-format="jpeg"],
body .resource-item .format-label[data-format="jpg"],
body .resource-item .format-label[data-format*="jpg"],
.resource-item .format-label[data-format="jpg"],
span.format-label[data-format="jpg"] {
  background-color: #14a085 !important;
  color: #ffffff !important;
}

/* MP3, MPEG3 - Purple */
body .resource-item .format-label[data-format="mp3"],
body .resource-item .format-label[data-format*="mp3"],
body .resource-item .format-label[data-format*="mpeg3"],
.resource-item .format-label[data-format="mp3"],
span.format-label[data-format="mp3"] {
  background-color: #7d6599 !important;
  color: #ffffff !important;
}

/* MP4, MPEG4 - Pink/Red */
body .resource-item .format-label[data-format="mp4"],
body .resource-item .format-label[data-format*="mp4"],
body .resource-item .format-label[data-format*="mpeg4"],
.resource-item .format-label[data-format="mp4"],
span.format-label[data-format="mp4"] {
  background-color: #ff5364 !important;
  color: #ffffff !important;
}

/* CSS - Blue */
body .resource-item .format-label[data-format="css"],
body .resource-item .format-label[data-format*="css"],
.resource-item .format-label[data-format="css"],
span.format-label[data-format="css"] {
  background-color: #0096e6 !important;
  color: #ffffff !important;
}

/* ===== METADATA DOWNLOAD DROPDOWN FIXES ===== */
/* Fix for metadata format dropdown menu styling */

/* Metadata badges (INSPIRE, DCAT-AP) - clean styling */
.metadata-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  margin-right: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #24292f !important;
  background-color: #f6f8fa !important;
  border: 1px solid #d0d7de !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}

.metadata-label:hover {
  background-color: #eaeef2 !important;
  border-color: #afb8c1 !important;
}

.metadata-label > i {
  font-size: 14px !important;
  color: #1a7f37 !important;
}

/* Metadata download dropdown menu - specific to metadata section */
.download-links .btn-group .dropdown-menu,
.additional-info .download-links .btn-group .dropdown-menu {
  min-width: 280px !important;
  max-height: 400px !important;
  overflow-y: auto !important;
  padding: 8px 0 !important;
  background: #ffffff !important;
  border: 1px solid #d0d7de !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  z-index: 2000 !important;
  margin-top: 2px !important;
}

/* Keep metadata dropdown visible and opening downward */
.additional-info header,
.additional-info header h2,
.additional-info .download-links,
.additional-info .download-links .btn-group {
  overflow: visible !important;
  position: relative !important;
}

.additional-info .download-links .dropdown-menu,
.additional-info .download-links .btn-group .dropdown-menu,
.additional-info .download-links .dropup .dropdown-menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  bottom: auto !important;
  left: auto !important;
  right: 0 !important;
  transform: none !important;
  z-index: 3000 !important;
}

/* Metadata dropdown items */
.download-links .btn-group .dropdown-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.download-links .btn-group .dropdown-menu li a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #24292f !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

.download-links .btn-group .dropdown-menu li a:hover {
  background-color: #f6f8fa !important;
  color: #0969da !important;
}

.download-links .btn-group .dropdown-menu li a:active {
  background-color: #e1e4e8 !important;
}

/* Icons in metadata dropdown */
.download-links .btn-group .dropdown-menu li a i {
  font-size: 14px !important;
  width: 18px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  color: #656d76 !important;
}

.download-links .btn-group .dropdown-menu li a:hover i {
  color: #0969da !important;
}

/* Metadata format text styling - subtle and professional */
.download-links .btn-group .dropdown-menu li a strong {
  font-weight: 600 !important;
  color: #57606a !important;
}

.download-links .btn-group .dropdown-menu li a:hover strong {
  color: #0969da !important;
}

.download-links .btn-group .dropdown-menu li a span.metadata-download_info_label {
  color: #24292f !important;
  font-size: 13px !important;
}

/* Download button styling - match the professional design */
.download-links .btn-group .btn-primary {
  padding: 8px 16px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: linear-gradient(180deg, #0074cc 0%, #0069B4 100%) !important;
  border: 1px solid #0069B4 !important;
  color: white !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 1px 3px rgba(0, 105, 180, 0.15) !important;
}

.download-links .btn-group .btn-primary:hover {
  background: linear-gradient(180deg, #0069B4 0%, #005a9e 100%) !important;
  box-shadow: 0 2px 6px rgba(0, 105, 180, 0.25) !important;
  transform: translateY(-1px) !important;
}

.download-links .btn-group .btn-primary:active {
  background: #005a9e !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15) !important;
  transform: translateY(0) !important;
}

.download-links .btn-group .btn-primary i {
  margin-right: 6px !important;
}

/* Dropdown toggle button - unify with main button */
.download-links .btn-group .dropdown-toggle,
html body .download-links .btn-group .dropdown-toggle,
body .download-links .btn-group .dropdown-toggle,
.download-links .btn-group button.dropdown-toggle,
.download-links .btn-group .btn.dropdown-toggle {
  padding: 8px 12px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 4px !important;
  border-bottom-right-radius: 4px !important;
  border-color: #0069B4 !important;
  margin-left: -1px !important;
  min-width: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* First button in group - remove right radius */
.download-links .btn-group .btn:first-child,
.download-links .btn-group .btn-primary:first-child,
.download-links .btn-group a.btn:first-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.download-links .btn-group .dropdown-toggle:hover,
html body .download-links .btn-group .dropdown-toggle:hover {
  background: linear-gradient(180deg, #0069B4 0%, #005a9e 100%) !important;
}

.download-links .btn-group .dropdown-toggle .caret {
  transition: transform 0.2s ease !important;
  border-top-color: white !important;
  margin: 0 !important;
}

.download-links .btn-group.open .dropdown-toggle .caret {
  transform: rotate(180deg) !important;
}

/* Dropdown header/divider - specific to metadata */
.download-links .btn-group .dropdown-menu .dropdown-header {
  padding: 8px 14px 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #656d76 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border-bottom: 1px solid #d0d7de !important;
  margin-bottom: 4px !important;
  background: transparent !important;
}

.download-links .btn-group .dropdown-menu .dropdown-header i {
  margin-right: 6px !important;
  color: #656d76 !important;
}

.download-links .btn-group .dropdown-menu .divider,
.download-links .btn-group .dropdown-menu hr {
  height: 1px !important;
  margin: 6px 0 !important;
  background-color: #d0d7de !important;
  border: none !important;
}

/* Scrollbar styling for long dropdown */
.download-links .btn-group .dropdown-menu::-webkit-scrollbar {
  width: 8px !important;
}

.download-links .btn-group .dropdown-menu::-webkit-scrollbar-track {
  background: #f6f8fa !important;
  border-radius: 0 8px 8px 0 !important;
}

.download-links .btn-group .dropdown-menu::-webkit-scrollbar-thumb {
  background: #d0d7de !important;
  border-radius: 4px !important;
}

.download-links .btn-group .dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #afb8c1 !important;
}

/* ===== FINAL OVERRIDES FOR CLEAN LAYOUT ===== */

/* Ensure all resource items maintain consistent spacing */
body ul.resource-list,
html body ul.resource-list {
  margin: 0 0 20px 0 !important;
  padding: 0 !important;
}

/* Remove any conflicting list styles */
body ul.resource-list li.resource-item,
html body ul.resource-list li.resource-item {
  list-style: none !important;
  list-style-type: none !important;
}

/* Ensure proper stacking context for dropdowns */
body .resource-list,
html body .resource-list {
  position: relative !important;
  z-index: 1 !important;
}

/* Fix any overflow issues */
body .resource-list li.resource-item *,
html body .resource-list li.resource-item * {
  box-sizing: border-box !important;
}

/* ===== METADATA SECTION HEADER STYLING ===== */

/* Fix metadata header to integrate properly with the blue bar design */
.additional-info header h2.inline {
  background: transparent !important;
  color: white !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* Ensure the header container has no conflicting styles */
.additional-info header {
  background: transparent !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ===== DOI CITATION SECTION STYLING ===== */

/* Main citation container */
.doi-citation-section .citation-container {
  border: 1px solid #d0d7de !important;
  border-radius: 8px !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  overflow: hidden !important;
  margin-top: 16px !important;
}

/* DOI Bar - Top section with DOI information */
.doi-citation-section .doi-bar {
  display: flex !important;
  align-items: center !important;
  padding: 14px 16px !important;
  background-color: #f6f8fa !important;
  border-bottom: 1px solid #d0d7de !important;
  gap: 12px !important;
}

.doi-citation-section .doi-label {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #57606a !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

.doi-citation-section .doi-label i {
  color: #656d76 !important;
  font-size: 15px !important;
}

.doi-citation-section .doi-content {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.doi-citation-section .doi-link {
  color: #0969da !important;
  text-decoration: none !important;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: color 0.15s ease !important;
}

.doi-citation-section .doi-link:hover {
  color: #0550ae !important;
  text-decoration: underline !important;
}

.doi-citation-section .copy-doi-btn {
  padding: 4px 10px !important;
  font-size: 12px !important;
  background-color: #ffffff !important;
  border: 1px solid #d0d7de !important;
  color: #24292f !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
}

.doi-citation-section .copy-doi-btn:hover {
  background-color: #f6f8fa !important;
  border-color: #1f883d !important;
  color: #1f883d !important;
}

.doi-citation-section .copy-doi-btn.btn-success {
  background-color: #1f883d !important;
  border-color: #1f883d !important;
  color: #ffffff !important;
}

.doi-citation-section .doi-status {
  margin-left: auto !important;
}

.doi-citation-section .doi-status .label {
  padding: 4px 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
}

/* Citation text area */
.doi-citation-section .citation-text {
  padding: 18px !important;
  background-color: #ffffff !important;
}

.doi-citation-section .citation-string {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #24292f !important;
  margin: 0 !important;
}

.doi-citation-section .author-name {
  font-weight: 600 !important;
  color: #24292f !important;
}

.doi-citation-section .orcid-link {
  margin-left: 4px !important;
  text-decoration: none !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.doi-citation-section .orcid-link:hover {
  opacity: 0.8 !important;
}

.doi-citation-section .orcid-icon {
  width: 16px !important;
  height: 16px !important;
  vertical-align: middle !important;
  display: inline-block !important;
}

.doi-citation-section .author-affiliation {
  color: #656d76 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

/* Citation export section */
.doi-citation-section .citation-export {
  padding: 0 18px 18px !important;
  background-color: #ffffff !important;
}

.doi-citation-section .citation-export .btn-group {
  position: relative !important;
  display: inline-block !important;
}

.doi-citation-section .citation-export .btn-primary {
  padding: 10px 20px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: linear-gradient(180deg, #0074cc 0%, #0069B4 100%) !important;
  border: 1px solid #0069B4 !important;
  color: white !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 1px 3px rgba(0, 105, 180, 0.15) !important;
  border-radius: 6px !important;
}

.doi-citation-section .citation-export .btn-primary:hover {
  background: linear-gradient(180deg, #0069B4 0%, #005a9e 100%) !important;
  box-shadow: 0 2px 6px rgba(0, 105, 180, 0.25) !important;
  transform: translateY(-1px) !important;
}

.doi-citation-section .citation-export .btn-primary:active {
  background: #005a9e !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15) !important;
  transform: translateY(0) !important;
}

.doi-citation-section .citation-export .btn-primary i {
  margin-right: 6px !important;
}

.doi-citation-section .citation-export .caret {
  margin-left: 6px !important;
  transition: transform 0.2s ease !important;
}

.doi-citation-section .citation-export .btn-group.open .caret {
  transform: rotate(180deg) !important;
}

/* Citation export dropdown menu - opens DOWNWARD */
.doi-citation-section .citation-export .dropdown-menu {
  min-width: 230px !important;
  padding: 10px 0 !important;
  background: #ffffff !important;
  border: 1px solid #d0d7de !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  z-index: 2000 !important;
  margin-top: 6px !important;
  top: 100% !important;
  bottom: auto !important;
  position: absolute !important;
}

.doi-citation-section .citation-export .dropdown-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.doi-citation-section .citation-export .dropdown-menu li a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px 16px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #24292f !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

.doi-citation-section .citation-export .dropdown-menu li a:hover {
  background-color: #f6f8fa !important;
  color: #0969da !important;
}

.doi-citation-section .citation-export .dropdown-menu li a i {
  font-size: 14px !important;
  width: 18px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  color: #656d76 !important;
}

.doi-citation-section .citation-export .dropdown-menu li a:hover i {
  color: #0969da !important;
}

.doi-citation-section .citation-export .dropdown-menu .divider {
  height: 1px !important;
  margin: 6px 0 !important;
  background-color: #d0d7de !important;
  border: none !important;
}

/* DOI status info section */
.doi-citation-section .doi-status-info {
  padding: 16px !important;
  border-top: 1px solid #d0d7de !important;
  background-color: #ffffff !important;
}

.doi-citation-section .doi-status-info .alert {
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 6px !important;
  background-color: #ddf4ff !important;
  border: 1px solid #54aeff !important;
  color: #0969da !important;
  font-size: 13px !important;
}

.doi-citation-section .doi-status-info .alert i {
  margin-right: 8px !important;
}

/* Publication details */
.doi-citation-section .publication-details {
  padding: 12px 16px !important;
  background-color: #f6f8fa !important;
  border-top: 1px solid #d0d7de !important;
  border-radius: 0 0 8px 8px !important;
}

.doi-citation-section .publication-details small {
  font-size: 12px !important;
  color: #656d76 !important;
  line-height: 1.5 !important;
}

.doi-citation-section .publication-details i {
  margin-right: 6px !important;
  color: #656d76 !important;
}

/* Ensure proper stacking */
.doi-citation-section {
  position: relative !important;
  z-index: 1 !important;
}

.doi-citation-section .citation-export .btn-group {
  position: relative !important;
  z-index: auto !important;
}

.doi-citation-section .citation-export .btn-group.open {
  z-index: 1001 !important;
}

/* ===== DATASET SIDEBAR THEME ICONS ===== */

/* Theme icons in dataset sidebar - MAXIMUM PRIORITY */
.secondary .dataset_org_info .info_image,
.secondary .dataset_org_info img.info_image,
.secondary .dataset_org_info .module-image,
.dataset_org_info .info_image,
.dataset_org_info img.info_image,
.dataset_org_info .module-image,
aside .dataset_org_info img,
.sidebar .dataset_org_info img {
  display: inline-block !important;
  max-height: 24px !important;
  max-width: 24px !important;
  width: 24px !important;
  height: 24px !important;
  margin-right: 10px !important;
  vertical-align: middle !important;
  object-fit: contain !important;
  filter: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 1 !important;
}

.dataset_org_info .info_item {
  display: flex !important;
  align-items: center !important;
  padding: 8px 12px !important;
  margin-bottom: 0 !important;
  border-bottom: 1px solid #f0f0f0 !important;
  transition: background-color 0.15s ease !important;
}

.dataset_org_info .info_item:last-child {
  border-bottom: none !important;
}

.dataset_org_info .info_item:hover {
  background-color: #f6f8fa !important;
}

.dataset_org_info .info_text {
  flex: 1 !important;
  color: #24292f !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

.dataset_org_info .info_item:hover .info_text {
  color: #0969da !important;
}

.dataset_org_info .scrollable-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.dataset_org_info .module.context-info {
  background: #ffffff !important;
  border: 1px solid #d0d7de !important;
  border-radius: 8px !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Ensure nav-simple has no extra padding */
.dataset_org_info .nav-simple {
  padding: 0 !important;
  margin: 0 !important;
}

/* ===== METADATA TABLE COLLAPSIBLE ROWS STYLING ===== */

/* Remove the floating triangle from table-toggle-more - MAXIMUM SPECIFICITY */
html body table.table-toggle-more::after,
html body table.table-toggle-more:after,
html body .table.table-toggle-more::after,
html body .table.table-toggle-more:after,
body table.table-toggle-more::after,
body table.table-toggle-more:after,
table.table-toggle-more::after,
table.table-toggle-more:after,
.table-toggle-more::after,
.table-toggle-more:after {
  display: none !important;
  content: "" !important;
  border: none !important;
  height: 0 !important;
  width: 0 !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Ensure table has proper structure */
html body table.table-toggle-more,
html body table.table-toggle-less,
body .table.table-toggle-more,
body .table.table-toggle-less,
.table-toggle-more,
.table-toggle-less {
  position: relative !important;
  border-collapse: collapse !important;
}

/* Separator row - hide completely */
html body .table tr.toggle-separator,
body .table tr.toggle-separator,
.table tr.toggle-separator,
table tr.toggle-separator {
  display: none !important;
  height: 0 !important;
  visibility: hidden !important;
}

html body .table tr.toggle-separator td,
body .table tr.toggle-separator td,
.table tr.toggle-separator td {
  display: none !important;
  padding: 0 !important;
  height: 0 !important;
  border: none !important;
}

/* Show more/less toggle row styling - integrated with table */
html body .table tr.toggle-show,
html body .table tr.toggle-show-more,
html body table tr.toggle-show,
html body table tr.toggle-show-more,
body .table tr.toggle-show,
body .table tr.toggle-show-more,
.table tr.toggle-show,
.table tr.toggle-show-more {
  display: table-row !important;
  background-color: transparent !important;
}

html body .table tr.toggle-show td,
html body .table tr.toggle-show-more td,
html body table tr.toggle-show td,
html body table tr.toggle-show-more td,
body .table tr.toggle-show td,
body .table tr.toggle-show-more td,
.table tr.toggle-show td,
.table tr.toggle-show-more td {
  padding: 12px 15px !important;
  text-align: right !important;
  border-top: none !important;
  border-bottom: none !important;
  background-color: transparent !important;
}

/* Show more/less link styling */
html body .table tr.toggle-show a.show-more,
html body .table tr.toggle-show a.show-less,
html body .table tr.toggle-show-more a.show-more,
html body .table tr.toggle-show-more a.show-less,
body .table tr.toggle-show a.show-more,
body .table tr.toggle-show a.show-less {
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #0069B4 !important;
  background-color: transparent !important;
  border: none !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: color 0.15s ease !important;
}

html body .table tr.toggle-show a.show-more:hover,
html body .table tr.toggle-show a.show-less:hover,
body .table tr.toggle-show a:hover {
  color: #005a9e !important;
  text-decoration: underline !important;
  background-color: transparent !important;
}

/* CRITICAL: Hide show-less when in "more" state (collapsed) */
html body table.table-toggle-more tr.toggle-show a.show-less,
html body .table.table-toggle-more tr.toggle-show a.show-less,
html body table.table-toggle-more tr.toggle-show-more a.show-less,
html body .table.table-toggle-more tr.toggle-show-more a.show-less,
body table.table-toggle-more tr.toggle-show a.show-less,
body .table-toggle-more tr.toggle-show a.show-less,
.table-toggle-more tr.toggle-show a.show-less,
.table-toggle-more tr.toggle-show-more a.show-less,
table.table-toggle-more .show-less,
.table-toggle-more .show-less {
  display: none !important;
  visibility: hidden !important;
}

/* Show the show-more link when in "more" state (collapsed) */
html body table.table-toggle-more tr.toggle-show a.show-more,
html body .table.table-toggle-more tr.toggle-show a.show-more,
body .table-toggle-more tr.toggle-show a.show-more,
.table-toggle-more tr.toggle-show a.show-more,
.table-toggle-more .show-more {
  display: inline !important;
  visibility: visible !important;
}

/* CRITICAL: Hide show-more when in "less" state (expanded) */
html body table.table-toggle-less tr.toggle-show a.show-more,
html body .table.table-toggle-less tr.toggle-show a.show-more,
html body table.table-toggle-less tr.toggle-show-more a.show-more,
html body .table.table-toggle-less tr.toggle-show-more a.show-more,
body table.table-toggle-less tr.toggle-show a.show-more,
body .table-toggle-less tr.toggle-show a.show-more,
.table-toggle-less tr.toggle-show a.show-more,
.table-toggle-less tr.toggle-show-more a.show-more,
table.table-toggle-less .show-more,
.table-toggle-less .show-more {
  display: none !important;
  visibility: hidden !important;
}

/* Show the show-less link when in "less" state (expanded) */
html body table.table-toggle-less tr.toggle-show a.show-less,
html body .table.table-toggle-less tr.toggle-show a.show-less,
body .table-toggle-less tr.toggle-show a.show-less,
.table-toggle-less tr.toggle-show a.show-less,
.table-toggle-less .show-less {
  display: inline !important;
  visibility: visible !important;
}

/* Hidden rows when collapsed */
html body table.table-toggle-more tr.toggle-more,
html body .table.table-toggle-more tr.toggle-more,
body .table-toggle-more tr.toggle-more,
.table-toggle-more tr.toggle-more {
  display: none !important;
}

/* Visible rows when expanded */
html body table.table-toggle-less tr.toggle-more,
html body .table.table-toggle-less tr.toggle-more,
body .table-toggle-less tr.toggle-more,
.table-toggle-less tr.toggle-more {
  display: table-row !important;
}

/* Ensure the toggle row is the last visible element and connected to table */
html body .additional-info .table,
html body .module .table,
body .additional-info .table,
body .module .table,
.additional-info .table,
.module .table {
  margin-bottom: 0 !important;
  border-bottom: none !important;
}

/* Last row of the table should have bottom border */
html body .table tr:last-child td,
body .table tr:last-child td,
.table tr:last-child td {
  border-bottom: 1px solid #e9ecef !important;
}

/* ===== IMPROVED METADATA TABLE TOGGLE STYLING ===== */

/* Extra specificity to remove triangle from schemingdcat */
html body .additional-info table.table-toggle-more::after,
html body .additional-info table.table-toggle-more:after,
html body .additional-info table.table-toggle-less::after,
html body .additional-info table.table-toggle-less:after,
html body .additional-info .table-toggle-more::after,
html body .additional-info .table-toggle-more:after,
html body .additional-info .table-toggle-less::after,
html body .additional-info .table-toggle-less:after,
.additional-info table::after,
.additional-info table:after,
table[data-module="schemingdcat-table-collapsible-rows"]::after,
table[data-module="schemingdcat-table-collapsible-rows"]:after {
  display: none !important;
  content: none !important;
  border: none !important;
  height: 0 !important;
  width: 0 !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Remove any triangle/arrow before the Show more link in tables */
html body .table tr.toggle-show a::before,
html body .table tr.toggle-show-more a::before,
html body table tr.toggle-show a::before,
html body table tr.toggle-show-more a::before,
.table tr.toggle-show a::before,
.table tr.toggle-show-more a::before,
table[data-module="schemingdcat-table-collapsible-rows"] tr.toggle-show a::before,
table[data-module="schemingdcat-table-collapsible-rows"] tr.toggle-show-more a::before,
.table tr.toggle-show td::before,
.table tr.toggle-show-more td::before,
table tr.toggle-show td::before,
table tr.toggle-show-more td::before,
/* Also hide on the row itself */
html body .additional-info tr.toggle-show-more::before,
html body .additional-info tr.toggle-show::before,
body .additional-info tr.toggle-show-more::before,
body .additional-info tr.toggle-show::before,
.additional-info tr.toggle-show-more::before,
.additional-info tr.toggle-show::before,
html body tr.toggle-show-more::before,
html body tr.toggle-show::before,
body tr.toggle-show-more::before,
body tr.toggle-show::before,
tr.toggle-show-more::before,
tr.toggle-show::before {
  display: none !important;
  content: none !important;
  visibility: hidden !important;
}

/* Improved toggle row styling - clean and minimal */
html body .table tr.toggle-show,
html body .table tr.toggle-show-more,
html body table tr.toggle-show,
html body table tr.toggle-show-more,
.table tr.toggle-show,
.table tr.toggle-show-more,
table[data-module="schemingdcat-table-collapsible-rows"] tr.toggle-show,
table[data-module="schemingdcat-table-collapsible-rows"] tr.toggle-show-more {
  display: table-row !important;
  background: transparent !important;
  border-top: none !important;
}

html body .table tr.toggle-show td,
html body .table tr.toggle-show-more td,
html body table tr.toggle-show td,
html body table tr.toggle-show-more td,
.table tr.toggle-show td,
.table tr.toggle-show-more td,
table[data-module="schemingdcat-table-collapsible-rows"] tr.toggle-show td,
table[data-module="schemingdcat-table-collapsible-rows"] tr.toggle-show-more td {
  padding: 12px 15px !important;
  text-align: right !important;
  border-top: none !important;
  border-bottom: none !important;
  background: transparent !important;
}

/* Style the show more/less links as simple text links */
html body .table tr.toggle-show a,
html body .table tr.toggle-show-more a,
html body table tr.toggle-show a,
html body table tr.toggle-show-more a,
.table tr.toggle-show a,
.table tr.toggle-show-more a,
table[data-module="schemingdcat-table-collapsible-rows"] tr.toggle-show a,
table[data-module="schemingdcat-table-collapsible-rows"] tr.toggle-show-more a {
  display: inline-block !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #0069B4 !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: color 0.2s ease !important;
}

html body .table tr.toggle-show a:hover,
html body .table tr.toggle-show-more a:hover,
html body table tr.toggle-show a:hover,
html body table tr.toggle-show-more a:hover,
.table tr.toggle-show a:hover,
.table tr.toggle-show-more a:hover,
table[data-module="schemingdcat-table-collapsible-rows"] tr.toggle-show a:hover,
table[data-module="schemingdcat-table-collapsible-rows"] tr.toggle-show-more a:hover {
  color: #005a9e !important;
  background-color: transparent !important;
  text-decoration: underline !important;
}

/* Hide separator row completely */
html body .table tr.toggle-separator,
html body table tr.toggle-separator,
.table tr.toggle-separator,
table tr.toggle-separator,
table[data-module="schemingdcat-table-collapsible-rows"] tr.toggle-separator {
  display: none !important;
  height: 0 !important;
  visibility: hidden !important;
  overflow: hidden !important;
}

html body .table tr.toggle-separator td,
html body table tr.toggle-separator td,
.table tr.toggle-separator td,
table tr.toggle-separator td,
table[data-module="schemingdcat-table-collapsible-rows"] tr.toggle-separator td {
  display: none !important;
  padding: 0 !important;
  height: 0 !important;
  border: none !important;
}
