#worldMap {
    position: relative;
    width: 100%;
}

#worldMapSVG {
    width: 100%;
    height: auto%;
    background-color: var(--ef-background-gray-light);
    border: 1px solid var(--ef-background-gray-medium-light);
}

#worldMapSVG .year-overlay {
    font-family: var(--font-family-serif);
    font-size: 4rem;
    font-weight: 700;
    fill: var(--ef-black);
    opacity: .3;
    text-anchor: middle;
    dominant-baseline: central;
    transform: translateY(-20px);
    pointer-events: none;
}

#worldMap #resetWorldMapBtn {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    bottom: 52px;
    left: 15px;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.6);
}

#worldMap #resetWorldMapBtn:hover {
    color: var(--cyan-web);
    background-color: rgba(255, 255, 255, 0.9);
}

#worldMap path {
    stroke-linejoin: round;
}

/* TOOLTIP */
#tooltip {
    width: auto;
    max-width: 200px;
    padding: .75rem 1rem;
}

#tooltip p {
    color: var(--darkgray);
    margin: 0;
    text-wrap: balance;
}

#tooltip p.tooltipCountry {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: .5rem;
}

#tooltip p.tooltipScore {
    font-size: 1.5rem;
    font-weight: 700;
}

/* INDEX YEAR SLIDER */
.slider-wrapper {
    position: relative;
}

.slider-wrapper::before,
.slider-wrapper::after {
    position: absolute;
    font-family: var(--font-family-sans-serif-alt);
    font-size: .825rem;
    font-weight: 400;
    color: var(--mediumgray);
    bottom: -24px;
    /* Below the slider */
}

.slider-wrapper::before {
    content: var(--min-year);
    /* Starting year from JS */
    left: 15px;
}

.slider-wrapper::after {
    content: var(--max-year);
    /* Ending year from JS */
    right: 15px
}

.form-range {
    width: 100%;
    margin: 1.125rem 0;
}

/* CUSTOM SELECT BOX */
.custom-select {
    border-radius: .125em;
}

.form-row label,
.form-inline label,
.form-group label,
.slider-wrapper label {
    font-family: var(--font-family-sans-serif-alt);
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: .025rem;
    text-wrap: balance;
}

.countryHoverStroke {
    stroke: var(--darkgray);
}

/* SELECTED COUNTRY DISPLAY */
#selectedCountryDisplay {
    display: none;
    margin: 0;
    padding: 0;
}

#selectedCountryDisplay.index-placeholderText {
    display: block;
}

.index-placeholderText {
    font-size: 1rem;
    font-weight: 400;
    color: var(--mediumgray);
    opacity: 0.8;
}

/* 12 ECONOMIC FREEDOMS CATEGORY BOXES */
.categoryWrapper {
    background-color: var(--ef-background-gray-light);
    border: none;
    border-left: 4px solid var(--ef-gray);
    /* Vertical accent for separation */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    /* Subtle depth */
    border-radius: .125em;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    padding: 0.5rem;
    margin: 0.375rem 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.categoryWrapper:hover {
    background-color: var(--ef-background-gray-medium);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.categoryWrapper.active {
    background-color: var(--ef-background-gray-dark);
    border-left-color: var(--ef-black);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--white);
}

.categoryWrapper .categoryHeader {
    font-size: .875rem;
    font-weight: 500;
    text-align: center;
    padding: .5rem .25rem;
    max-width: 100%;
    margin: 0;
    color: var(--ef-black);
    line-height: 1.2;
}

.categoryWrapper.active .categoryHeader {
    font-weight: 600;
    color: var(--white);
}

.categoryWrapper .scoreContainer {
    width: 80px;
    height: 40px;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    background-color: inherit;
}

.scoreContainer .categoryScore {
    color: var(--darkgray);
    font-size: 1.5rem;
    font-weight: 700;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0;
    margin: 0;
}

#countryScoreOverall .index-pageLabel,
#countryScoreOverall .categoryScore {
    display: none;
    /* Hidden by default, no space */
    text-align: center;
}

#countryScoreOverall .categoryScore {
    color: var(--darkgray);
    font-size: 1.5rem;
    font-weight: 700;
    width: 80px;
    height: 40px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    align-items: center;
}

@media (max-width: 767px) {

    #worldMap #resetWorldMapBtn {
        bottom: 58px;
    }

}

@media (max-width: 576px) {

    .categoryWrapper {
        padding: 0.375rem;
        margin: 0.25rem 0;
    }

    .categoryWrapper .scoreContainer {
        width: 60px;
        height: 30px;
    }

    .scoreContainer .categoryScore {
        font-size: 1.25rem;
    }

    #countryScoreOverall .categoryScore {
        width: 60px;
        height: 30px;
        font-size: 1.25rem;
    }

}

@media (max-width: 536px) {

    #worldMap #resetWorldMapBtn {
        bottom: 80px;
    }

}