@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;700&display=swap");

:root {
  --very-dark-gray: hsl(0, 0%, 17%);
  --dark-gray: hsl(0, 0%, 59%);
}
/* Font size (text input): 18px */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Rubik", sans-serif;
}

body {
  height: 100vh;
  width: 100%;
}

/* --------------- HEADER --------------- */
header {
  height: 35%;
  width: 100%;
  background: url("./assets/pattern-bg.png") no-repeat top/cover;

  display: flex;
  flex-direction: column;
  row-gap: 24px;
  align-items: center;
  justify-content: flex-start;
}

/* HEADING */
header h1 {
  margin-top: 32px;
  color: #fff;
  font-size: 32px;
  font-weight: 500;
}

/* SEARCH BAR */
header .search-bar {
  display: flex;
  column-gap: 0;
}
/* Input */
header .search-bar input {
  width: 497px;
  height: 58px;
  padding: 0 24px;

  background: #fff;
  border-radius: 14px 0 0 14px;
  color: var(--very-dark-gray);
  font-size: 18px;

  border: none;
  outline: none;
  cursor: pointer;
}
header .search-bar input::placeholder {
  color: var(--dark-gray);
  font-size: 18px;
}
/* Button */
header .search-bar button {
  width: 58px;
  height: 58px;
  background: var(--very-dark-gray);
  border-radius: 0 14px 14px 0;
  border: none;
  outline: none;
  cursor: pointer;
}
header .search-bar button:hover {
  background: hsl(0, 0%, 25%);
}

/* --------------- MAIN --------------- */
main {
  height: 65%;
  width: 100%;
}

/* MAP */
.map {
  height: 100%;
  width: 100%;
}

/* RESULT BANNER */
main .result-banner {
  z-index: 1000;
  position: absolute;
  top: 35%; /* header height */
  left: 50%;

  /* transform: translate(-50%, -45%); 
    Not feasible because height of the banner changes depending on the content
    and it can move over the search bar in extreme cases */
  transform: translate(-50%, -76px);

  width: 77%;
  background: #fff;
  border-radius: 14px;

  display: flex;
  column-gap: 0;
}

main .result-banner div {
  flex: 1;
  margin: 30px 0px;
  padding: 0 68px 0 32px;
  border-right: 1px solid hsl(0, 0%, 85%);
}
main .result-banner div:last-child {
  border: none;
}

main .result-banner h2 {
  color: var(--dark-gray);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
main .result-banner p {
  margin-top: 10px;
  color: var(--very-dark-gray);
  font-size: 26px;
  font-weight: 500;
  line-height: 34px;
}

/* ------------------------ RESPONSIVENESS - MOBILE VIEW ------------------------ */
@media (max-width: 376px) {
  /* HEADER */
  header {
    row-gap: 28px;
  }
  header h1 {
    margin-top: 26px;
    font-size: 26px;
  }
  header .search-bar {
    display: flex;
    column-gap: 0;
  }
  header .search-bar input {
    width: 270px;
    padding-right: 30px; /* Increased padding-right hides overflowed text "or domain" */
  }

  /* MAIN */
  main .result-banner {
    transform: translate(-50%, -120px);
    width: 86%;
    padding: 25px 32px;
    flex-direction: column;
    row-gap: 20px;
    align-items: center;
    text-align: center;
  }
  main .result-banner div {
    margin: 0;
    padding: 0;
    border: none;
  }
  main .result-banner h2 {
    font-size: 10px;
  }
  main .result-banner p {
    margin-top: 6px;
    font-size: 20px;
    line-height: 24px;
  }
}
