/* DSR phone layout fixes */
*, *::before, *::after { box-sizing: border-box; }
.entry-content, .tutor-lesson-wrapper, .tutor-course-details-content, .tutor-course-content, .tutor-learning-area, .tutor-quiz-wrapper, .site-content p, .site-content li, .site-content h1, .site-content h2, .site-content h3, .site-content h4, .site-content td, .site-content th, .site-content a {
  overflow-wrap: anywhere; word-break: normal; hyphens: auto;
}
.tutor-learning-area-body, .tutor-learning-area-content, .tutor-lesson-content, .tutor-tabs-content, .tutor-tab-panel, .tutor-lesson-wrapper { min-width: 0; max-width: 100%; }
.site-content img, .site-content video, .site-content iframe, .site-content embed, .site-content object, .site-content svg { max-width: 100%; height: auto; }
.site-content iframe[src*="youtube"], .site-content iframe[src*="vimeo"] { aspect-ratio: 16/9; height: auto; width: 100%; }
.site-content pre, .site-content code { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.site-content pre { overflow-x: auto; }
.site-content figure, .site-content .wp-block-table, .site-content .wp-block-image { max-width: 100%; }
@media (max-width: 767px) {
  /* Tables: scroll sideways inside their own box instead of pushing the page wider */
  .site-content table:not(.shop_table):not(.woocommerce-table) { display: block; width: 100% !important; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .site-content table td, .site-content table th { min-width: 6.5em; overflow-wrap: normal; word-break: normal; hyphens: manual; }
  .site-content [style*="width"]:not(img):not(video):not(iframe):not(progress):not([class*="tutor-progress"]) { max-width: 100% !important; }
}
/* Add to home screen prompt */
#dsr-a2hs { position: fixed; left: 10px; right: 10px; bottom: 12px; z-index: 99999; display: flex; align-items: center; gap: 10px; background: #fff; color: #1e293b; border-radius: 12px; padding: 10px 12px; box-shadow: 0 4px 20px rgba(0,0,0,.25); font-size: 15px; line-height: 1.3; }
#dsr-a2hs img { width: 40px; height: 40px; border-radius: 8px; flex: none; }
#dsr-a2hs .dsr-a2hs-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#dsr-a2hs .dsr-a2hs-add { background: #046bd2; color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font-size: 15px; }
#dsr-a2hs .dsr-a2hs-x { background: none; border: 0; font-size: 26px; line-height: 1; color: #475569; padding: 4px 6px; }

/* Phone: labelled tables become one card per row */
@media (max-width: 767px) {
  .site-content table.dsr-cards { display: block; width: 100% !important; overflow: visible; border: 0; background: none; }
  .site-content table.dsr-cards thead, .site-content table.dsr-cards tr.dsr-head-row { display: none; }
  .site-content table.dsr-cards tbody, .site-content table.dsr-cards tr, .site-content table.dsr-cards td, .site-content table.dsr-cards th { display: block; width: 100% !important; min-width: 0; }
  .site-content table.dsr-cards tr { border: 1px solid #d1d5db; border-radius: 10px; margin: 0 0 14px; padding: 10px 14px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
  .site-content table.dsr-cards td, .site-content table.dsr-cards th { border: 0 !important; padding: 4px 0 !important; text-align: left; background: none; overflow-wrap: anywhere; word-break: normal; }
  .site-content table.dsr-cards td[data-label]::before, .site-content table.dsr-cards th[data-label]::before { content: attr(data-label); display: block; font-size: .78em; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 1px; }
  .site-content table.dsr-cards tr > :first-child { font-size: 1.2em; font-weight: 700; color: #046bd2; padding-bottom: 6px !important; border-bottom: 1px solid #eef2f7 !important; margin-bottom: 4px; }
  .site-content table.dsr-cards tr > :first-child::before { font-size: .65em; }
}
/* Readable small grey labels in the lesson area */
.tutor-learning-area .tutor-text-subdued { color: #595c63; }
