@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Manrope:wght@200;300;400;500;600;700;800&family=Oswald:wght@300;500&family=Source+Sans+Pro:wght@200;300;400;600;700;900&display=swap");

:root {
  --dark-blue: hsl(209, 23%, 22%); /* Dark Mode Elements */
  --very-dark-blue: hsl(207, 26%, 17%); /* Dark Mode Background */
  --very-dark-blue: hsl(200, 15%, 8%); /* Light Mode Text */
  --dark-gray: hsl(0, 0%, 52%); /* Light Mode Input */
  --very-light-gray: hsl(0, 0%, 98%); /* Light Mode Background */
  --white: hsl(0, 0%, 100%); /* Dark Mode Text & Light Mode Elements */
  --color-text: hsl(200, 15%, 8%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--very-light-gray);
  color: var(--color-text);
  font-size: 14px;
  font-family: "Manrope", sans-serif;
}

.dark-mode {
  background-color: rgba(30, 30, 30, 1);
  color: white;
}

.title {
  background-color: white;
  padding: 10px 20px;
  border-radius: 15px;
  font-size: 42px;
}

.filters,
main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

header {
  background: #333;
  margin-bottom: 32px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  padding: 32px 0;
  max-width: 1280px;
}

header button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 32px;
}

.filters {
  display: none;
}

.filters.active {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

/* #query {
  border: none;
  background-color: var(--very-light-gray);
  -webkit-box-shadow: 1px 1px 29px -10px rgba(66, 68, 90, 1);
  -moz-box-shadow: 1px 1px 29px -10px rgba(66, 68, 90, 1);
  box-shadow: 1px 1px 29px -10px rgba(66, 68, 90, 1);
  padding: 15px 30px;
  margin-bottom: 30px;
} */

ul {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  gap: 50px;
  list-style: none;
}

li {
  box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px,
    rgba(0, 0, 0, 0.22) 0px 15px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: 0.3s ease-in-out all;
}

li a {
  color: var(--color-text);
  text-decoration: none;
}

li img {
  aspect-ratio: 160/98;
  width: 100%;
}

li:hover {
  transform: translateY(-5px);
  box-shadow: rgba(0, 0, 0, 0.56) 0px 22px 70px 4px;
}

.info-container {
  padding: 30px 20px;
}

.country-name {
  display: block;
  font-size: 18px;
  margin-bottom: 10px;
}

.detail-button {
  color: var(--color-text);
  text-decoration: none;
  background: transparent;
  padding: 10px 30px;
  margin-top: 5px;
  margin-right: 20px;
  display: inline-block;
  border: 1px solid var(--color-text);
  border-radius: 5px;
  -webkit-box-shadow: 1px 1px 29px -10px rgba(66, 68, 90, 1);
  -moz-box-shadow: 1px 1px 29px -10px rgba(66, 68, 90, 1);
  box-shadow: 1px 1px 29px -10px rgba(66, 68, 90, 1);
  transition: all 0.3s ease-in-out;

  font-weight: bold;
}

.detail-img img {
  box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px,
    rgba(0, 0, 0, 0.22) 0px 15px 12px;
  border-radius: 15px;
  transition: 0.3s ease-in-out all;
}

.detail-img img:hover {
  transform: translateY(-5px);
  box-shadow: rgba(0, 0, 0, 0.56) 0px 22px 70px 4px;
}

.detail-button:hover {
  cursor: pointer;
  background: #333;
  color: white;
  transform: translateY(-2px);
}

.detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 40px;
}

.detail-name {
  grid-column-start: 1;
  grid-column-end: 3;
  font-size: 24px;
}

.detail-borders {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  font-size: 18px;
}

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

.border-countries-container {
  grid-column-start: 1;
  grid-column-end: 3;
}

@media screen and (max-width: 1000px) {
  ul {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .detail-container,
  .detail-content {
    display: block;
  }
}

@media screen and (max-width: 600px) {
  ul {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 400px) {
  ul {
    grid-template-columns: 1fr;
  }
}

/* switcher */

/* The switch - the box around the slider */
.switch {
  display: block;
  --width-of-switch: 3.5em;
  --height-of-switch: 2em;
  /* size of sliding icon -- sun and moon */
  --size-of-icon: 1.4em;
  /* it is like a inline-padding of switch */
  --slider-offset: 0.3em;
  position: relative;
  width: var(--width-of-switch);
  height: var(--height-of-switch);
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #f4f4f5;
  transition: 0.4s;
  border-radius: 30px;
}

.slider:before {
  position: absolute;
  content: "";
  height: var(--size-of-icon, 1.4em);
  width: var(--size-of-icon, 1.4em);
  border-radius: 20px;
  left: var(--slider-offset, 0.3em);
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(40deg, #ff0080, #ff8c00 70%);
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #303136;
}

input:checked + .slider:before {
  left: calc(100% - (var(--size-of-icon, 1.4em) + var(--slider-offset, 0.3em)));
  background: #303136;
  /* change the value of second inset in box-shadow to change the angle and direction of the moon  */
  box-shadow: inset -3px -2px 5px -2px #8983f7, inset -10px -4px 0 0 #a3dafb;
}

/* search query */

.inputbox {
  position: relative;
  width: 196px;
}

.inputbox input {
  position: relative;
  width: 100%;
  padding: 20px 10px 10px;
  background: transparent;
  outline: none;
  box-shadow: none;
  border: none;
  color: white;
  font-size: 1.8em;
  letter-spacing: 0.05em;
  transition: 0.5s;
  z-index: 10;
}

.inputbox span {
  position: absolute;
  left: 0;
  padding: 20px 10px 10px;
  font-size: 1em;
  color: #5e5e5e;
  letter-spacing: 00.05em;
  transition: 0.5s;
  pointer-events: none;
}

.inputbox input:valid ~ span,
.inputbox input:focus ~ span {
  color: #333;
  transform: translateX(-10px) translateY(-30px);
  font-size: 0, 75em;
}

.inputbox i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  background: #333;
  border-radius: 4px;
  transition: 0.5s;
  pointer-events: none;
  z-index: 9;
}

.inputbox input:valid ~ i,
.inputbox input:focus ~ i {
  height: 49px;
}

/* select region */

.selectdiv {
  /* position: relative; */

  /* float: left; */
  min-width: 200px;
  /* margin: 50px 33%; */
}

select::-ms-expand {
  display: none;
}

.selectdiv:after {
  content: "<>";
  font: 17px "Consolas", monospace;
  color: #333;
  -webkit-transform: rotate(90deg);
  -moz-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  transform: rotate(90deg);
  right: 11px;
  /*Adjust for position however you want*/

  top: 18px;
  padding: 0 0 2px;
  border-bottom: 1px solid #999;
  /*left line */

  position: absolute;
  pointer-events: none;
}

.selectdiv select {
  border-radius: 10px;

  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* Add some styling */

  display: block;
  width: 100%;
  max-width: 320px;
  height: 50px;
  float: right;
  margin: 5px 0px;
  padding: 0px 24px;
  font-size: 16px;
  line-height: 1.75;
  color: #333;
  background-image: none;
  border: 1px solid #cccccc;
  -ms-word-break: normal;
  word-break: normal;

  font-family: inherit;
  color: white;
  background-color: #333;
}
