* {
    /* Force width to include padding */
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

a {
    text-decoration: none;
    color: lightblue;
}
a:hover {
    cursor: pointer;
    text-decoration: underline;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    font-family: sans-serif;
    background-color: #283640;
    overflow: hidden;
}

hr {
    background-color: gray;
    color: gray;
    border: none;
    height: 1px;
}

line, path {
    /*shape-rendering: crispEdges;*/
    /* will keep strokes unchanged after css transform (i.e. scale) */
    vector-effect: non-scaling-stroke;
}

.axis path,
.axis line {
    shape-rendering: crispEdges;
}

.flag {
    vertical-align: sub;
}

.flash-message {
    position: fixed;
    display: block;
    z-index: 99;
    height: 40px;
    left: 0;
    transition: all 0.5s ease;
    width: 100%;
    top: -70px; /* hidden state */
}
.flash-message .inner {
    display: block;
    margin: 0 auto;
    padding: 10px;
    text-align: center;
    color: white;
    font-size: 0.8em;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
    max-width: 750px;
}

#connection-warning .inner {
    background-color: red;
}
#new-version .inner {
    background-color: #3F51B5;
}

.watermark {
    vertical-align: bottom;
    text-align: right;
}
.overlay {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    z-index: 999;
}
.loading {
    opacity: 0.7;
    background: black url('../images/loading.svg') no-repeat center center;
}
#main {
    width: 100%;
    height: 100%;
}
#map-container {
    height: 100%;
    width: auto;
    overflow: hidden;
    position: relative;
}
.map-layer {
    position: absolute;
    top: 0;
    transform-origin: 0px 0px 0px;
}
.wind {
    pointer-events: none;
    opacity: 0;
}
.solar {
    pointer-events: none;
    opacity: 0;
}
.graticule {
    fill: none;
    stroke: #185c96;
    stroke-width: 0.7px;
}
.panel {
    background-color: rgb(70, 70, 70);
    color: lightgray;
    font-size: 0.8rem;
}
.left-panel {
    float: left;
    padding: 1rem;
    line-height: 1.2rem;
    height: 100%;
    width: 24rem;
    position: relative;
    overflow-y: auto;
    border-top: none;
    border-left: none;
    border-bottom: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    -webkit-box-shadow: 0 0 20px rgba(0,0,0,0.3);
    -moz-box-shadow: 0 0 20px rgba(0,0,0,0.3);
    z-index: 9;
}
.left-panel h1 {
    line-height: 1.3;
    color: white;
    font-size: 1.6em;
    margin: 0;
}
.left-panel > svg {
    display: block;
}
.left-panel, left-panel.text {
    color: lightgray;
    fill: lightgray;
}
.left-panel .axis .tick line {
    opacity: 0.3;
    shape-rendering: crispEdges;
    stroke: gray;
    stroke-width: 1;
}
.left-panel .axis .tick text {
    fill: gray;
    font-size: 0.6rem;
}
.left-panel .axis path.domain {
    fill: none;
    opacity: 0.3;
    shape-rendering: crispEdges;
    stroke: gray;
}
.left-panel-toolbar,
.left-panel-country-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 1rem;
    position: relative;
}
.left-panel-toolbar .left-panel-toolbar-back,
#left-panel-country-back, #left-panel-highscore-back {
    padding: 0.4rem 1rem 0.5rem 1rem;
    line-height: 1;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    cursor: pointer;
    font-size: 2rem;
}
.left-panel-toolbar .left-panel-toolbar-back:hover,
#left-panel-country-back:hover, #left-panel-highscore-back:hover {
    background: rgba(0, 0, 0, 0.2);
}
.left-panel .left-panel-toolbar-title,
.left-panel-country .country-name {
    font-size: 1.5rem;
    line-height: 1.5rem;
}
.left-panel-toolbar-right-placeholder {
    width: 2.875rem;
}

