@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;600;800&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* border: 1px red solid; */
}

:root {
  --text: hsl(200, 15%, 8%);
  --background: hsl(0, 0%, 98%);
  --input: hsl(0, 0%, 100%);
  --elements: hsl(0, 0%, 100%);
}

/* General Styling */
html {
  font-size: 62.5%;
  height: 100%;
}

body {
  font-family: "Nunito Sans", sans-serif;
  font-size: 1.6rem;
  color: var(--text);
  min-height: 100%;
}

/* h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1.5rem;
} */

p {
  margin-bottom: 1.5rem;
}

a {
  text-decoration: none;
  color: black;
}

ul {
  list-style: none;
}

/* Utility classes */
.container {
  max-width: 1300px;
  margin: auto;
}

.flex {
  display: flex;
}

.hidden {
  display: none !important;
}

/* CSS Styling */
#loading-bar-spinner.spinner {
  left: 50%;
  margin-left: -20px;
  top: 50%;
  margin-top: -20px;
  position: absolute;
  z-index: 19 !important;
  animation: loading-bar-spinner 400ms linear infinite;
}

#loading-bar-spinner.spinner .spinner-icon {
  width: 40px;
  height: 40px;
  border: solid 4px transparent;
  border-top-color: #00c8b1 !important;
  border-left-color: #00c8b1 !important;
  border-radius: 50%;
}

@keyframes loading-bar-spinner {
  0% {
    transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

.error-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
}

.error {
  font-weight: 600;
  font-size: 3rem;
}

#navbar {
  padding: 2rem 4rem;
  background: var(--elements);
  border-bottom: 1px #e6e6e6 solid;
}

#navbar .flex {
  justify-content: space-between;
}

.logo-heading {
  font-size: 2.5rem;
  font-weight: 800;
}

.btn-theme {
  padding-top: 0.25rem;
}

.btn-theme-icon {
  font-size: 2.25rem;
  margin-right: 1rem;
  align-self: center;
  color: var(--text);
}

.btn-theme-text {
  align-self: center;
  color: var(--text);
}

/* .btn-theme .flex {
  align-content: center;
  align-items: center;
} */

.search-container {
  /* background-color: white; */
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  position: relative;
  padding-left: 1rem;
  flex-basis: 35%;
  background: var(--input);
}

.search-filter {
  padding: 3rem 4rem 0rem 4rem;
}

.search-container input {
  padding: 1.5rem;
  margin-left: 2rem;
  outline: none;
  border: none;
  font-size: 1.8rem;
  background-color: var(--elements);
  color: var(--text);
}

.search-container i {
  position: absolute;
  top: 15px;
  font-size: 1.9rem;
  left: 15px;
}

.search-container input::placeholder {
  font-size: 1.5rem;
  color: var(--text);
}

main {
  background: var(--background);
  min-height: 100vh;
}

main .flex {
  justify-content: space-between;
}

#filter {
  padding: 1.5rem 5rem 1.5rem 1.5rem;
  outline: none;
  border: none;
  font-size: 1.7rem;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  background-color: var(--elements);
  color: var(--text);
}

.filter-container {
  position: relative;
}

.custom-arrow {
  position: absolute;
  top: 0;
  right: 0;
  background: white;
  display: block;
  height: 100%;
  width: 4rem;
  pointer-events: none;
  background-color: var(--elements);
}

.arrow-icon {
  position: absolute;
  top: 16px;
  left: 14px;
  font-size: 1.8rem;
}

.country-card {
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  border-radius: 7px;
  background-color: var(--elements);
}

.country-card:hover {
  cursor: pointer;
}

.country-card img {
  width: 100%;
  height: 40%;
  border-radius: 7px 7px 0px 0px;
}

.country-card .country-text {
  padding: 3rem 2rem 1rem 3rem;
  font-size: 1.8rem;
}

.country-info {
  font-weight: 600;
}

.country-card .country-text h3 {
  margin-bottom: 1.5rem;
  font-size: 2.25rem;
}

.country-card .country-text p {
  margin-bottom: 0.75rem;
}

.grid-main {
  padding: 5rem 4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 5rem;
}

