/* COUNTRY PAGE STYLES */

.country-pageModuleHeader {
    background-color: var(--ef-background-gray-medium-light);
    border: 1px solid var(--ef-background-gray-medium-light);
    text-transform: uppercase;
    letter-spacing: .05rem;
}

.country-pageModuleHeadline {
    font-family: var(--font-family-serif);
    text-transform: uppercase;
    letter-spacing: .1rem;
    text-align: center;
}

.country-pageModuleWrapper {
    background-color: var(--ef-background-gray-light);
    border: 1px solid var(--ef-background-gray-medium-light);
}

#countryScoreOverall,
#countryScoreOverallBox,
.countryRankWorld,
#indexScoreAverageWorldBox,
.indexCountryCountWorld,
#indexCountryRankRegion,
#indexCountryCountRegion,
#indexScoreAverageRegionBox {
    font-size: 3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

#countryScoreOverallBox,
#indexScoreAverageWorldBox,
#indexScoreAverageRegionBox {
    min-width: 135px;
}

#countryStatusBox {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: .05rem;
    text-transform: uppercase;
    text-align: center;
    vertical-align: middle;
    width: auto;
    height: 3rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: transparent;
    padding: 1rem;
}

.country-pageJumplinkNav {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    font-family: var(--font-family-sans-serif-alt);
    font-size: .875rem;
    font-weight: 400;
}

.country-pageJumplinkNav-text {
    display: inline-block;
    padding: 0.5rem 0.5rem 0.5rem 0;
}

.country-pageJumplinkNav-link {
    display: block;
    padding: 0.5rem 1rem 0.5rem 0;
}

#countryTextIntro {
    font-family: var(--font-family-sans-serif-alt);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

#countryTextIntro p:first-of-type::first-letter {
    font-family: var(--font-family-sans-serif);
    font-size: 3.675rem;
    font-weight: 700;
    line-height: .85;
    letter-spacing: .075em;
    text-transform: uppercase;
    float: left;
    color: var(--mediumgray);
    margin: 2.5px 2.5px 0 0;
    padding: 0;
}


/* PREVIOUS/NEXT COUNTRY NAV */
.navIcon{
    height: 12px;
    padding-right: 4px;
    padding-left: 4px;
}
.navLabel{
    font-size: 16px;
    padding-right: 4px;
    padding-left: 4px;
}
.navButton{
    opacity: 0.4;
    height: 32px;
    margin: auto 8px auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.navButton:hover{
    opacity: 1;
}


/* MAPS */

#mapGlobe,
#mapZoom {
    max-width: 400px;
}

.mapWaterBackground {
    fill: var(--ef-background-gray-vlight);
}

#mapGlobe path,
#mapZoom path {
    stroke-linejoin: round;
}

.mapGlobeGraticules {
    fill: none;
    stroke: var(--ef-background-gray-medium);
    stroke-width: 0.4px;
}

.mapGlobeOutline {
    fill: none;
    stroke: var(--ef-na);
    opacity: .3;
    stroke-width: 1px;
}

.mapGlobeAreaCircle {
    fill: none;
    stroke-width: 5px;
}

.mapZoomOutline {
    fill: none;
    stroke: var(--ef-na);
    opacity: 0.3;
    stroke-width: 3px;
}

/* This is optional */
.mapHighlightedCountry {
    stroke: var(--ef-black);
    stroke-width: 0.7px;
    filter: drop-shadow(0px 2px 5px rgb(0 0 0 / 0.2));
}

.mapZoomOtherCountries:hover {
    fill: #d1d3d4;
}

.mapZoomMouseoverLabel {
    font-size: 1.125rem;
    pointer-events: none;
}

.mapZoomCapitalName {
    text-anchor: middle;
    font-size: 1.125rem;
    pointer-events: none;
}

