html, body {
    max-width: 100%;
    overflow-x: hidden !important;
    position: relative;
}

.main {
    padding: 0rem 13rem 13rem !important;   
}

@media (max-width: 768px) {
    .main {
        padding: 0rem 0rem 0rem !important;
    }
}

a {
    text-decoration: underline dotted !important;
    text-decoration-color: rgb(124, 124, 124) !important;
    text-underline-offset: 5px;
    font-weight: 100 !important;
}

b {
    font-weight: 800 !important;
    color: black;
}

a:hover {
    color: #007BFF; 
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 0 50px 0 50px;
}

@media (max-width: 768px) {
    .top {
        flex-direction: column; /* Arrange items in a column */
        align-items: center; /* Center align items */
        text-align: center; 
    }
}

.logo-header {
    font-size: 0.8rem;
    letter-spacing: 5px;
    color: rgb(70, 70, 70);
    text-align: center;
    font-weight: 600;
}

.title {
    background-image: url('./images/background.png');
    margin-left: calc(-50vw + 50%);  /* Break out of container */
    margin-right: calc(-50vw + 50%);
}

.title h1 {
    padding-top: 40px;
    font-size: 4rem;
}

@media (max-width: 768px) {
    .title h1 {
        font-size: 3rem;
    }
}

.title h1, h3 {
    margin: 2px;
    text-align: center;
    color: white;
}

h2 {
    font-size: 2rem;
}

@media (max-width: 768px) {
    .title h1, h3 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.title h3 {
    padding-bottom: 30px;
    font-size: 1.8rem;
}

@media (max-width: 768px) {
    .title h3 {
        font-size: 1.4rem;
    }
}

p {
    line-height: 28px;
    color: rgb(70, 70, 70);
}

.text-box {
    width: 100%; 
    padding: 10px;
    background-color: rgba(200, 200, 200, 0.5); 
    border: 1px solid #333;
    box-sizing: border-box;
}

.text-box h3 {
    text-align: left;
    color: rgb(70, 70, 70);
    font-size: 1.2rem;
    font-weight: 600;
}

.pquote-right {
    float: right;
    width: 20vw;
    font-size: 1.8rem;
    text-align: right;
    font-style: italic;
    color: rgb(70, 70, 70);
    padding: 5px;
}

.pquote-left {
    float: left;
    width: 20vw;
    font-size: 1.6rem;
    text-align: right;
    font-style: italic;
    color: rgb(70, 70, 70);
    padding: 5px;
}

@media (max-width: 768px) {
    .pquote-right, .pquote-left {
        display: none;
    }
}

blockquote {
    margin: 0 30px 20px 0;
}

blockquote p {
    margin: 0;
}

.pquote-right p:first-letter {
    font-size: 2.8rem;
    font-weight: bold;
}

.pquote-left p:first-letter {
    font-size: 2.8rem;
    font-weight: bold;
}

.breadcrumbs {
    margin-bottom: 20px;
    margin-top: 10px;
}

.breadcrumbs a,
.breadcrumbs span {
    color: #616161;
    font-size: 0.9rem;
    font-weight: 400;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #888;
}

.breadcrumbs .current {
    font-weight: bold;
}

.language-selector {
    text-align: center;
    font-size: 0.9rem;
    text-decoration: none;
}

.lang-link {
    text-decoration: none;
   padding: 2px 6px;      
    border-radius: 4px;
    color: #616161 !important;
    font-weight: 400 !important;
}

.lang-link.active {
    background-color: rgba(0,0,0,0.05);  
    color: black !important;
}

.in-text-image {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: none;
}

@media (max-width: 768px) {
    .in-text-image {
        width: calc(100% + 35rem); 
        margin-left: -20rem;
        margin-right: -12rem;
        max-width: none;
        object-fit: cover;
        object-position: center;
    }
}

.graph-title {
    font-weight: 600;
    font-size: 1.4rem;
}

.image-subtitle {
    margin-top: 0;
    margin-bottom: 30px;
    color: rgb(90, 90, 90);
    font-size: 0.8rem;
}

/* Figure 1 styles (start) */
#chartContainer {
    
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
   
}

#cutsChart {
    display: block;
}

#coverageIndicator {
    padding: 12px 20px; 
    margin: 20px 0; 
    background-color: #f1f5f9; /* Soft light grey background */
    border-left: 4px solid #2e6acbb7; /* Soft blue accent color */
    font-size: 14px; 
    color: #334155; /* Dark grey for text for better readability */
    font-family: 'Lusitana', sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
   
}

.controls {
    padding: 10px 10px 10px 10px;
    background: #fafafa;
    border-bottom: 2px solid #e5e5e5;
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    #reprioritization-controls-region {
        display: none;
    }

    #reprioritization-controls-aggregation {
        display: none;
    }

    #reprioritization-controls-view {
        display: none;
    }
}

