/* import google font */
@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");

/* reset default css */

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

body {
  font-family: "Roboto", sans-serif;
  background-image: linear-gradient(
      135deg,
      rgba(186, 186, 186, 0.03) 0%,
      rgba(186, 186, 186, 0.03) 10%,
      rgba(133, 133, 133, 0.03) 10%,
      rgba(133, 133, 133, 0.03) 14%,
      rgba(38, 38, 38, 0.03) 14%,
      rgba(38, 38, 38, 0.03) 17%,
      rgba(93, 93, 93, 0.03) 17%,
      rgba(93, 93, 93, 0.03) 25%,
      rgba(80, 80, 80, 0.03) 25%,
      rgba(80, 80, 80, 0.03) 45%,
      rgba(239, 239, 239, 0.03) 45%,
      rgba(239, 239, 239, 0.03) 100%
    ),
    linear-gradient(
      135deg,
      rgba(236, 236, 236, 0.03) 0%,
      rgba(236, 236, 236, 0.03) 47%,
      rgba(182, 182, 182, 0.03) 47%,
      rgba(182, 182, 182, 0.03) 63%,
      rgba(223, 223, 223, 0.03) 63%,
      rgba(223, 223, 223, 0.03) 81%,
      rgba(86, 86, 86, 0.03) 81%,
      rgba(86, 86, 86, 0.03) 89%,
      rgba(23, 23, 23, 0.03) 89%,
      rgba(23, 23, 23, 0.03) 90%,
      rgba(226, 226, 226, 0.03) 90%,
      rgba(226, 226, 226, 0.03) 100%
    ),
    linear-gradient(
      45deg,
      rgba(52, 52, 52, 0.03) 0%,
      rgba(52, 52, 52, 0.03) 31%,
      rgba(246, 246, 246, 0.03) 31%,
      rgba(246, 246, 246, 0.03) 63%,
      rgba(188, 188, 188, 0.03) 63%,
      rgba(188, 188, 188, 0.03) 71%,
      rgba(15, 15, 15, 0.03) 71%,
      rgba(15, 15, 15, 0.03) 87%,
      rgba(127, 127, 127, 0.03) 87%,
      rgba(127, 127, 127, 0.03) 93%,
      rgba(234, 234, 234, 0.03) 93%,
      rgba(234, 234, 234, 0.03) 100%
    ),
    linear-gradient(90deg, #ffffff, #ffffff);
  position: relative;
  overflow: auto;
  height: 100vh;
}

header {
  background-color: rgba(214, 194, 194, 0.842);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px 0;
}

header h1 {
  text-align: center;
  color: #008080;
}

.container {
  width: 1100px;
  margin: 0 auto;
}

#loading__spinner {
  height: 100vh;
  margin: 0 auto;
  text-align: center;
  margin-top: 150px;
}

#loading__spinner img {
  width: 40%;
  margin: 0 auto;
  text-align: center;
  display: inline-block;
}

#country__container {
  margin-top: 120px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

#error {
  padding: 50px 0;
  width: 60%;
  margin: 0 auto;
  background-color: #dc35462c;
  border-radius: 10px;
  box-shadow: 0px 2px 20px grey;
}

.error {
  color: #dc3545;
  text-align: center;
  font-size: 25px;
}

.single__country {
  padding: 10px;
  background-color: #dfcdcd;
  border-radius: 10px;
}

.single__country img {
  width: 100%;
  margin: 0 auto;
  border-radius: 10px;
  height: 200px;
  object-fit: cover;
  transition: 0.3s;
}

.single__country h3 {
  margin: 15px 0;
  text-align: center;
  font-size: 20px;
}

.open__modal {
  padding: 10px 20px;
  border: 0;
  outline: 0;
  background-color: #008080;
  color: #fff;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.5s ease-in-out;
  cursor: pointer;
}

.open__modal:hover {
  letter-spacing: 3px;
}

#modal__container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  width: 100vw;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  position: fixed;
  animation: 1s fadedAnimation linear;
}

@keyframes fadedAnimation {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.modal {
  width: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  flex-direction: column;
}

.modal__content {
  overflow: hidden;
  border-radius: 10px;
  margin-top: 100px;
}

.modal__header {
  background-color: teal;
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 8px 10px 8px 20px;
  align-items: center;
  width: 100%;
}

.modal__header h2 {
  margin: 0;
  font-size: 25px;
}

#close__modal {
  border: 0;
  outline: 0;
  background-color: #dc354694;
  color: #dc3545;
  border-radius: 50%;
  font-size: 25px;
  padding: 5px 10px;
  cursor: pointer;
}

.modal__body {
  padding: 20px;
  background-color: #fff;
}

.modal__body table {
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
}

.modal__body table td {
  border: 2px solid teal;
  padding: 5px 20px;
}

.modal__body table tr td:nth-child(1) {
  font-size: 16px;
  font-weight: 800;
  width: 350px;
}

.modal__body table tr td:nth-child(2) {
  font-size: 16px;
  font-weight: 500;
  width: 250px;
}

.modal__footer {
  background-color: #008080;
  padding: 8px;
  width: 100%;
}

.modal__footer h4 {
  margin: 0;
  color: #fff;
  text-align: center;
}

/* ============================

        some media query 

============================== */

@media only screen and (max-width: 1150px) {
  .container {
    width: 90%;
  }
}

@media only screen and (max-width: 778px) {
  #country__container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (max-width: 650px) {
  .modal {
    width: 90%;
  }
}

@media only screen and (max-width: 576px) {
  #country__container {
    grid-template-columns: repeat(1, 1fr);
  }
}
