/* Simple Tables & Charts Frontend Styles */

/* Table Styles */
.stc-table-wrapper {
    margin: 20px 0;
    max-width: 100%;
    overflow-x: hidden;
}

.stc-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    margin: 10px 0;
    overflow-x: auto;
    white-space: nowrap;
}

.stc-table th,
.stc-table td {
    padding: 10px 20px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.stc-table thead th {
    background-color: var(--website-color-1, #0DA9D2);
    color: var(--font-color, #fff);
    font-weight: bold;
    border-bottom: 2px solid #ddd;
    padding: 20px;
}
.stc-table tbody tr {
    background-color: #fff;
}
.stc-table tr:hover {
    background-color: #f9f9f9;
}

/* Chart Styles */
.stc-chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.stc-chart-container canvas {
    max-width: 100%;
    height: auto;
}

/*Pagination*/
.stc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 10px 0;
}

.stc-pagination button {
    padding: 8px 16px;
    border: 1px solid var(--website-color-1, #0DA9D2);
    background: var(--website-color-1, #0DA9D2);
    color: var(--font-color, #fff);
    cursor: pointer;
    border-radius: 3px;
    transition: .3s linear;
}

.stc-pagination button:hover:not(:disabled) {
    background: var(--website-color-2, #006884);
    transition: .3s linear;
}

.stc-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stc-page-info {
    color: #666;
    font-size: 14px;
}

/* CSV Download Button */
.stc-download-csv {
    padding: 8px 16px;
    border: 1px solid var(--website-color-1, #0DA9D2);
    background: var(--website-color-1, #0DA9D2);
    color: var(--font-color, #fff);
    cursor: pointer;
    border-radius: 3px;
    font-size: 14px;
    margin-bottom: 10px;
    float: right;
    transition: .3s linear;
}

.stc-download-csv:hover {
    border: 1px solid var(--website-color-2, #006884);
    background: var(--website-color-2, #006884);
    transition: .3s linear;
}

.stc-table-wrapper {
    clear: both;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stc-table-wrapper {
        font-size: 14px;
    }

    .stc-table th,
    .stc-table td {
        padding: 6px 8px;
    }

    .stc-chart-container {
        height: 300px;
        padding: 15px;
    }
    .stc-table {
        display: block;
    }
}

@media (max-width: 480px) {
    .stc-chart-container {
        height: 250px;
        padding: 10px;
    }
}