.control-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.control-group label {
    font-size: 0.85rem;
}

.control-group select {
    padding: 8px 12px;
    border: 2px solid #000;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 200px;
    max-width: 200px;
    overflow: hidden; 
    text-overflow: ellipsis;
    white-space: nowrap;
}

.control-group select:focus {
    outline: none;
    border-color: #000;
}

.toggle-buttons {
    display: flex;
    gap: 0;
    border: 1px solid rgb(70, 70, 70);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-btn {
    padding: 8px 16px;
    background: white;
    border: none;
    border-right: 0.5px solid rgb(70, 70, 70);;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Lusitana', sans-serif;
    transition: all 0.2s;
}

.toggle-btn:last-child {
    border-right: none;
}

.toggle-btn.active {
    background: rgb(70, 70, 70);;
    color: white;
}

.toggle-btn:hover:not(.active) {
    background: #f5f5f5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0;
    padding: 0;
    border-bottom: 2px solid #e5e5e5;
}

@media (max-width: 768px) {
    .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0;
    padding: 0;
    border-bottom: 2px solid #e5e5e5;
    }
}

.stat-card {
    padding: 5px 5px;
    border-right: 2px solid #e5e5e5;
    border-bottom: 2px solid #e5e5e5;
   
}

.stat-card:last-child {
    border-right: none;
}

.stat-label {
    color: #666;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}


@media (max-width: 768px) {
    .stat-value {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }
}

#regionFilter, #componentFilter, #countrySelect, #countryPRFilter, #countryComponentFilter, #countrySelect, #covidCountrySelect, #covidCountryPRFilter {
    font-family: 'Lusitana', sans-serif;
    border: 1px solid rgb(70, 70, 70);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content {
    padding:10px;
}

.view-section {
    margin-bottom: 30px;
}

#searchInput, #countrySearchInput, #covidCountrySearchInput, #allocationSearchInput {
    width: 100%; 
    padding: 8px; 
    border: 1px solid rgb(70, 70, 70);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: 'Lusitana', sans-serif;
    font-size: 0.85rem;    
}

.chart-container {
    position: relative;
    height: 60vh;
    max-width:1000px;
    background: white;
}

.table-container {
    border: 2px solid #000;
    background: white;
}

.table-wrapper {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead {
    position: sticky;
    top: 0;
    background: #000;
    color: white;
    z-index: 10;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-right: 1px solid #333;
}

.data-table th:last-child {
    border-right: none;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.data-table th.sortable:hover {
    background: #333;
}

.data-table th.sort-asc::after {
    content: ' ▲';
    font-size: 0.7rem;
}

.data-table th.sort-desc::after {
    content: ' ▼';
    font-size: 0.7rem;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
}

.data-table td:last-child {
    border-right: none;
}



.component-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    border: 2px solid #000;
}

.component-hiv { background: #dc2626; }
.component-malaria { background: #eab308; }
.component-tuberculosis { background: #2563eb; }
.component-rssh { background: #16a34a; }
.component-multi { background: #6b7280; }

.negative { color: #dc2626; font-weight: 600; }
.positive { color: #16a34a; font-weight: 600; }

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    font-size: 1.2rem;
    color: #666;
}

.data-note {
    padding: 15px 20px;
    background: #fafafa;
    border-top: 2px solid #e5e5e5;
    font-size: 0.85rem;
    color: #666;
}

.table-info {
    padding: 10px 15px;
    background: #fafafa;
    border-bottom: 2px solid #000;
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}
/* Figure 1 styles (end) */
/* Figure 2 styles (start) */
.sortable {
    cursor: pointer;
    user-select: none;
}



.sort-icon {
    opacity: 0.3;
    font-size: 12px;
    margin-left: 4px;
}

.sortable.active .sort-icon {
    opacity: 1;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.download-btn:hover {
    background-color: #1d4ed8;
}
/* Figure 2 styles (end) */


.stat-subtitle {
    font-size: 11px;
    text-align: right;
    color: #666;
    margin-top: 5px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-subtitle span {
    font-weight: 600;
    color: #333;
}

.stat-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 5px;
    line-height: 1.3;
}

.stat-value {
    color: rgb(70, 70, 70);
    font-size: 1.4rem;
    font-weight: 700;
    padding-left: 5px;
}

.logo-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 20px;
}
.logo-cloud img {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
    transition: all 0.3s ease;
}
.logo-cloud img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .logo-cloud {
        gap: 10px;
    }
    .logo-cloud img {
        max-width: 80px;
        max-height: 60px;
    }
}