/* MAP TOGGLE */
.country-pageToggle,
.country-pageToggleBase {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.country-pageToggleWrapper {
    position: absolute;
    width: 110px;
    height: 32px;
}

.country-pageCheckboxToggle {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
}

.country-pageToggle {
    z-index: 2;
}

.country-pageToggleBase {
    width: 100%;
    background-color: var(--ef-background-gray-medium-light);
    transition: 0.3s ease all;
    z-index: 1;
}

#country-pageMapToggle .country-pageToggle:before,
#country-pageMapToggle .country-pageToggle:after,
#country-pageMapToggle .country-pageToggle span {
    position: absolute;
    top: 0;
    width: 55px;
    height: 32px;
    font-family: var(--font-family-sans-serif-alt);
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: .025rem;
    line-height: 1;
    text-align: center;
    padding: 9px 4px;
    border-radius: 2px;
    transition: 0.3s ease all;
}

#country-pageMapToggle .country-pageToggle:before {
    content: "";
    left: 0;
    background-color: var(--cyan-web);
}

#country-pageMapToggle .country-pageToggle:after {
    content: "Globe";
    right: 0;
    color: var(--darkgray);
}

#country-pageMapToggle .country-pageToggle span {
    display: inline-block;
    left: 0;
    color: var(--white);
    z-index: 1;
}

#country-pageMapToggle .country-pageCheckboxToggle:checked+.country-pageToggle span {
    color: var(--darkgray);
}

#country-pageMapToggle .country-pageCheckboxToggle:checked+.country-pageToggle:before {
    left: 55px;
    background-color: var(--cyan-web);
}

#country-pageMapToggle .country-pageCheckboxToggle:checked+.country-pageToggle:after {
    color: var(--white);
}

#country-pageMapToggle .country-pageCheckboxToggle:checked~.country-pageToggleBase {
    background-color: var(--ef-background-gray-medium-light);
}

/* CHART SLIDER */

#chartSliderWrapper {}

/* Small white numbers on top of the colored bars */
.chartSliderBarLabels {
    font-size: .875rem;
    font-weight: 400;
    fill: var(--ef-white);
    alignment-baseline: middle;
    user-select: none;
}

/* Small black dots touching the colored bars */
.chartSliderDots {
    fill: var(--ef-background-gray-dark);
    stroke: var(--ef-white);
    stroke-width: 2;
}

/* Pointer box text indicating country name, World, or Region */
.chartSliderPointerBoxLocation {
    font-family: var(--font-family-sans-serif-alt);
    font-size: .6875rem;
    line-height: .875rem;
    font-weight: 500;
    letter-spacing: .025rem;
    text-transform: uppercase;
    text-anchor: start;
    alignment-baseline: hanging;
}

text.chartSliderPointerBoxLocation {
    color: var(--darkgray);
    fill: var(--darkgray);
}

/* Pointer box text indicating score */
.chartSliderPointerBoxScore {
    font-family: var(--font-family-sans-serif);
    font-size: 1.25rem;
    line-height: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-anchor: start;
    alignment-baseline: hanging;

}

text.chartSliderPointerBoxScore {
    color: var(--darkgray);
    fill: var(--darkgray);
}

/* LEGEND */
.country-pageLegendText {
    font-size: .75rem;
}

.country-pageLegendText span {
    line-height: .9;
    padding-right: .5em;
}

/* QUICK FACTS */
.country-pageQuickFacts {
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.3;
}

.country-pageQuickFacts p {
    margin-bottom: .5em;
}

.country-pageQuickFactsGrid {
    -webkit-columns: 3 135px;
    -moz-columns: 3 135px;
    columns: 3 135px;
    -webkit-column-gap: 4em;
    -moz-column-gap: 4em;
    column-gap: 4em;
    -webkit-column-rule: 1px solid var(--ef-background-gray-medium-light);
    -moz-column-rule: 1px solid var(--ef-background-gray-medium-light);
    column-rule: 1px solid var(--ef-background-gray-medium-light);
}

.country-pageQuickFactsGrid-item {
    display: inline-block;
    width: 100%;
    padding-bottom: 1rem;
}

/* CHART RANK COMPARISONS */

.chartRankComparisonWrapper {}

.chartRankComparisonCircleThisCountry {
    fill: var(--ef-black);
}

.chartRankComparisonCircleCompareCountry {
    fill: var(--ef-dv-higher)
}

.chartRankComparisonText {
    font-family: var(--font-family-sans-serif-alt);
    font-size: .875rem;
    line-height: .875rem;
    fill: var(--ef-black);
    text-anchor: middle;
    user-select: none;
}

.chartRankComparisonTextSpanRank {
    font-weight: 700;
}

