.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top */
    padding-top: 100px; /* Distance from top */
    z-index: 9999;
    overflow-y: auto;
}

.popup-content {
    background: white;
    max-width: 780px;
    width: 95%;
    border-radius: 8px;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #E9ECEF;
    overflow: hidden;
}

    .popup-content .popup-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0 0 0;
        border-bottom: 1px solid #E9ECEF;
    }

        .popup-content .popup-header h2 {
            font-size: 18px;
            font-weight: 700;
            margin: 0;
            color: #101828;
        }

    .popup-content .close-btn {
        font-size: 20px;
        border: none;
        background: none;
        cursor: pointer;
        color: #6C757D;
    }

#popupInnerContent {
    padding: 12px 20px 20px 20px;
    font-size: 14px;
    line-height: 24px;
    color: #495057;
}


.popup-content .close-btn {
    font-size: 20px;
    border: none;
    background: none;
    cursor: pointer;
    color: #6C757D;
    padding: 0;
    line-height: 1;
}

.popup-flex {
    display: flex;
    gap: 24px;
    align-items: stretch;
}

.popup-chart {
    flex: 1;
    max-width: 40%;
    background: #F7F8F9;
    padding: 16px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
}


.popup-text {
    flex: 1 1 55%;
}


.popup-chart img {
    max-width: 100%;
    height: auto;
    margin-bottom: 12px;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    text-align: center;
    margin-top: -8px;
}

#popupInnerContent > div.popup-body.popup-flex > div.popup-chart > div > div:nth-child(1) {
    margin-left: 17px;
}

.chart-labels div {
    font-size: 14px;
    color: #495057;
    font-weight: 600;
    line-height: 1.4;
}

    .chart-labels div strong {
        display: block;
        margin-top: 4px;
        font-size: 20px;
        color: #0C5E79;
        font-weight: 700;
    }


.adoption-box {
    background: #E9FCFB;
    border-radius: 8px;
    padding: 12px;
    margin: 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #101828;
}

.popup-text {
    flex: 1;
    max-width: 60%;
}

    .popup-text p {
        margin-bottom: 16px;
    }

.popup-chart {
    flex: 1;
    max-width: 40%;
    background: #F7F8F9;
    padding: 16px;
    border-radius: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.obesity-rates {
    display: flex;
    gap: 32px;
    margin-bottom: 16px;
}

    .obesity-rates div {
        display: flex;
        flex-direction: column;
        font-size: 14px;
        color: #495057;
    }

    .obesity-rates strong {
        font-size: 20px;
        color: #0C5E79;
        font-weight: 700;
        margin-top: 4px;
    }

.impact-section {
    border-top: 1px solid #E9ECEF;
    margin-top: 24px;
    padding-top: 16px;
}

    .impact-section h3 {
        font-size: 16px;
        font-weight: 600;
        margin: 0 0 8px 0;
        color: #101828;
    }

    .impact-section .highlight-number {
        font-weight: 600 !important;
    }


@media (max-width: 768px) {
    .popup-overlay {
        align-items: stretch;
        justify-content: stretch;
        padding-top: 0;
        height: 100vh;
        overflow: hidden;
    }

    .popup-content {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    #popupInnerContent {
        flex: 1;

        -webkit-overflow-scrolling: touch;
        padding: 16px;
        overflow-x:hidden !important;

    }

    .popup-header {
        flex-shrink: 0;
        padding: 16px;
    }

    .popup-flex {
        flex-direction: column;
        gap: 24px;
    }

    .popup-text,
    .popup-chart {
        max-width: 100%;
        flex: none;
    }

    .popup-chart {
        border-radius: 0;
        margin-top: 0;
    }
}

@media (max-width: 1024px) {

    #popupInnerContent .desktop-img {
        display: none !important;
    }

    #popupInnerContent .mobile-img {
        display: block !important;
    }
    .chart-labels {

        display:none;
    }

    .popup-chart img {
        margin-bottom:0;
        max-width:180% !important;
    }
    #popupInnerContent > div.popup-body.popup-flex > div.popup-chart > div > div:nth-child(1) {
        margin-left: 0 !important;

    }
    .popup-flex {
        flex-direction: column;
        gap: 24px;
    }

    .popup-text,
    .popup-chart {
        max-width: 100%;
        flex: none;
    }

    .popup-chart {
        margin-top: 0;
        border-radius: 0;
    }
}

