/* || GENERAL STYLES */

* {
    font-family:  "Roboto-flex", Helvetica, Arial, sans-serif;

    scrollbar-color: grey transparent;
    scrollbar-width: thin;

    cursor: default;
}

@font-face {
    font-family: 'Roboto-flex';
    src:  url('roboto_flex_latin.woff2') format('woff2');
    font-weight: 100 1000;
  }

*::-webkit-scrollbar-track {
    background-color: transparent;
}
  
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
  
*::-webkit-scrollbar-thumb {
    background-color: grey;
}


/* || SITEWIDE */

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    height: 80px;
    padding-left: 20px;

    background-color: #6868BE;
    color: white;
    white-space: nowrap;

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

nav {
    height: 50px;

    background-color: #C7C7FF;
    color: white;

    display: flex;
    align-items: center;
}

nav ul {
    padding: 0;
    list-style-type: none;
    display: flex;
    flex-grow: 1;
    justify-content: flex-start;
    align-items: center;
}

article {
    flex-grow: 1;
}

footer {
    background-color: #6868BE;
    padding: 5px;
}

h1 {
    font-size: 3em;
}

a {     
    display: inline-block;     
    position: relative;    
    z-index: 1;     
    padding: 0.5em;     
    margin: -0.5em; 
 }

svg {
    width: 100%;
    height: 100%;
}


/* || CLASS/ID SPECIFIC */

.hidden {
    opacity: 0;
    visibility: hidden;
}

#loading-overlay {
    opacity:    0.8; 
    background: rgba(0, 0, 0, 0.8); 
    width:      100%;
    height:     100%; 
    z-index:    10;
    top:        0; 
    left:       0; 
    position:   fixed; 

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

    transition: 0.1s;
}

.nav-button {
    height: 50px;
    border: none;
    padding: 0 20px;
    margin: 0;

    background-color: #C7C7FF;
    color: white;

    font-size: 1.5em;
    font-weight: lighter;

    transition: 0.3s;
}

.nav-button:not(.nav-button-active):hover {
    background-color: #B8B8FF;
}

.nav-button-active {
    background-color: #9393FF;
    font-weight: normal;
}

#monocle-item {
    margin: auto 10px auto auto;
    border: 2px solid;
    border-radius: 10px;
    padding: 5px;
}

#monocle-link {
    color: white;
    text-decoration: none;
    font-size: 1.3em;
    white-space: nowrap;

    display: flex;
    gap: 0.5em;
}

#monocle-link:hover  {
    text-decoration: underline;
}

#monocle-new-window-icon {
    width: 20px;
}

.content {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;

    overflow: auto;
}

.content-container {
    grid-row-start: 1;
    grid-column-start: 1;
    transition: 0.3s;
}

#summary-view {
    display: flex;
    align-items: center;
    gap: 3em;
    width: 90vw;
    margin: 2em auto;
}

#summary-view:before {
    content: "";
    border: 1px solid #6868BE;
    align-self: stretch;
}

#summary-view-left {
    flex: 1;
    order: -1;

    display:flex;
    flex-direction: column;
    gap: 4em;
}

.summary-view-left-container {
    display: flex;
    gap: 2em;
}

.summary-view-left-container-left-icon {
    width: 80px;
}


.summary-view-left-container-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 0px;
    white-space: nowrap;
}

.summary-view-left-container-right-top {
    font-size: 1.3em;
    font-weight: bold;
}

.summary-view-left-container-right-bottom {
    font-size: 2em;
}

#summary-view-right {
    flex: 3;

    display:flex;
    flex-direction: column;
    gap: 4em;
}

.summary-view-right-container {
    display: flex;
    justify-content: space-around;
    gap: 2em;
}

.summary-view-right-container-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

.summary-view-right-container-container-top-chart {
    width: 15vw;
    max-width: 250px;
}

.summary-view-right-container-container-bottom-chart {
    width: 30vw;
    max-width: 800px;
}

.summary-view-right-container-container-title {
    font-size: 1.3em;
    font-weight: bold;
    white-space: nowrap;
}

#by-country-view {
    display: flex;
    align-items: center;
    justify-content: center;
}

#by-country-view-map {
    display: flex;
    flex-direction: column;
    align-items: center;

    max-height: 80vh;
}

#by-country-view-list {
    height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
}

#by-country-view-list ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

#by-country-view-list ul li {
    padding: 10px;
    border-radius: 10px;
    transition: 0.3s;
}