.chartRankComparisonTextSpanName {
    font-weight: 400;
}

/* 12 ECONOMIC FREEDOMS CHART SCORES LOLLIPOP */

#chartScoresComponentsLollipopWrapper {}

#chartScoresComponentsLollipopWrapper .tick line,
#chartScoresComponentsLollipopWrapper .domain {
    stroke-width: 0;
}

.chartScoresComponentsLollipopLabels,
.chartScoresComponentsLollipopValues {
    font-family: var(--font-family-sans-serif-alt);
    font-size: .875rem;
    line-height: .875rem;
    font-weight: 400;
    text-anchor: end;
    alignment-baseline: middle;
    user-select: none;
}

.chartScoresComponentsLollipopValues {
    font-weight: 700;
}

.chartScoresComponentsLollipopAxisLines {
    stroke: var(--ef-black);
    stroke-width: 0.5;
    image-rendering: crisp-edges;
}

/* 12 MINI COMPONENT SCORE CHARTS */

/* Note: JS will get use width and height settings of DIV to make charts */
.chartComponentScoreMini {
    max-width: 800px;
    height: 18px;
}

.chartComponentScoreMini svg {
    background-color: var(--ef-background-gray-light);
}

.country-page12EconomicFreedoms-text {
    font-family: var(--font-family-sans-serif-alt);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

/* MODAL CUSTOMIZATION | COUNTRY PAGES */
.modal-content-indexTHF {
    background-color: var(--white);
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 0.25rem;
}

.modal-header-indexTHF {
    -ms-flex-align: start;
    align-items: flex-start;
    -ms-flex-pack: justify;
    justify-content: center;
    background-color: var(--ef-background-gray-light);
    text-transform: uppercase;
    letter-spacing: .05rem;
    border-bottom: 1px solid var(--ef-background-gray-medium-light);
}

.modal-body-indexTHF {
    font-family: var(--font-family-sans-serif-alt);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

.modal-body-indexTHF p:last-of-type {
    margin-bottom: 0;
}

.modal-body-indexTHF p.modal-body-indexTHF-sources {
    font-size: .875rem;
    line-height: 1.25;
    color: var(--mediumgray);
    margin-top: 1.5rem;
}

/* MODAL ICON */
.btn.btn-modal-icon {
    font-size: .8125rem;
    width: .8125rem;
    height: .8125rem;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    fill: var(--cyan-web);
    transition: fill .3s ease-in-out;
}

.btn.btn-modal-icon:active,
.btn.btn-modal-icon:hover {
    fill: #007eb3;
}

.btn.btn-modal-icon svg {
    width: .8125rem;
    height: .8125rem;
}

/* CHART SCORES OVER TIME */

#chartScoresOverTimeWrapper {}

/* Background line for scores over time plot */
.chartScoresOverTimeBaseLine {
    fill: none;
    stroke: rgb(210, 210, 210);
    stroke-width: 4px;
    stroke-linecap: round;
}

.chartScoresOverTimeDots {
    stroke: var(--ef-black);
    stroke-width: 1px;
}

/* Tick mark labels */
.tick text {
    font-family: var(--font-family-sans-serif-alt);
    font-size: .875rem;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    user-select: none;
    fill: rgba(17, 29, 34, .8);
    color: rgba(17, 29, 34, .8);
}

/* Tick lines */
.tick line,
.domain {
    stroke: var(--ef-background-gray-dark);
    stroke-width: 0.5px;
    image-rendering: crisp-edges;
}

.chartScoresOverTimeTooltipLine {
    fill: none;
    stroke: var(--ef-black);
    stroke-width: 1px;
}

.chartScoresOverTimeTooltipText {
    fill: var(--ef-black);
    text-anchor: middle;
    font-weight: 700;
    font-size: 1.125rem;
}

/* This applies a stroke to the tooltip text. The 'fill' and 'stroke' colors should match the background */
.chartScoresOverTimeTooltipTextWhiteStroke {
    fill: var(--ef-background-gray-light);
    stroke: var(--ef-background-gray-light);
    opacity: 0.8;
    stroke-width: 8;
    stroke-linejoin: round;
    text-anchor: middle;
    font-weight: 700;
    font-size: 1.125rem;
}