/* Altura base da pagina de localizacao de emergencia. */
html,
body {
  height: 100%;
}
body {
  min-height: 100dvh;
}

:root {
  --safe-bottom: max(env(safe-area-inset-bottom), 0px);
}

/* Ajuste do header na pagina do mapa. */
.header {
  display: flex !important;
  justify-content: space-between !important;
  background-color: var(--text-color-white) !important;
  margin: 0 !important;
  padding: 30px !important;
}

.back-button {
  position: absolute;
  left: 20px;
}

/* Area do mapa. */
.map-container {
  position: relative;
  width: 100%;
  height: 400px;
  background: var(--surface-map-placeholder);
  z-index: 0;
}

.map {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* Card de confirmacao de localizacao. */
.location-display {
  position: relative;
  top: -24px;
  margin: 0 auto;
  max-width: 400px;
  background: var(--text-color-white);
  padding: 30px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -2px 10px var(--color-shadow-10);
  z-index: 2;
}

.location-display-title {
  font-size: var(--font-size-18);
  font-weight: var(--font-weight-regular);
  color: var(--text-color-caption);
  margin: 20px 0 46px;
  text-align: center;
}

/* Controles de busca e endereco. */
.location-search {
  display: flex;
  align-items: center;
  background: var(--background-white-color);
  padding: 0 18.4px;
  height: 76px;
  border-radius: 12.27px;
  box-shadow: 3.68px 3.68px 12.27px var(--color-shadow-15);
  margin-bottom: 42px;
}

.mirrored {
  transform: scaleX(-1);
}

.location-search input {
  border: none;
  outline: none;
  font-size: var(--font-size-16);
  font-family: var(--font-family-base);
  width: 100%;
  background: var(--background-white-color);
}

/* Resumo da localizacao atual. */
.pin-block {
  display: flex;
  align-items: center;
  margin-bottom: 46px;
}

.pin-box {
  border: 1.23px solid var(--primary-purple-color);
  border-radius: 12.33px;
  width: 67.79px;
  height: 62.86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-right: 18.5px;
  box-shadow: 3.7px 12.33px 12.33px var(--color-shadow-15);
}

.pin-box span {
  font-size: var(--font-size-10);
  color: var(--primary-purple-color);
  font-weight: var(--font-weight-regular);
}

.address-text {
  font-size: var(--font-size-12-336);
  color: var(--text-color-strong);
  text-align: left;
  font-weight: var(--font-weight-medium);
  width: 80%;
  max-height: 96px;
  overflow: auto;
}

/* Acao de confirmacao. */
.confirm-button {
  background-color: var(--primary-purple-color);
  height: 77px;
  color: var(--text-color-white);
  padding: 15px;
  border: none;
  border-radius: 10.67px;
  cursor: pointer;
  font-size: var(--font-size-20);
  width: 100%;
  transition: background 0.3s;
}

.confirm-button:hover {
  background-color: var(--secondary-purple-color);
}

@media (max-width: 480px) {
  .header {
    height: 72px;
    padding: 0 16px !important;
  }

  .map-container {
    height: 38vh;
  }

  .location-display {
    top: -16px;
    margin: 0 12px;
    padding: 24px;
    padding-bottom: 120px;
    border-radius: 20px;
  }

  .location-search {
    height: 56px;
  }

  .confirm-button {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + var(--safe-bottom));
    height: 56px;
    font-size: var(--font-size-16);
    border-radius: 12px;
    width: auto;
    max-width: 480px;
    margin: 0 auto;
    z-index: 1001;
  }
}

@media (min-width: 481px) {
  .confirm-button {
    position: static;
    height: 64px;
  }
}
