/*
 * Site-wide base layout
 * Purpose: full-width reading space, contained images, scrollable tables, no heavy shadows.
 */

html {
  scroll-behavior: smooth;
}

body {
  background: var(--dr-bg) !important;
  color: var(--dr-text) !important;
  font-family: var(--dr-font) !important;
}

body *,
body *::before,
body *::after {
  box-shadow: none !important;
}

body.page .site-content .ast-container,
body.single .site-content .ast-container,
body.single-post .site-content .ast-container,
body.page #primary,
body.single #primary,
body.single-post #primary,
body.page .content-area,
body.single .content-area,
body.single-post .content-area,
body.page article,
body.single article,
body.single-post article,
body.page .entry-content,
body.single .entry-content,
body.single-post .entry-content {
  width: 100% !important;
  max-width: none !important;
}

body.page .site-content .ast-container,
body.single .site-content .ast-container,
body.single-post .site-content .ast-container {
  padding-left: var(--dr-page-pad) !important;
  padding-right: var(--dr-page-pad) !important;
}

body.page .entry-content,
body.single .entry-content,
body.single-post .entry-content {
  overflow-x: clip;
}

.entry-content img,
.elementor-widget-container img,
.site-content img {
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
}

.entry-content figure,
.entry-content picture {
  max-width: 100% !important;
}

.entry-content table {
  max-width: 100% !important;
  border-collapse: collapse !important;
}

.entry-content .table-responsive,
.entry-content .dr-table-scroll,
.entry-content .wp-block-table {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

.entry-content .table-responsive table,
.entry-content .dr-table-scroll table,
.entry-content .wp-block-table table {
  min-width: 680px !important;
}

@media (max-width: 768px) {
  body.page .site-content .ast-container,
  body.single .site-content .ast-container,
  body.single-post .site-content .ast-container {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  body.page .entry-content,
  body.single .entry-content,
  body.single-post .entry-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .entry-content table:not(.nu-quiz-table) {
    display: block !important;
    width: 100% !important;
    min-width: 640px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}
