@import "colors.css";
@import url("https://fonts.googleapis.com/css?family=Play&display=swap");
@import url("https://fonts.googleapis.com/css?family=Almarai&display=swap");
@import url("https://fonts.googleapis.com/css?family=Roboto&display=swap");
@import url("https://fonts.googleapis.com/css?family=Galada&display=swap");

* {
  margin: 0;
  padding: 0;
  font-family: "play";
  box-sizing: border-box;
}

body {
  background: var(--background-color);
  color: var(--text-color);
  transition: background 0.8s, color 0.8s;
  font-family: "Amiri", "play", "Roboto", "Galada", sans-serif;
}

/* ------------------------ section-1 ---------------------------------------------------- */
.section-1 {
  position: relative;
  background-color: var(
    --background-color9
  ); /* Fallback color in case the video doesn't load */
  margin: 0px 0 30px 0;
  height: 580px;
  opacity: 0.7;
}

.section-1 .container {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 100%;
}

.title-container {
  display: block;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.title-container h1 {
  font-size: 100px;
  font-weight: 800;
  letter-spacing: 5px;
  word-spacing: 5px;

  margin-bottom: 40px;
  overflow: hidden;
}
/* ------------------------ section-2 -------------------------------------- */
.section-2 {
  text-align: center;
  margin: 0px 0 30px 0;
}

.mapContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--background-color8);
  margin-bottom: 50px;
}
#worldMap {
  display: block;
}
input[type="text"] {
  padding: 5px;
  width: 250px;
  border-radius: 4px;
  border: 1px solid #ccc;
}
.searchMap ul {
  position: absolute;
  list-style: none;
  background: white;
  border: 1px solid #ccc;
  padding: 0;
  margin: 0;
  display: none;
  max-height: 400px; /* Optional: Limit the maximum height */
  overflow-y: auto; /* Enable scrolling if content exceeds max height */
  width: 200px; /* Match input field width or desired width */
}
.searchMap button {
  padding: 5px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #f0f0f0;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.searchMap button:hover {
  background-color: #ddd;
  transform: scale(1.05);
  opacity: 1;
}

.searchMap button:focus {
  outline: none; /* Remove default focus outline */
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* Highlight button on focus */
}

#controlsMap {
  width: 100%;
  max-width: 600px;
  padding: 0 10px 10px 10px;
  display: grid;
  grid-template-columns: 80px 1fr 70px;
  align-items: center;
  justify-items: center;
}

#playButtonMap {
  font-size: 16px;
  background-color: #04e28f;
  color: rgb(0, 0, 0);
  border: none;
  margin-right: 5px;
  border-radius: 4px;
  padding: 12px 20px;
  cursor: pointer;
  transition-duration: 0.3s;
}

#playButtonMap[dir="rtl"] {
  font-family: "Amiri", "play", "Roboto", "Galada", sans-serif;
  margin-right: 0;
  padding: 10px 14px;
}

#dateSlider {
  width: 100%;
  margin: 0 auto;
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  border-radius: 5px;
  background: #c9c8c8;
  outline: none;
  opacity: 0.7;
  -webkit-transition: 0.2s;
  transition: opacity 0.2s;
}

#dateSlider:hover {
  opacity: 1;
}

#dateSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; /* Adjust the width of the thumb */
  height: 20px; /* Adjust the height of the thumb */
  border-radius: 50%;
  background: #04e28f; /* Color of the slider thumb */
  cursor: pointer;
}

#dateSlider::-moz-range-thumb {
  width: 20px; /* Adjust the width of the thumb for Firefox */
  height: 20px; /* Adjust the height of the thumb for Firefox */
  border-radius: 50%;
  background: #04e28f; /* Color of the slider thumb for Firefox */
  cursor: pointer;
}

/* To change the font of the text content within the tooltip HTML in D3.js */
.tooltip-text {
  font-family: "Amiri", "play", "Roboto", "Galada", sans-serif;
}

#LineChartContainer {
  width: 100%;
}

#LineChart {
  background: var(--background-color);
}

.tooltip {
  font-size: 14px;
  position: absolute;
  color: #000;
  background-color: white;
  border: 1px solid #ccc;
  padding: 5px;
  border-radius: 5px;
  pointer-events: pointer;
}

.card-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.card-item {
  background-image: radial-gradient(
    circle,
    rgb(229, 233, 236) 0%,
    rgb(178, 190, 196) 100%
  );
  display: flex;
  justify-content: end;
  align-items: end;
}

.middle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}

#BarChart {
  margin-top: 40px;
}

/* ------------------------- end -------------------------- */
@media only screen and (max-width: 767px) {
  /* ------------------------ section-1 ---------------------------------------------------- */
  .section-1 {
    margin: 0px 0 60px 0;
    height: 500px;
  }
  .title-container h1 {
    font-size: 50px;
    font-weight: 800;
    letter-spacing: 2px;
    word-spacing: 3px;
    margin-top: 80px;
    margin-bottom: 40px;
    overflow: hidden;
  }
  /* ------------------------ section-2 ------------------------------------ */
  .section-2 {
    text-align: center;
    margin: 0px 0 30px 0;
  }

  #worldMap {
    padding: 0 15px 0 15px;
  }

  #LineChartContainer {
    justify-content: center;
    align-items: center;
    padding-left: 10px;
  }
  #LineChart {
    padding: 5px 20px 0px 15px;
  }

  #legend-container {
    margin: 0 0 20px 40px;
    font-size: 10px;
  }
  .selectedDate {
    text-align: start;
    margin-left: 10px;
    font-size: 12px;
  }

  .card-container {
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
  }

  .middle-container {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0 20px 0 20px;
    gap: 5px;
    margin-bottom: 10px;
  }

  #BarExportsChart,
  #BarImportsChart {
    width: 90%;
    display: inline;
    padding: 0 5px 0 5px;
  }
}
