/*
 * RojagarAlert responsive tables v2.0
 * Desktop: normal GeneratePress-like tables.
 * Tablet/mobile: wide tables become readable stacked rows, so no data is cut
 * and no horizontal scrolling is required for ordinary job-information tables.
 */

body.single-post .entry-content .ra-table-host,
body.single-post .entry-content figure.wp-block-table.ra-table-host,
body.single-post .entry-content .wp-block-table.ra-table-host,
body.single-post .entry-content .table-responsive.ra-table-host,
body.single-post .entry-content .responsive-table.ra-table-host,
body.single-post .entry-content .table-wrapper.ra-table-host,
body.single-post .entry-content .table-container.ra-table-host{
  display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
  margin-left:0!important;margin-right:0!important;overflow:visible!important;box-sizing:border-box!important;
}

body.single-post .entry-content .ra-table-scroll{
  display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
  margin:16px 0!important;padding:0!important;overflow:visible!important;box-sizing:border-box!important;background:#fff!important;
}

body.single-post .entry-content .ra-table-scroll>table{
  width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;
  border-collapse:collapse!important;border-spacing:0!important;table-layout:auto!important;
  background:#fff!important;color:#222!important;box-sizing:border-box!important;
}
body.single-post .entry-content .ra-table-scroll>table th,
body.single-post .entry-content .ra-table-scroll>table td{
  border:1px solid #d7dbe0!important;padding:9px 10px!important;vertical-align:top!important;text-align:left!important;
  background:#fff!important;color:#222!important;white-space:normal!important;word-break:normal!important;
  overflow-wrap:anywhere!important;hyphens:auto!important;box-sizing:border-box!important;
}
body.single-post .entry-content .ra-table-scroll>table th,
body.single-post .entry-content .ra-table-scroll>table thead td{background:#f1f3f5!important;font-weight:700!important}
body.single-post .entry-content .ra-table-scroll>table th *,
body.single-post .entry-content .ra-table-scroll>table td *{background-color:transparent!important;background-image:none!important;box-shadow:none!important;max-width:100%!important;box-sizing:border-box!important}
body.single-post .entry-content .ra-table-scroll>table a,
body.single-post .entry-content .ra-table-scroll>table a *{color:var(--ra-link,#1e73be)!important;text-decoration:underline!important;pointer-events:auto!important;cursor:pointer!important}
body.single-post .entry-content .ra-table-scroll>table img,
body.single-post .entry-content .ra-table-scroll>table svg,
body.single-post .entry-content .ra-table-scroll>table video{max-width:100%!important;height:auto!important}

/* 2-column detail tables stay simple and fluid on every device. */
body.single-post .entry-content table[data-ra-cols="2"]{table-layout:fixed!important}
body.single-post .entry-content table[data-ra-cols="2"] th:first-child,
body.single-post .entry-content table[data-ra-cols="2"] td:first-child{width:38%!important}
body.single-post .entry-content table[data-ra-cols="2"] th:nth-child(2),
body.single-post .entry-content table[data-ra-cols="2"] td:nth-child(2){width:62%!important}

/* Tablet: tables with 5+ effective columns become stacked rows. */
@media (max-width:900px){
  body.single-post .entry-content table.ra-tablet-cards{display:block!important;border:0!important;background:transparent!important}
  body.single-post .entry-content table.ra-tablet-cards thead{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
  body.single-post .entry-content table.ra-tablet-cards tbody,
  body.single-post .entry-content table.ra-tablet-cards tfoot{display:block!important;width:100%!important}
  body.single-post .entry-content table.ra-tablet-cards tr{display:block!important;width:100%!important;margin:0 0 12px!important;border:1px solid #d7dbe0!important;background:#fff!important}
  body.single-post .entry-content table.ra-tablet-cards tr.ra-header-row{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
  body.single-post .entry-content table.ra-tablet-cards td,
  body.single-post .entry-content table.ra-tablet-cards tbody th{
    display:grid!important;grid-template-columns:minmax(130px,34%) minmax(0,1fr)!important;gap:12px!important;
    width:100%!important;max-width:100%!important;min-width:0!important;padding:9px 11px!important;
    border:0!important;border-bottom:1px solid #e1e4e8!important;background:#fff!important;overflow-wrap:anywhere!important;
  }
  body.single-post .entry-content table.ra-tablet-cards td:last-child,
  body.single-post .entry-content table.ra-tablet-cards tbody th:last-child{border-bottom:0!important}
  body.single-post .entry-content table.ra-tablet-cards td::before,
  body.single-post .entry-content table.ra-tablet-cards tbody th::before{content:attr(data-ra-label);font-weight:700;color:#444;min-width:0}
  body.single-post .entry-content table.ra-tablet-cards .ra-span-cell{display:block!important}
  body.single-post .entry-content table.ra-tablet-cards .ra-span-cell::before{display:none!important}
}

/* Mobile: every table with 3+ effective columns becomes stacked and fully readable. */
@media (max-width:600px){
  body.single-post .entry-content .ra-table-scroll{margin:14px 0!important;overflow:visible!important}
  body.single-post .entry-content table.ra-mobile-cards{display:block!important;border:0!important;background:transparent!important;font-size:13px!important}
  body.single-post .entry-content table.ra-mobile-cards thead{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
  body.single-post .entry-content table.ra-mobile-cards tbody,
  body.single-post .entry-content table.ra-mobile-cards tfoot{display:block!important;width:100%!important}
  body.single-post .entry-content table.ra-mobile-cards tr{display:block!important;width:100%!important;margin:0 0 12px!important;border:1px solid #d7dbe0!important;background:#fff!important;border-radius:2px!important;overflow:hidden!important}
  body.single-post .entry-content table.ra-mobile-cards tr.ra-header-row{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
  body.single-post .entry-content table.ra-mobile-cards td,
  body.single-post .entry-content table.ra-mobile-cards tbody th{
    display:grid!important;grid-template-columns:minmax(105px,40%) minmax(0,1fr)!important;gap:9px!important;
    width:100%!important;max-width:100%!important;min-width:0!important;padding:8px 9px!important;
    border:0!important;border-bottom:1px solid #e1e4e8!important;background:#fff!important;color:#222!important;
    white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important;hyphens:auto!important;
  }
  body.single-post .entry-content table.ra-mobile-cards td:last-child,
  body.single-post .entry-content table.ra-mobile-cards tbody th:last-child{border-bottom:0!important}
  body.single-post .entry-content table.ra-mobile-cards td::before,
  body.single-post .entry-content table.ra-mobile-cards tbody th::before{content:attr(data-ra-label);font-weight:700;color:#444;line-height:1.35;min-width:0}
  body.single-post .entry-content table.ra-mobile-cards .ra-span-cell{display:block!important;background:#f7f8f9!important;font-weight:700!important}
  body.single-post .entry-content table.ra-mobile-cards .ra-span-cell::before{display:none!important}
}

@media (max-width:380px){
  body.single-post .entry-content table.ra-mobile-cards td,
  body.single-post .entry-content table.ra-mobile-cards tbody th{grid-template-columns:1fr!important;gap:3px!important}
  body.single-post .entry-content table.ra-mobile-cards td::before,
  body.single-post .entry-content table.ra-mobile-cards tbody th::before{padding-bottom:2px!important;border-bottom:1px dotted #ddd!important}
}
