.filter-container {
    padding: 8px;
    margin-bottom: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 60px;
    box-sizing: border-box;
    overflow: hidden;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
    height: 20px;
}

.question-section {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    overflow: hidden;
}

.question-label {
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
    font-size: 16px;
}

.question-text {
    text-align: center;
    color: #212529;
    font-weight: 500;
    font-size: 14px;
    margin-top: -5px;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-wrapper {
    display: inline-block;
}

.chart-title {
    font-weight: 600;
    margin-top: 12px;
}


.response-count {
    display: flex;
    align-items: center;
    gap: 2px;
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 600;
    white-space: nowrap;
}

.count-number {
    font-weight: 700;
    font-size: 13px;
}

.count-label {
    font-weight: 500;
}


.custom-bar-label {
    font-weight: 600;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 19px;
    overflow: hidden;
}

.filters-label {
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    font-size: 14px;
}

.filter-tags {
    display: flex;
    gap: 4px;
    overflow: hidden;
}

.filter-tag {
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #868e96;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    background: #dee2e6;
    border-color: #ced4da;
}

#title #clear-filters {
    float: right;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 1;
    visibility: visible;
}

#clear-filters.hidden {
    opacity: 0;
    visibility: hidden;
}

#clear-filters:hover {
    background: #0056b3;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

#clear-filters:active {
    background: #004085;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#clear-filters:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

.question-group-button {
    color: #333;
    background-color: #ffffff; /* Light gray background */
    border: 1px solid #ddd;
    border-radius: 100px;
    padding: 6px 8px;
    margin: 2px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    line-height: 1.3;
    transition: all 0.2s ease;
    box-shadow: none;
    white-space: nowrap;
}

.question-group-button.active:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: white;
}

.question-group-button.active {
    background-color: #1a365c;
    color: white;
    border-color: #1a365c;
}

/* Hover for non-active buttons */
.question-group-button:not(.active):hover {
    background-color: #e2e8f0;
    color: #1a365c;
    border-color: #94a3b8;
}

.question-group-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.4);
}


.question-group-text {
    text-align: center;
    color: #212529;
    font-weight: 600;
    font-size: 18px;
    margin-top: 5px;
    overflow: hidden;
    white-space: normal;
    word-wrap: break-word;
    max-width: 500px;
    justify-self: center;
}

.question-group-name {
    text-align: center;
    color:darkgrey;
    margin-top: 50px;
    font-weight: 600;
    font-size: 18px;
    margin-top: 5px;
    overflow: hidden;
    white-space: normal;
    word-wrap: break-word;
    max-width: 500px;
    justify-self: center;
}

td {
    font-size: 12px;
}

#buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    background-color: #f8fafc;
}



.tab-content {
    background-color: white;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-top: none;
}

.hidden {
    display: none !important;
}

#charts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
}

.state-response-count {
    font-size: 10px;
    font-weight: 500;
}

.dc-chart {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
}

.title-links {
    display: block;
    font-size: 18px;
    font-weight: 700;
    font-weight: normal;
    color: #222;
    margin-top: 2px;
    line-height: 1.4;
}

.title-links a {
    color: #012756;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.title-links a:hover {
    text-decoration: underline;
}

.national-survey-header {
    display: flex;
    align-items: center;
    margin-bottom: 1px;
}

.red-line {
    margin-top: 1px;
    width: 30px;
    height: 3px;
    background-color: #dc3545;
    margin-right: 10px;
}

.national-survey-text {
    margin-top: 1px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}


.responses-count {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}


.left-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.responses-section {
    display: flex;
    align-items: center;
}

.filters-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filters-grid-container {
    display: grid;
    grid-template-rows: auto auto auto auto;
    height: 100%;
    padding: 4px;
    gap: 6px;
}

.national-survey-header {
    display: flex;
    align-items: center;
}

.responses-section {
    display: flex;
    align-items: center;
}

.filters-section {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.clear-button-section {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

#clear-filters {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 1;
    visibility: visible;
}

#clear-filters.hidden {
    opacity: 0;
    visibility: hidden;
}

#clear-filters:hover {
    background: #0056b3;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

#clear-filters:active {
    background: #004085;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#clear-filters:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}