.btn-back {
  display: block;
  background-color: var(--elements);
  padding: 1rem 1rem 1rem 2rem;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  margin-bottom: 2rem;
  width: 12rem;
  color: var(--text);
  margin-bottom: 5rem;
}

.btn-back i {
  margin-right: 0.5rem;
  margin-left: 1rem;
  position: relative;
  top: 0.12rem;
  font-size: 1.8rem;
}

/* .grid-details img {
  width: 40%;
}

.grid-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 2fr 1fr;
  grid-gap: 15rem;
}

.grid-details img {
  grid-row: 1 / span 2;
  grid-column: 1 / span 2;
  height: 100%;
}

.grid-details h3 {
  font-size: 3rem;
  margin-bottom: 2rem;
}

.grid-details {
  grid-column: 2 / span 3;
  grid-row: 1 / span 2;
}

.grid-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(5, 1fr);
} */

.details-bg {
  background-color: var(--elements);
  height: 100vh;
  padding: 0rem 4rem;
}

.details-wrapper {
  padding-right: 1.5rem;
  padding-top: 4rem;
}

.details-wrapper .flex {
  justify-content: space-between;
}

.details-wrapper img {
  flex-basis: 40%;
}

.details-wrapper .country-details {
  flex-basis: 50%;
}

.details-wrapper h3 {
  font-size: 3rem;
  margin-bottom: 2rem;
}

.details-wrapper p {
  font-size: 1.7rem;
  margin-bottom: 0.75rem;
}

.details-wrapper .flex {
  margin-bottom: 4rem;
}

.border-countries-container {
  display: flex;
  padding-bottom: 2rem;
}

.border-countries-container span {
  font-weight: 600;
  font-size: 1.7rem;
  padding-top: 1.5rem;
  margin-bottom: 0rem;
}

.border-countries {
  display: flex;
  flex-wrap: wrap;
  /* margin-top: -10px; */
}

.country {
  align-self: center;
  font-size: 1.6rem;
  background-color: var(--elements);
  padding: 0.75rem 1.5rem;
  /* border: 1px #e6e6e6 solid; */
  margin-right: 0.75rem;
  margin-top: 1rem;
  color: var(--text);
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

@media only screen and (max-width: 1200px) {
  .grid-main {
    grid-template-columns: repeat(3, 1fr);
  }
  .flex img {
    flex-basis: 45%;
  }

  .details-wrapper .flex {
    flex-basis: 45%;
  }
  .border-countries-container {
    flex-wrap: wrap;
    padding-top: 1rem;
  }
  .details-wrapper {
    padding-bottom: 2rem;
  }
}

@media only screen and (max-width: 992px) {
  .details-wrapper > .flex {
    flex-direction: column;
  }
  .details-wrapper img {
    margin-bottom: 4rem;
  }
  .details-bg {
    height: 100%;
  }
  .border-countries-container {
    padding-bottom: 4rem;
  }
}

@media only screen and (max-width: 900px) {
  .grid-main {
    grid-template-columns: repeat(2, 1fr);
  }
  .border-countries-container {
    padding-bottom: 0rem;
  }
}

@media only screen and (max-width: 600px) {
  input {
    width: 100%;
  }
  .grid-main {
    grid-template-columns: 1fr;
  }
  .search-filter {
    flex-direction: column;
  }

  .search-container {
    margin-bottom: 2rem;
  }
  .filter-container select {
    display: block;
    width: 100%;
  }
  #navbar h3 {
    font-size: 1.8rem;
  }
  .btn-theme {
    padding-top: 0.225rem;
    font-size: 1.6rem;
  }

  .btn-theme-icon {
    font-size: 1.8rem;
    margin-right: 0.4rem;

    padding-bottom: 0.1rem;
  }
  #navbar {
    padding: 2rem 3rem;
  }

  .details-bg {
    padding: 0rem 1rem 0rem 2.5rem;
  }

  .country-details {
    padding-left: 0.5rem;
  }

  .border-countries-container {
    padding-bottom: 4rem;
  }

  .border-countries-container span {
    margin-bottom: 0rem;
  }

  .country-details .flex {
    flex-direction: column;
  }
  .details-wrapper {
    padding-bottom: 0rem;
  }
}