.country-name-time {
    text-align: center;
    margin: 0rem 0.5rem;
}
.country-time {
  white-space: nowrap;
}
.country-table {
    width: 100%;
}
.country-table-header-inner {
    display: flex;
    flex-basis: 33.3%;
    justify-content: space-between;
}
.country-history {
    width: 100%;
    height: 10rem;
}
.left-panel-initial-text {
    font-size: 1.1em;
    color: darkgrey;
}
.country-emission-intensity,
.country-spot-price,
.emission-intensity,
#exchange-tooltip .flow {
    font-weight: bold;
}
.emission-rect-overview {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    font-size: 1rem;
    border-radius: 0.125rem;
    color: #fff;
    flex-direction: column;
    justify-content: center;
}
.emission-rect {
    display: inline-block;
    width: 8px;
    height: 8px;
}
.left-panel .country-spot-price {
    font-size: 1rem;
    display: block;
    width: 100%;
}
.left-panel .country-spot-price-wrap {
    border: 1px solid white;
    color: white;
    border-radius: 0.125rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    justify-content: center;
    margin: 0 auto;
    flex-direction: column;
}
.country-col {
    text-align: center;
}
.country-col .country-col-headline {
    font-size: 1rem;
    line-height: 1;
}
.country-col .country-col-headline + div {
    margin-top: 0.375rem;
}
.country-col .country-col-subtext {
    margin-top: 0.375rem;
    font-size: 0.5rem;
    line-height: 0.5rem;
}
.country-col .country-col-box {
    margin: 0 auto;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3rem;
    height: 3rem;
    color: #fff;
    border-radius: 0.125rem;
}
.country-col.country-col-fossilpct .country-col-box {
    border:1px solid #000;
    background: #000;
}
.country-toggle-emissions {
    text-align: center;
    margin: 1rem 0 1rem;
    display: flex;
    justify-content: space-around;
}
.country-toggle-emissions a {
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    text-transform: capitalize;
}
.country-toggle-emissions a:hover {
    text-decoration: none;
    background: rgba(0, 0, 0, 0.2);
}
.country-show-emissions-wrap {
    margin: 2.0rem 0 0.5rem;
}
.country-show-emissions-wrap .menu {
    font-size: 1rem;
}
.country-show-emissions-wrap .menu .selected {
    color: darkgray;
    font-weight: bold;
    pointer-events: none;
}

.country-price-wrap,
.country-emission-intensity-wrap {
    text-align: center;
}

/* ** LEGEND ** */
.layer-toggle {
    font-size: 0.7rem;
}
.colorbar {
    height: 30px;
    /* This will make sure childs are relative to 1em */
    font-size: 1rem;
}

@keyframes appear-from-top {
  0% {
    top: -40px;
  }
  15%,85% {
    top: 0;
  }
  100% {
    top: -40px;
  }
}

div.fb-share-button, div.fb-like, div.fb-follow, iframe.twitter-share-button, iframe.twitter-follow-button, .slack-button {
    vertical-align: bottom;
}
/* In cordova, because we serve from file://, facebook disables their button */
/* Here we have taken the choice of keeping a fixed width */
div.fb-like span, div.fb-like span iframe {
  width: 51px !important; /* should be large enough for all locales. en: 51px */
  height: 20px !important;
}
div.fb-share-button span, div.fb-share-button span iframe {
  width: 83px !important; /* should be large enough for all locales. en: 83px */
  height: 20px !important;
}

.tooltip {
    border: 1px solid grey;
    color: darkgrey;
    display: none;
    padding: 5px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9;
}

.watermark {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 18px;
}

div.highscore-button {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 18px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    cursor: pointer;
    color: #fff;
}
.highscore-button:hover {
    background: rgba(0, 0, 0, 0.4);
}

#country-tooltip {
    display: none;
}
#country-tooltip.country-tooltip-visible {
    display: inline;
}

