

/* Container */
.d-table { position: relative; }

/* Hide header (module setting adds .d-table--hide-header) */
.d-table--hide-header .d-table__head { display: none; }

/* Scroller */
.d-table__scroller { overflow-x: auto; }
.d-table__scroller--head { overflow: visible; }

.d-table__head .d-table__track--head {
  width: max-content;
  min-width: 100%;
}

/* Scrollbar */
.d-table__scroller::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

/* Content */
.d-table__box {
  width: 100%;
  line-height: 1.5;
}

/* Empty corner cell */
.empty-cell { background: transparent !important; }

/* Align icons in first column cell */
.d-table__col--first .d-table__box:has(img) {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: center;
}

/* Sticky header "on" state shadow (class is toggled by JS) */
.d-table--sticky-header-on .d-table__sticky-header-bg { box-shadow: var(--d-table-shadow-sm); }

/* Square corners (module setting adds .d-table--square-corners) */
.d-table--square-corners,
.d-table--square-corners .d-table__head,
.d-table--square-corners .d-table__body,
.d-table--square-corners .d-table__scroller,
.d-table--square-corners .d-table__track,
.d-table--square-corners .d-table__row,
.d-table--square-corners .d-table__col { border-radius: 0 !important; }

/* Legend layout */
.d-table-legend {
  display: flex;
  flex-wrap: wrap;
}

.d-table-legend--left   { justify-content: left; }
.d-table-legend--center { justify-content: center; }
.d-table-legend--right  { justify-content: right; }

/* Mobile portrait: icon + title stacking */
@media (max-width: 480px){
  .d-table__col--first .d-table__box { text-align: center }
  .d-table__col--first .d-table__box:has(img) { flex-direction: column; }
  .d-table__col--first .d-table__box img { max-width: 40%; }
}

.dnd-section:has(.section-bg--light) .d-table .d-table__col--regular,
.dnd-section:has(.section-bg--light) .d-table .d-table__col--first { border-color: #E2E6E8;!important; }

.dnd-section:has(.section-bg--accent) .d-table .d-table__col--regular,
.dnd-section:has(.section-bg--accent) .d-table .d-table__col--first { border-color: #B4E300!important; }

.dnd-section:has(.section-bg--dark) .d-table .d-table__col--regular,
.dnd-section:has(.section-bg--dark) .d-table .d-table__col--first { border-color: #000000!important; }

/* Dark section border width tweak */
.dnd-section:has(.section-bg--dark) .d-table__col--regular,
.dnd-section:has(.section-bg--dark) .d-table__col--first { border-width: 3px; }