/* A) bang trong khung .table-scroll (theme/plugin cu dat nowrap + min-width) */
/* 1.1.3: o bang xuong dong (truoc day white-space:nowrap + min-width:600px lam gan nhu moi bang phai cuon ngang).
   Bang van nam trong .table-scroll nen bang qua rong (nhieu cot) van cuon ngang; width inline (vd 213%) khong con tac dung. */
.table-scroll {
    display: block;
    overflow-x: auto;
    white-space: normal;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.table-scroll table,
.entry-content .table-scroll table {
    display: table;
    min-width: 0;
    width: 100% !important;
    border-collapse: collapse;
}

.table-scroll th,
.table-scroll td {
    border: 1px solid #ccc;
    padding: 8px;
    vertical-align: top;
    width: auto !important;
}

@media (max-width: 768px) {
    .table-scroll table,
    .entry-content .table-scroll table {
        font-size: 14px;
    }
    .table-scroll tr > * {
        min-width: 80px;
    }
}

/* 1.2.0: bang tu 3 cot tro len (JS them .uscf-cards + data-label) hien thanh the xep doc tren dien thoai */
@media (max-width: 600px) {
    .entry-content .table-scroll { overflow-x: visible; }
    .entry-content .table-scroll table.uscf-cards { display: block; width: 100% !important; border: 0; font-size: 15px; }
    .entry-content .table-scroll table.uscf-cards thead,
    .entry-content .table-scroll table.uscf-cards tbody { display: block; }
    .entry-content .table-scroll table.uscf-cards tr.uscf-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .entry-content .table-scroll table.uscf-cards tr { display: block; margin: 0 0 14px; border: 1px solid #d5dbe6; border-radius: 10px; overflow: hidden; background: #fff; }
    .entry-content .table-scroll table.uscf-cards td { display: block; width: auto !important; min-width: 0; border: 0; border-bottom: 1px solid #edf0f5; padding: 8px 12px; text-align: left !important; background: transparent !important; }
    .entry-content .table-scroll table.uscf-cards td:first-child { font-weight: 700; background: #f3f5fa !important; border-bottom: 1px solid #d5dbe6; }
    .entry-content .table-scroll table.uscf-cards td:last-child { border-bottom: 0; }
    .entry-content .table-scroll table.uscf-cards td:empty { display: none; }
    .entry-content .table-scroll table.uscf-cards td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .65; }
}

/* B) bang khong co khung */
/* Dung cho THEME CON (khong co plugin us-core-features): dan vao cuoi style.css. Bang khong can khung .table-scroll. */
/* 1.2.0: bang tu 3 cot tro len (JS them .uscf-cards + data-label) hien thanh the xep doc tren dien thoai */
@media (max-width: 600px) {
    
    .entry-content table.uscf-cards { display: block; width: 100% !important; border: 0; font-size: 15px; }
    .entry-content table.uscf-cards thead,
    .entry-content table.uscf-cards tbody { display: block; }
    .entry-content table.uscf-cards tr.uscf-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .entry-content table.uscf-cards tr { display: block; margin: 0 0 14px; border: 1px solid #d5dbe6; border-radius: 10px; overflow: hidden; background: #fff; }
    .entry-content table.uscf-cards td { display: block; width: auto !important; min-width: 0; border: 0; border-bottom: 1px solid #edf0f5; padding: 8px 12px; text-align: left !important; background: transparent !important; }
    .entry-content table.uscf-cards td:first-child { font-weight: 700; background: #f3f5fa !important; border-bottom: 1px solid #d5dbe6; }
    .entry-content table.uscf-cards td:last-child { border-bottom: 0; }
    .entry-content table.uscf-cards td:empty { display: none; }
    .entry-content table.uscf-cards td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .65; }
}

/* C) le theme enfant est charge apres ce plugin et remet nowrap/min-width: specificite + !important */
.entry-content .table-scroll,.entry-content .table-scroll table,.entry-content .table-scroll th,.entry-content .table-scroll td { white-space: normal !important; }
.entry-content .table-scroll table { min-width: 0 !important; }
