.vnisw-widget-container {
    max-width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
}

.vnisw-stock-table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ddd;
    font-size: 12px;
}

.vnisw-stock-table th {
    padding: 4px;
    border: 1px solid #ddd;
    background: #f4f4f4;
    font-weight: bold;
    text-align: center;
    position: relative;
    cursor: pointer; /* Indicate clickable headers */
}

.vnisw-stock-table th.sortable:hover {
    background: #e0e0e0; /* Highlight on hover */
}

.vnisw-stock-table th.sortable {
    padding-right: 15px; /* Space for sort indicator */
}

/* Neutral sort indicator for all sortable columns */
.vnisw-stock-table th.sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #999; /* Neutral gray down arrow */
    opacity: 0.5; /* Subtle when not active */
}

/* Active sort indicator for ascending */
.vnisw-stock-table th.sortable[data-sort][data-sort-order="asc"]::after {
    border-top: none;
    border-bottom: 4px solid #000; /* Black up arrow for ascending */
    opacity: 1; /* Fully visible */
}

/* Active sort indicator for descending */
.vnisw-stock-table th.sortable[data-sort][data-sort-order="desc"]::after {
    border-top: 4px solid #000; /* Black down arrow for descending */
    border-bottom: none;
    opacity: 1; /* Fully visible */
}

/* Ensure the sorted column is highlighted */
.vnisw-stock-table th.sortable[data-sort][data-sort-order] {
    background: #dcdcdc; /* Slightly darker background for active sorted column */
}

.vnisw-stock-table td {
    padding: 4px;
    border: 1px solid #ddd;
    white-space: nowrap;
}

.vnisw-stock-table td:first-child {
    text-align: center;
}

.vnisw-stock-table td:not(:first-child) {
    text-align: right;
}

.vnisw-stock-table tbody tr:hover {
    background: #d3d3d3;
}

.vnisw-stock-link {
    text-decoration: underline;
    color: #006400;
    cursor: pointer;
}

.vnisw-stock-link:not(.new-stock) {
    color: #006400;
    font-weight: bold;
}

.vnisw-stock-link:hover {
    color: #005177;
}

.new-stock {
    color: #006400;
}

.new-stock a.vnisw-stock-link {
    color: #006400;
}

.new-stock a.vnisw-stock-link:hover {
    color: #005177;
}

.no-data {
    text-align: center;
    color: #dc3232;
    padding: 15px;
}

.vnisw-table-note {
    margin-top: 10px;
    font-style: italic;
    color: #555;
    text-align: center;
    font-size: 12px;
}

.vnisw-table-note .new-stock {
    font-weight: bold;
}