/**
 * Data Table Widget Styles
 */

.data-table__title {
    position: relative;
    margin: 0 0 20px 0;
    padding: 0 0 0 15px;
    font-size: 18px;
    font-weight: 700;
    color: #333333;
}

.data-table__title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: #f7941d;
    border-radius: 2px;
}

.data-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 8px;
}

/* HTML Table Mode - Uses same styles as Repeater mode */
.data-table--html table {
    width: 100%;
    border-collapse: collapse;
}

.data-table--html tr:first-child th,
.data-table--html tr:first-child td,
.data-table--html thead th {
    display: flex;
    flex: 1;
}

.data-table--html tr {
    display: flex;
}

.data-table--html th {
    flex: 1;
    padding: 15px 20px;
    font-weight: 600;
    color: #ffffff;
    background-color: #f7941d;
}

.data-table--html td {
    flex: 1;
    padding: 12px 20px;
}

.data-table--html tbody tr:nth-child(odd) td,
.data-table--html tr:nth-child(odd):not(:first-child) td {
    background-color: #f9f9f9;
}

.data-table--html tbody tr:nth-child(even) td,
.data-table--html tr:nth-child(even) td {
    background-color: #ffffff;
}


.data-table__header {
    display: flex;
    background-color: #f7941d;
}

.data-table__header-cell {
    flex: 1;
    padding: 15px 20px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
}

.data-table__body {
    display: flex;
    flex-direction: column;
}

.data-table__row {
    display: flex;
}

.data-table__row:nth-child(odd) {
    background-color: #ffffff;
}

.data-table__row:nth-child(even) {
    background-color: #f9f9f9;
}

.data-table__cell {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    color: #333333;
    border-bottom: 1px solid #eee;
}

.data-table__row:last-child .data-table__cell {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 767px) {
    .data-table__header,
    .data-table__row {
        flex-wrap: wrap;
    }
    
    .data-table__header-cell,
    .data-table__cell {
        min-width: 100px;
    }
}