.country-picker-container {
}
.country-picker-container p {
    column-count: 2;
    counter-reset: section;
    margin: -0.25rem 0 0;
}
.country-picker-container a {
    display: block;
    font-size: 1rem;
    justify-content: space-between;
    align-items: baseline;
    line-height: 1.8rem;
    box-sizing: content-box;

    /* formatting */
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.country-picker-container a:hover {
    text-decoration: none;
    background: rgba(255,255,255,0.1)
}
.country-picker-container .emission-rect {
    width: 0.8rem;
    height: 0.8rem;
}

.country-picker-container a > span {
    flex-grow: 1;
    line-height: 1.2rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.slack-button {
    display: inline-block;
    height: 20px;
}
.slack-btn {
    background-color: #eee;
    background-image: linear-gradient(#fcfcfc, #eee);
    background-repeat: no-repeat;
    border: 1px solid #d5d5d5;
    color: #333;
    padding: 2px 5px 2px 4px;
    text-decoration: none;
    text-shadow: 0 1px 0 #fff;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 3px;
    font-weight: bold;
    float: left;
    line-height: 14px;
}
.slack-ico {
    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTE4IiBoZWlnaHQ9IjExOCIgdmlld0JveD0iMCAwIDExOCAxMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkdyb3VwPC90aXRsZT48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMC4yNTggNjIuODZjLTQuMzk1LjAzMi04LjExOC0yLjU4Ny05LjQ5LTYuNjc0LS4wNTMtLjE2LS4xLS4zMTQtLjE0My0uNDY2Qy0uODcgNTAuNDg0IDIuMDMgNDUuMDA4IDcuMjMgNDMuMjU1TDkwLjYxMyAxNS4zMmExMS4zMSAxMS4zMSAwIDAgMSAzLjA0Ni0uNDQ2YzQuNTEtLjAzNiA4LjMzIDIuNjQgOS43NCA2LjgxNmwuMTIuNDAzYzEuNTYgNS40NTItMi4zMiAxMC4zMi02Ljk2IDExLjg4bC04Mi45MiAyOC4zMWExMC44OCAxMC44OCAwIDAgMS0zLjM5LjU3NiIgZmlsbD0iIzcwQ0FEQiIvPjxwYXRoIGQ9Ik0yNC4xNTcgMTAzLjg2N2MtNC40MjguMDMyLTguMTY1LTIuNTUtOS41Mi02LjU3OC0uMDUtLjE2LS4xLS4zMS0uMTQzLS40N2ExMC4yOCAxMC4yOCAwIDAgMSA2LjU5Ni0xMi41OWw4My4zODgtMjguMTlhMTAuNzEgMTAuNzEgMCAwIDEgMy4zMDctLjU2YzQuNDQyLS4wMzYgOC4zNDQgMi42OCA5LjcyIDYuNzUybC4xMy40MjZjLjgwMyAyLjgxMy4zMjggNS45OC0xLjI3MiA4LjQ3Ny0xLjE5NSAxLjg2LTQuOTYgMy40OTQtNC45NiAzLjQ5NEwyNy43IDEwMy4yNjRjLTEuMTY1LjM5LTIuMzU1LjU5My0zLjU0LjYwNCIgZmlsb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ii8+PHBhdGggZD0iTTY2LjAzNyA0NC4zOTZsMTkuNDA3LTYuNjI1LTYuMjY4LTE4LjYyLTE5LjQ0NCA2LjUyIDYuMzA1IDE4LjczIiBmaWxsPSIjNjU4NjNBIi8+PHBhdGggZD0iTTI0LjczIDU4LjQ5OGwxOS40MDctNi42MjUtNi4zNDYtMTguODU2LTE5LjQ0IDYuNTEzIDYuMzkgMTguOTY4IiBmaWxsPSIjMUE5MzdEIi8+PC9nPjwvc3ZnPg==);
    width: 14px;
    height: 14px;
    margin-right: 4px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    float: left;
}

.arrows-layer {
    position: absolute;
    width: 0;
    height: 0;
    transform: translateZ(0);
}

.arrows-layer .exchange-arrow {
    position: absolute;
}

.arrows-layer .exchange-arrow img {
    position: absolute;
    left: -25px;
    top: -41px;
}

#bottom-menu {
    width: 100%;

    /* Shadow */
    box-shadow: 0 0 20px 0px rgba(0,0,0,0.3);
    -webkit-box-shadow: 0 0 20px 0px rgba(0,0,0,0.3);
    -moz-box-shadow: 0 0 20px 0px rgba(0,0,0,0.3);
    position: relative; z-index: 99; /* to appear on top of all */
}
#bottom-menu .list-item {
    background-color: rgb(50, 50, 50);
    font-size: 0.8rem;
    display: flex;

    align-items: center;
    justify-content: center;
    text-align: center;

    width: 50%;
    line-height: 1.2rem;
}
#bottom-menu .list-item.active {
    color: white;
}
#bottom-menu a {
    color: darkgrey;
}
#bottom-menu a:hover {
    color: white;
    text-decoration: none;
}

.weather-buttons {
    display: flex;
    position: absolute;
    bottom: 0px;
    left: 0px;
}
.weather-buttons a {
    border-radius: 15%;
    background-color: lightgray;
    margin-left: 0.6rem;
    margin-bottom: 0.6rem;
    margin-top: 0.6rem;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    width: 3.0rem;
    height: 3.0rem;
}
.weather-buttons img {
    height: 1.2rem;
    filter: unset;
}
.weather-buttons .active img {
    filter: brightness(0%);
}

/* Medium and large devices (tablets, desktops, etc.) */
@media (min-width: 768px) {
    .small-screen-visible {
        display: none;
    }
    .left-panel, #map-container {
        height: 100%;
    }
    #bottom-menu {
        display: none;
    }
}

/* Small devices (phones, etc.) */
@media (max-width: 768px) {
    .large-screen-visible {
        display: none;
    }
    .left-panel {
        width: 100%;
    }
    .left-panel-welcome {
        display: none;
    }
    #country-tooltip.country-tooltip-visible {
        display: none;
    }
    #map-container {
        width: 100%;
    }
    div.highscore-button {
        display: none;
    }
    .left-panel, #map-container {
    height: 90%;
    }
    #bottom-menu {
        display: flex;
        height: 10%;
    }
}
