:root {
    --primary-color: #e72200;
    --secondary-color: #D6D6D6;
    --table-primary-color: #82ba50;
    --table-secondary-color: #efefef;
    --agri-primary-color: #e72200;
    --agri-secondary-color: #D6D6D6;
    --agri-table-primary-color: #82ba50;
    --agri-table-secondary-color: #efefef;
}

.hidden, .agri-hide {
    display: none;
}

.table-control-button, .agri-table-ctrl-button {
    cursor: pointer;
    font-weight: bold;
    margin: 0.7rem 0.7rem 0;
    text-decoration: underline;
}

.table-wrapper, .agri-responsive-table-wrapper {
    height: 100%;
    cursor: grab;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    overflow: auto;
    position: relative;
    width: 100%;
}

/* Ensure links maintain proper cursor and styling */
.table-wrapper a, .agri-responsive-table-wrapper a {
    cursor: pointer !important;
    color: #0073aa !important;
    text-decoration: underline !important;
}

.table-wrapper a:hover, .agri-responsive-table-wrapper a:hover {
    color: #005a87 !important;
    text-decoration: underline !important;
}

.table-wrapper a:visited, .agri-responsive-table-wrapper a:visited {
    color: #4c2c92 !important;
}
.table-wrapper table, .agri-responsive-table-wrapper table {
    border-spacing: 0;
    margin-top: 10px;
    overflow: unset;
    position: relative;
}
.table-wrapper table thead tr th, .agri-responsive-table-wrapper table thead tr th {
    background-color: var(--table-primary-color, --agri-table-primary-color);
    border: 1px solid white;
    font-size: 105%;
    min-width: 250px;
    padding: 0.3rem 0.7rem;
    position: sticky;
    text-align: left;
    top: 0;
    z-index: 993;
}
.table-wrapper table thead tr th:first-child, .agri-responsive-table-wrapper table thead tr th:first-child {
    font-weight: bold;
    left: 0;
    position: sticky;
    z-index: 999;
}
.table-wrapper table tbody tr:nth-child(even) td, .agri-responsive-table-wrapper table tbody tr:nth-child(even) td {
    background-color: #f7f7f7;
}
.table-wrapper table tbody tr:nth-child(odd) td, .agri-responsive-table-wrapper table tbody tr:nth-child(odd) td {
    background-color: #fff;
}
.table-wrapper table tbody tr td, .agri-responsive-table-wrapper table tbody tr td {
    max-width: 220px;
    padding: 0.7em;
    vertical-align: top;
    z-index: 990;
}
.table-wrapper table tbody tr td:first-child, .agri-responsive-table-wrapper table tbody tr td:first-child {
    box-shadow: 1px 2px 2px #7b7b7b;
    font-weight: bold;
    left: 0;
    position: sticky;
    z-index: 995;
}

.fullscreen, .agri-enter-fullscreen {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 100vw;
    width: 100vw;
}

.filter-form li, .agri-responsive-table-form li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-left: 0;
}
.filter-form .fieldset-container, .agri-responsive-table-form .agri-fieldset-wrapper {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}
.filter-form .fieldset-container .form-title, .agri-responsive-table-form .agri-fieldset-wrapper .agri-form-preselection {
    display: block;
    font-weight: bold;
    width: 100%;
}
.filter-form .fieldset-container .radio-fieldset.two-columns, .agri-responsive-table-form .agri-fieldset-wrapper .agri-radio-fieldset.column-count-2 {
    column-count: 2;
}
.filter-form .fieldset-container .radio-fieldset label, .agri-responsive-table-form .agri-fieldset-wrapper .agri-radio-fieldset label {
    display: inline-block;
}
.filter-form .fieldset-container fieldset, .agri-responsive-table-form .agri-fieldset-wrapper fieldset {
    border: none;
    padding: 5px 0 15px;
}
.filter-form .fieldset-container fieldset legend, .agri-responsive-table-form .agri-fieldset-wrapper fieldset legend {
    padding-left: 0;
}

.filter-form-button-container, .agri-responsive-table-form-btn-wrapper {
    display: flex;
    gap: 10px;
}

.filter-box, .agri-table-filter-box {
    background-color: var(--table-secondary-color, --agri-table-secondary-color);
    border: 2px solid var(--table-primary-color, --agri-table-primary-color);
    border-radius: 3px;
    margin: 0 0 1rem;
    padding: 1.2rem;
}
.filter-box ul, .agri-table-filter-box ul {
    column-width: 300px;
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.collapse-button, .agri-collapse-x {
    cursor: pointer;
    font-size: 80%;
    font-weight: lighter;
    position: absolute;
    right: 0.3rem;
    top: 0.3rem;
}

.collapsed, .agri-collapsed {
    display: none;
}

@media screen and (max-height: 1280px) {
    .table-wrapper, .agri-responsive-table-wrapper {
        height: 92vh;
    }
}

@media screen and (max-width: 769px) {
    .table-wrapper, .agri-responsive-table-wrapper {
        height: 100vh;
    }
    .filter-box ul, .agri-table-filter-box ul {
        column-count: 3;
    }
}

@media screen and (max-width: 720px) {
    .filter-box ul, .agri-table-filter-box ul {
        column-count: 2;
    }
}

@media screen and (max-width: 450px) {
    .table-wrapper table, .agri-responsive-table-wrapper table {
        font-size: 90%;
    }
    .filter-box ul, .agri-table-filter-box ul {
        column-count: 1 !important;
    }
}