* {
  box-sizing: border-box;
}

:root {
  --line-color: #D0A616;
  --background-color: #F4F4F4;

  --ads-background-color: #fff;
  --ads-border-color: #ddd;
  --ads-line-color: #D0A616;

  --buttons-transparent-text-color: #D0A616;
  --buttons-transparent-border-color: #D0A616;

  --buttons-solid-background-color: #D0A616;
  --buttons-solid-text-color: #2C345C;

  --buttons-remove-background-color: #B21313;
  --buttons-remove-text-color: #FCFDF5;

  --text-title-color: #2C345C;
  --text-default-color: #2C345C;
  --text-highlight-color: #D0A616;

  --forms-label-color: #2C345C;

  --forms-input-background-color: #D5DADE;
  --forms-input-text-color: #2C345C;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-default-color);
}

dialog {
  border: none;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(44, 52, 92, 0.55);
  backdrop-filter: blur(2px);
}

button {
  border: none;
  cursor: pointer;
}

select {
  -webkit-appearance: none;
  appearance: none;
  border: none;
}

a {
  text-decoration: none;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 15px;
  border-bottom: 4px solid var(--line-color);
}

header img {
  height: 80px;
  max-width: 140px;
  width: auto;
  object-fit: contain;
}

header a {
  font-size: 16px;
  color: var(--buttons-transparent-text-color);

  display: flex;
}

header nav {
  display: flex;
  align-items: center;
}

header nav button.contact {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: var(--buttons-transparent-text-color);
  font-size: 16px;
}

header>nav :first-child {
  margin-right: 15px;
}

main {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

main h1 {
  font-size: 24px;
  color: var(--text-title-color);
  margin: 0 0 30px 0;
}

main p {
  font-size: 16px;
  margin: 0 0 10px 0;
}

main .number_step {
  color: var(--text-highlight-color);
}

main fieldset {
  border: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin-top: 15px;
  min-width: 0;
}

main fieldset label {
  font-size: 16px;
  color: var(--forms-label-color);
  font-weight: 400;
  display: flex;
  align-items: center;
}

main fieldset label svg {
  width: 20px;
  margin-right: 7px;
}

main fieldset select {
  width: 100%;
  height: 40px;
  padding: 10px;
  border-radius: 5px;
  border: none;
  margin-top: 5px;
  font-size: 16px;
  background-color: var(--forms-input-background-color);
  color: var(--forms-input-text-color);
  cursor: pointer;
}

main fieldset input[type="text"] {
  width: 100%;
  height: 40px;
  padding: 10px;
  border-radius: 5px;
  border: none;
  margin-top: 5px;
  font-size: 16px;
  background-color: var(--forms-input-background-color);
  color: var(--forms-input-text-color);
}

.btn_action {
  width: 100%;
  height: 40px;
  background-color: var(--buttons-solid-background-color);
  margin-top: 15px;
  border-radius: 5px;
  color: var(--buttons-solid-text-color);
  font-weight: 600;
  font-size: 16px;
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;
}

.btn_action_light {
  width: 100%;
  height: 40px;
  background-color: transparent;
  margin-top: 15px;
  border-radius: 5px;
  color: var(--buttons-transparent-text-color);
  font-weight: 600;
  font-size: 16px;

  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.btn_action_light svg {
  margin-right: 7px;
}

#label_districts {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

#label_districts > div {
  display: flex;
  flex-direction: row;
  align-items: center;
}

#gambs {
  display: none;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.select-trigger {
  display: block;
  text-align: left;
  cursor: pointer;
  width: 100%;
  min-height: 40px;
  padding: 10px;
  border-radius: 5px;
  border: none;
  margin-top: 5px;

  font-size: 16px;
  background-color: var(--forms-input-background-color);
  color: var(--forms-input-text-color);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.options {
  display: none;
  position: absolute;
  z-index: 10;
  top: 100%;
  left: 0;
  width: 90%;
  max-height: 100px;
  overflow-y: auto;
  border: 1px solid var(--forms-input-background-color);
  background-color: var(--forms-input-background-color);
  padding: 0.5rem;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.options.open {
  display: block;
}

.options label {
  display: block;
  margin-bottom: 0.3rem;
  cursor: pointer;
}

.options input[type="checkbox"] {
  margin-right: 0.5rem;
}

.districts-toggle {
  width: fit-content;
  min-height: 0px;
  padding: 0;
  background-color: transparent;
  color: var(--buttons-transparent-text-color);
  font-size: 14px;
  font-weight: 500;

  display: flex;
  align-items: center;
  justify-content: center;
}

.districts-toggle[hidden] {
  display: none;
}

.radio-group {
  margin-top: 5px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.radio-option {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  background-color: var(--forms-input-background-color);
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 16px;
}

/* Esconde o input */
.radio-option input[type="radio"] {
  display: none;
}

/* Aplica a cor azul e letra branca no item inteiro selecionado */
.radio-option:has(input[type="radio"]:checked) {
  background-color: var(--forms-input-text-color);
  color: var(--background-color);
  font-weight: bold;
}

.form_disabled {
  display: none;
}


#loading {
  border: none;
  padding: 0;
  margin: 0;

  width: 100vw;
  height: 100vh;

  max-width: none;
  max-height: none;

  align-items: center;
  justify-content: center;
  flex-direction: column;

  background: transparent;
  color: var(--text-highlight-color);
}

#loading[open] {
  display: flex;
}

#loading::backdrop {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px);
}

.spinner svg {
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
}

#loading span {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 500;
}

.contact_dialog {
  width: min(92vw, 420px);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(44, 52, 92, 0.24);
}

.contact_dialog_content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  background: #fff;
  color: var(--text-default-color);
}

.contact_dialog_content header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  border: 0;
}

.contact_dialog_content header h2 {
  margin: 0;
  font-size: 22px;
  color: var(--text-default-color);
}

#close_contact_dialog {
  background: none;
  font-size: 16px;
  color: var(--buttons-transparent-text-color);
  font-weight: 600;
}

#contact_dialog_list {
  display: grid;
  gap: 12px;
}

.contact_dialog_item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(44, 52, 92, 0.12);
  background: #fdfdfd;
  color: var(--text-default-color);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media screen and (min-width: 768px) {
  header {
    padding: 35px 45px 20px;
  }

  header img {
    max-width: 230px;
  }

  header a {
    font-size: 20px;
  }

  header nav button.contact {
    font-size: 20px;
  }

  main {
    padding: 30px 45px 10px;
  }

  main > span {
    margin-bottom: 10px;
  }

  main form .content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 850px;
  }

  main form .actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 850px;
    margin-top: 30px;
  }

  main form fieldset {
    margin-top: 0;
  }
}