/**
 * Technical Specification Table Styles
 * Scoped cleanly to prevent conflicts with themes (Hello Elementor, Astra, etc.)
 */

.tst-widget-container {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
}

.tst-widget-container *,
.tst-widget-container *::before,
.tst-widget-container *::after {
    box-sizing: border-box;
}

/* Title */
.tst-table-title {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    color: #111111;
    text-align: left;
}

/* Mobile Scroll Indicator */
.tst-scroll-hint {
    display: none;
    font-size: 12px;
    color: #666666;
    margin-bottom: 8px;
    text-align: right;
    font-style: italic;
}

/* Table Wrapper for Horizontal Scroll */
.tst-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: none;
    position: relative;
    /* Custom thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #bbbbbb #f1f1f1;
}

.tst-table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.tst-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.tst-table-wrapper::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 3px;
}

.tst-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

/* The Table */
.tst-table {
    width: 100%;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    border-style: solid;
    border-width: 1px;
    border-color: #000000;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    font-size: 14px;
    line-height: 1.4;
}

/* Cells & Headers */
.tst-table th,
.tst-table td {
    border-style: solid;
    border-width: 1px;
    border-color: #000000;
    padding: 6px 10px;
    vertical-align: top;
    word-break: break-word;
    white-space: normal;
}

/* Header Row (THEAD) */
.tst-table thead th {
    font-weight: 600;
    text-align: left;
    background-color: #ffffff;
    color: #000000;
}

/* Parameter Column (Column 1) */
.tst-table .tst-col-param {
    text-align: left;
    font-weight: 500;
    color: #000000;
    background-color: #ffffff;
}

/* Device Data Cells */
.tst-table tbody td {
    text-align: left;
    color: #000000;
    background-color: #ffffff;
}

/* Row Hover for clarity */
.tst-table tbody tr:hover td,
.tst-table tbody tr:hover th.tst-col-param {
    background-color: #fafafa;
}

/* Responsive & Sticky Parameter Column on Tablet/Mobile */
@media (max-width: 991px) {
    .tst-scroll-hint {
        display: block;
    }

    .tst-widget-container.tst-sticky-active .tst-table-wrapper {
        position: relative;
    }

    .tst-widget-container.tst-sticky-active .tst-table .tst-col-param {
        position: sticky;
        left: 0;
        z-index: 5;
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.08);
    }

    .tst-widget-container.tst-sticky-active .tst-table thead th.tst-col-param {
        z-index: 6;
    }
}

@media (max-width: 600px) {
    .tst-table {
        font-size: 13px;
    }
    
    .tst-table th,
    .tst-table td {
        padding: 5px 8px;
    }
}