:root {
  --darkGray: hsl(0, 0%, 59%);
  --darkerGray: hsl(0, 0%, 17%);
  --hoverGray: hsl(0, 0%, 27%);
}

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

body {
  font-family: 'Rubik', sans-serif;
}

h1 {
  font-size: 1.5rem;
  font-weight: 500;
  color: white;
}

h2 {
  font-size: 1.2rem;
  font-weight: 500;
}

span {
  font-size: 0.5rem;
  font-weight: 800;
}

/****** CONTAINER HEADER AND SEARCH FORM ******/
header {
  padding: 1.5rem 0 10rem 0;
  text-align: center;
  background-image: url('/images/pattern-bg.png');
  background-size: cover;
  background-repeat: no-repeat;
}

.header-container {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 35rem;
  height: 3rem;
  margin: 2rem auto 0 auto;
  position: relative;
}

.header-container input {
  padding: 1rem;
  height: 100%;
  border: none;
  cursor: pointer;
}

.header-container input[type='text'] {
  border-radius: 14px 0 0 14px;
  color: var(--darkGray);
  flex: 1;
}

.header-container input[type='text']:focus {
  color: var(--darkerGray);
}

.header-container input[type='text']:focus,
.header-container input[type='image']:focus {
  outline: none;
}

.header-container input[type='image'] {
  background-color: var(--darkerGray);
  border-radius: 0px 14px 14px 0px;
  object-fit: contain;
}

.header-container input[type='image']:active {
  background-color: var(--darkGray);
}

/****** IP DATA INFO ******/
.data-row {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(5%);
  margin: 1rem 1.5rem 0 1.5rem;
  padding: 1.5rem;
  background-color: white;
  border-radius: 14px;
  z-index: 1;
}

.data-name {
  text-transform: uppercase;
  color: var(--darkGray);
  letter-spacing: 0.2em;
}

.data-info {
  color: var(--darkerGray);
  margin: 0.2rem 0 1rem 0;
}

/****** MAP CONTAINER ******/
#map {
  height: 100vh;
  position: relative;
  z-index: 0;
}

/****** VALIDATION ERROR ******/
#error {
  display: none;
  font-size: 0.5rem;
  color: red;
  position: absolute;
  top: 5%;
  left: 3%;
}

/****** MEDIA QUERIES ******/

/* Desktops */
@media only screen and (min-width: 992px) {
  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  #map {
    flex: 1;
  }
  span {
    font-size: 0.6rem;
  }
  header {
    padding: 1.5rem 0 6rem 0;
  }
  .data-row {
    flex-direction: row;
    transform: translateY(10%);
  }
  .data-column {
    text-align: left;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0 5rem 1rem 1rem;
  }
  .data-info {
    margin: 0.7rem 0 1rem 0;
  }
  .data-column:nth-child(1)::after,
  .data-column:nth-child(2)::after,
  .data-column:nth-child(3)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    height: 100%;
    transform: translateY(-50%);
    width: 1px;
    background-color: var(--darkGray);
  }
}

/* Hover for Desktop */
@media (hover: hover) {
  .header-container input[type='image']:hover {
    background-color: var(--hoverGray);
  }
}
