@import 'https://fonts.googleapis.com/css?family=Roboto+Slab:300,400|Roboto:400,700';
body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
}

h1 {
    font-size: 30px;
    letter-spacing: .025em;
    color: #444;
    text-align: center;
    font-family: 'Roboto', sans-serif;
}

p {
    line-height: 1.6;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
}


/*----------  Research tooltip  ----------*/

.definitionTooltip {
    border-bottom: 1px dotted #ccc;
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.definitionTooltiptext {
    display: none;
    position: absolute;
    background-color: #555;
    color: #fff;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    z-index: 50;
    top: -15px;
    left: 150px;
    min-width: 320px;
}

.definitionTooltip:hover ~ .definitionTooltiptext {
    display: block;
}


/*----------  Scroll Message  ----------*/

.scrollMessage {
    color: gray;
    text-align: center;
    display: block; 
    margin-left:80px;
    height: initial !important;
}

.chevron::before {
    border-style: solid;
    border-width: 0.15em 0.15em 0 0;
    content: '';
    display: inline-block;
    height: 1em;
    left: 0.15em;
    position: relative;
    top: 0.15em;
    transform: rotate(-45deg);
    vertical-align: top;
    width: 1em;
    top: 0;
    transform: rotate(135deg);
    margin: 1em 0 .5em;
}

/*----------  Panels  ----------*/

.description-container {
    max-width: 970px;
    margin: 0 auto;
}

.interactive-container {
    float: right;
    width: calc(100% - 380px);
    margin-bottom: 30px; 
}

.topPanel {
    width: 100%;
}

.leftPanel {
    width: 100%;
    height: 450px;
    overflow-x: hidden;
}


/*----------  Axes  ----------*/

.axis path,
.axis line {
    fill: none;
    stroke: #000;
    shape-rendering: crispEdges;
}

.y.axis path,
.y.axis .tick line {
    display: none;
}

.tick text {
    font-size: 12px;
}

.tick text.china {
    fill: #772031;
    font-weight: bold;
    text-transform: uppercase;
}

.xAxisTitle {
    color: #000;
    font-style: italic;
    font-size: 16px;
}


/*----------  Tooltip  ----------*/

.tooltip {
    display: block;
    float: right;
    margin-left: 20px;
}


/*----------  Legend  ----------*/

.legend-container {
    padding: 30px;
}

.legend-box {
    width: 100%;
}

.legend-box h2 {
    font-style: italic;
    font-weight: normal;
    font-size: 16px;
}

ul.legend {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 30px;
}

ul.legend > li {
    margin-bottom: 0.5rem;
    font-size: 12px;
    display: table;
}

ul.legend .legend-box {
    width: 25px;
    height: 20px;
    display: table-cell;
}

ul.legend .legend-info {
    display: table-cell;
    vertical-align: middle;
    padding-left: 0.5rem;
}

.legend-box.high {
    background-color: #58a891;
}

.legend-box.upperMiddle {
    background-color: #89badb;
}

.legend-box.lowerMiddle {
    background-color: #3b75bb;
}

.legend-box.low {
    background-color: #f78908;
}

.legend-box.poor {
    background-color: #ec391b;
}

.legend-class {
    font-weight: bold;
}

.legend-left {
    width: 60%;
    float: left;
}

.legend-right {
    width: 30%;
    float: left;
}

.legend-right li {
    height: 20px;
}

.country-name {
    font-weight: 700;
}

.legend-header {
    padding-bottom: 10px;
    display: inline-block;
    text-align: center;
}

.callToAction {
    text-align: center;
    font-style: italic;
    font-size: 12px;
    padding: 0 30px;
    margin-top:0;
    margin-bottom: 20px;
}

.form {
    font-family: 'Roboto', sans-serif;
    background-color: #eee;
    width: 380px;
    float:left;
    margin-top: 60px;
}

h3 {
    margin: 0 0 5px;
    color: white;
    font-weight: 400;
    font-size: 200%;
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    line-height: 35px;
}

h4 {
    margin: 0;
    font-size: 120%;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 5px;
    margin-left: 5px;
    width: 85%;
}

.clear {
    clear: both;
}

.form-intro {
    padding: 30px;
    background-color: #772132;
    color: #ddd;
}

.form-choices {
    padding: 25px;
    height: 100%;
    background-color: #ddd;
    position: relative;
}

.form-choices .form-block {
    font-size: 12px;
    display: block;
    position: relative;
    float: left;
    width: 45%;
    height: 100%;
    padding-right: 15px;
}

input {
    visibility: hidden;
}

.checkbox,
.radio {
    margin-left: -10%;
    display: block;
    float: left;
}

#regionFilter input + div,
#sortField input + div {
    display: inline-block;
    border-radius: 2px;
    border: 2px solid #ED392A;
    padding: 8px;
    margin: 2px 0px;
    text-transform: uppercase;
    font-weight: bold;
    line-height: 1em;
}

#regionFilter input + div:hover,
#sortField input + div:hover {
    background-color: #772132;
    border: 2px solid #772132;
    color: white;
    -webkit-transition: .25s ease-in-out;
    -moz-transition: .25s ease-in-out;
    -o-transition: .25s ease-in-out;
    transition: .25s ease-in-out;
}

.checkbox input:checked + div,
.radio input:checked + div {
    display: inline-block;
    background-color: #772132 !important;
    border: 2px solid #772132 !important;
    color: white;
}

.humanDev {
    margin-bottom: 10px;
}

.tooltip-container {
    padding: 30px;
}

.explanation {
    clear: both;
    font-size:13px;
    font-style:italic;
    margin: 0 auto;
    max-width:970px;
}

.source {
  text-align:right;
  font-size: 9px;
  margin: 10px auto;
}

.stateNames-mobile {
    display: none;
    fill: white;
    font-size: 14px;
    font-weight: bold;
}

/*----------  Responsive  ----------*/
@media screen and (max-width: 700px) {
    .interactive-container {
        float: none;
        width: 100%;
        margin-top: 10px;
    }
    
    .form {
        width: 100%;
        float: none;
    }

    .form-choices .form-block {
        width: 100%;
    }

    #sortField {
        margin-bottom: 10px;
    }

    .checkbox, .radio {
        margin-left: -3%;
    }

    .y.axis {
        display: none;
    }

    .scrollMessage {
        margin-left: 0;
    }

    .stateNames-mobile {
        display: block;
    }
}