#by-country-view-list ul li:hover {
    background-color: #B8B8FF;
}

#world-map {
    width: 80vw;
    max-width: 1200px;
}

#country-list-search {
    background-image: url('../images/search_icon.svg');
    background-position: 10px 12px;
    background-size: 1em;
    background-repeat: no-repeat;

    font-size: 1em;
    padding: 12px 20px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 10px;
}

#country-list {
    max-height: 80vh;
    overflow-y: auto;
}

#by-country-view-infobox {
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    width: 300px;
    height: 50px;

    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;

    transition: 0.3s;
}

#by-country-view-infobox.infobox-active {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

#by-country-view-infobox-instruction{
    grid-row-start: 1;
    grid-column-start: 1;

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

    color: #D3D3D3;
    
    transition: 0.3s;
}

#by-country-view-infobox-display {
    grid-row-start: 1;
    grid-column-start: 1;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5em;

    transition: 0.3s;
}

#by-country-view-infobox-value {
    font-weight: bold;
    font-size: 1.3em;
}

#by-country-view-infobox-prompt {
    color: #D3D3D3;
}

#by-country-view-details {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#back-to-map-item {
    margin: 10px;
    border: 2px solid #6868BE;;
    border-radius: 10px;
    padding: 5px;

    align-self: flex-start;
}

#back-to-map-link {
    color: #6868BE;
    text-decoration: none;
    font-size: 1.3em;
    white-space: nowrap;
    
    display: flex;
    gap: 0.5em;
}

#back-to-map-link:hover  {
    text-decoration: underline;
}

#back-to-map-icon {
    width: 20px;
}

#by-country-view-details-title {
    font-size: 2em;
    font-weight: bold;
}

#by-country-view-details-content {
    flex-grow: 1;
    align-self: stretch;
    margin: 0 5vw;

    display: flex;
    align-items: center;
}

#by-country-view-details-content-button-group {
    display: flex;
    flex-direction: column;
}

.country-button {
    height: 50px;
    width: 200px;
    border: none;
    padding: 0;

    background-color: #C7C7FF;
    color: white;

    font-size: 1.2em;
    font-weight: lighter;

    transition: 0.3s;
}

.country-button:first-of-type{
    border-radius: 5px 5px 0px 0px;
}

.country-button:last-of-type{
    border-radius: 0px 0px 5px 5px;
}

.country-button:not(.country-button-active):hover {
    background-color: #B8B8FF;
}

.country-button-active {
    background-color: #9393FF;
    font-weight: normal;
}

#by-country-view-details-content-chart {
    flex-grow: 1;

    display: flex;
    justify-content: center;
}

.footer-hyperlink {
    color: white;
    text-decoration: none;
    font-size: 1em;
    margin: 5px;
    white-space: nowrap;
}

.footer-hyperlink:hover {
    text-decoration: underline;
}

/* Loading Spinner */

.lds-roller {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}
.lds-roller div {
    animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    transform-origin: 40px 40px;
}
.lds-roller div:after {
    content: " ";
    display: block;
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    margin: -4px 0 0 -4px;
}
.lds-roller div:nth-child(1) {
    animation-delay: -0.036s;
}
.lds-roller div:nth-child(1):after {
    top: 63px;
    left: 63px;
}
.lds-roller div:nth-child(2) {
    animation-delay: -0.072s;
}
.lds-roller div:nth-child(2):after {
    top: 68px;
    left: 56px;
}
.lds-roller div:nth-child(3) {
    animation-delay: -0.108s;
}
.lds-roller div:nth-child(3):after {
    top: 71px;
    left: 48px;
}
.lds-roller div:nth-child(4) {
    animation-delay: -0.144s;
}
.lds-roller div:nth-child(4):after {
    top: 72px;
    left: 40px;
}
.lds-roller div:nth-child(5) {
    animation-delay: -0.18s;
}
.lds-roller div:nth-child(5):after {
    top: 71px;
    left: 32px;
}
.lds-roller div:nth-child(6) {
    animation-delay: -0.216s;
}
.lds-roller div:nth-child(6):after {
    top: 68px;
    left: 24px;
}
.lds-roller div:nth-child(7) {
    animation-delay: -0.252s;
}
.lds-roller div:nth-child(7):after {
    top: 63px;
    left: 17px;
}
.lds-roller div:nth-child(8) {
    animation-delay: -0.288s;
}
.lds-roller div:nth-child(8):after {
    top: 56px;
    left: 12px;
}
@keyframes lds-roller {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
}