.cons-address-template,
.cons-address-template * {
  box-sizing: border-box;
}

.cons-address-template {
  min-height: 560px;
  padding: 26px 16px 34px;
  color: #112b55;
  background: #f4f7fb;
  font-family: Inter, Montserrat, Arial, sans-serif;
}

.cons-address-page {
  width: min(100%, 940px);
  margin: 0 auto;
}

.cons-address-card {
  position: relative;
  overflow: hidden;
  padding: 28px 36px 30px;
  background: #fff;
  border: 1px solid #d5dfee;
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(18,46,90, .1);
}

.cons-address-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #1b468a 0%, #2258ae 62%, #e1aa36 100%);
  content: "";
}

.cons-address-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-bottom: 20px;
  text-align: left;
}

.cons-address-heading-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  color: #1b468a;
  background: #f0f5fc;
  border-radius: 50%;
}

.cons-address-heading-icon .vnt-icon {
  width: 25px;
  height: 25px;
}

.cons-address-heading h1 {
  margin: 0;
  color: #102952;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.08;
}

.cons-address-heading p {
  margin: 4px 0 0;
  color: #536786;
  font-size: .88rem;
  line-height: 1.35;
}

.cons-address-greeting {
  display: block;
  margin-top: 3px;
  color: #1c488e;
  font-size: .77rem;
  font-weight: 700;
}

.cons-address-form {
  max-width: 820px;
  margin: 0 auto;
}

.cons-address-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  color: #a51e27;
  background: #fff4f4;
  border: 1px solid #efb6ba;
  border-radius: 9px;
  font-size: .78rem;
  font-weight: 700;
}

.cons-address-summary[hidden] {
  display: none;
}

.cons-address-summary .vnt-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.cons-address-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px 14px;
}

.cons-address-field {
  min-width: 0;
}

.cons-address-field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 5px;
  color: #133160;
  font-size: .75rem;
  font-weight: 700;
}

.cons-address-field label > span {
  margin-left: 3px;
  color: #c41e2b;
}

.cons-address-field label small {
  color: #77849a;
  font-size: .64rem;
  font-weight: 500;
}

.cons-address-field input,
.cons-address-field select {
  width: 100%;
  height: 46px !important;
  padding: 9px 13px !important;
  color: #143263 !important;
  background: #fcfdfe !important;
  border: 1px solid #adc0df !important;
  border-radius: 9px !important;
  outline: 0;
  box-shadow: none !important;
  font-size: .86rem !important;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.cons-address-field input:focus,
.cons-address-field select:focus {
  background: #fff !important;
  border-color: #2051a1 !important;
  box-shadow: 0 0 0 3px rgba(32,81,161, .12) !important;
}

.cons-address-field input.erro,
.cons-address-field select.erro {
  border-color: #d23a43 !important;
  box-shadow: 0 0 0 2px rgba(210, 58, 67, .08) !important;
}

.cons-address-field input.sucesso,
.cons-address-field select.sucesso {
  border-color: #26945d !important;
}

.cons-address-readonly {
  color: #385178 !important;
  background: #edf2fa !important;
}

.cons-address-error {
  display: none;
  margin: 4px 2px 0;
  color: #bd2631;
  font-size: .66rem;
  line-height: 1.2;
}

.field-cep { grid-column: span 4; }
.field-street { grid-column: span 6; }
.field-number { grid-column: span 2; }
.field-complement { grid-column: span 5; }
.field-neighborhood { grid-column: span 4; }
.field-city { grid-column: span 5; }
.field-state { grid-column: span 2; }
.field-gender { grid-column: span 3; }
.field-birth { grid-column: span 4; }

.cons-address-section-title {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  color: #173c77;
  font-size: .78rem;
}

.cons-address-section-title .vnt-icon {
  width: 18px;
  height: 18px;
}

.cons-address-section-title > span {
  height: 1px;
  flex: 1;
  background: #ead9b9;
}

.cons-address-cep-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.cons-address-search {
  display: flex;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 12px;
  color: #1b4588;
  background: #fff;
  border: 1px solid #1b4588;
  border-radius: 9px;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}

.cons-address-search .vnt-icon {
  width: 16px;
  height: 16px;
}

.cons-address-search:disabled {
  cursor: wait;
  opacity: .62;
}

.cons-address-no-number {
  grid-column: span 3;
  min-height: 46px;
  align-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 12px;
  color: #244579;
  background: #f8fafe;
  border: 1px solid #c3d0e5;
  border-radius: 9px;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
}

.cons-address-no-number input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 0;
  accent-color: #1d4a92;
}

.cons-address-submit {
  display: flex;
  width: min(100%, 500px);
  min-height: 51px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px auto 0;
  padding: 12px 24px;
  color: #fff;
  background: linear-gradient(105deg, #20519f, #183c77);
  border: 0;
  border-radius: 9px;
  box-shadow: 0 8px 18px rgba(24,61,121, .2);
  font-size: .94rem;
  font-weight: 700;
  cursor: pointer;
}

.cons-address-submit:hover {
  color: #fff;
  background: linear-gradient(105deg, #1c488e, #143364);
}

.cons-address-submit:disabled {
  cursor: wait;
  opacity: .68;
}

.cons-address-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #163970;
  background: rgba(255, 255, 255, .92);
}

.cons-address-loader.oculta_loading { display: none; }
.cons-address-loader.exibe_loading { display: flex; }

.cons-address-spinner {
  width: 48px;
  height: 48px;
  border: 6px solid #e7ecf5;
  border-top-color: #1c478c;
  border-radius: 50%;
  animation: cons-address-spin .8s linear infinite;
}

@keyframes cons-address-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
  .cons-address-template {
    min-height: 0;
    padding: 8px 6px 14px;
  }

  .cons-address-card {
    padding: 17px 12px 14px;
    border-radius: 15px;
  }

  .cons-address-heading {
    gap: 9px;
    justify-content: flex-start;
    margin-bottom: 10px;
  }

  .cons-address-heading-icon {
    width: 37px;
    height: 37px;
    flex-basis: 37px;
  }

  .cons-address-heading-icon .vnt-icon {
    width: 20px;
    height: 20px;
  }

  .cons-address-heading h1 {
    font-size: 1.32rem;
  }

  .cons-address-heading p {
    margin-top: 2px;
    font-size: .68rem;
  }

  .cons-address-greeting {
    margin-top: 1px;
    font-size: .62rem;
  }

  .cons-address-summary {
    margin-bottom: 7px;
    padding: 7px 8px;
    font-size: .66rem;
  }

  .cons-address-grid {
    gap: 8px;
  }

  .cons-address-field label {
    margin-bottom: 2px;
    font-size: .63rem;
  }

  .cons-address-field label small {
    font-size: .55rem;
  }

  .cons-address-field input,
  .cons-address-field select {
    height: 38px !important;
    padding: 6px 9px !important;
    font-size: .72rem !important;
  }

  .cons-address-error {
    margin-top: 2px;
    font-size: .56rem;
  }

  .field-cep,
  .field-street,
  .field-number,
  .field-complement,
  .field-neighborhood,
  .field-city,
  .field-state,
  .field-gender,
  .field-birth { grid-column: span 12; }
  .cons-address-no-number { grid-column: span 12; }

  .cons-address-cep-control {
    grid-template-columns: minmax(0, 1fr) 85px;
  }

  .cons-address-search {
    height: 38px;
    padding: 6px 10px;
    font-size: .66rem;
  }

  .cons-address-no-number {
    min-height: 31px;
    align-self: auto;
    padding: 1px 0;
    color: #18386c;
    background: transparent;
    border: 0;
    font-size: .61rem;
  }

  .cons-address-no-number input {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }

  .cons-address-submit {
    position: sticky;
    z-index: 20;
    bottom: 8px;
    width: 100%;
    min-height: 41px;
    margin-top: 10px;
    padding: 7px 16px;
    font-size: .8rem;
  }
}

@media (max-width: 370px), (max-height: 680px) and (max-width: 767px) {
  .cons-address-template { padding-top: 4px; }
  .cons-address-card { padding-top: 12px; }
  .cons-address-heading-icon { display: none; }
  .cons-address-heading { margin-bottom: 7px; }
  .cons-address-heading h1 { font-size: 1.16rem; }
  .cons-address-heading p { display: none; }
  .cons-address-grid { gap: 4px 6px; }
  .cons-address-field input,
  .cons-address-field select,
  .cons-address-search { height: 34px !important; }
  .cons-address-no-number { min-height: 28px; }
  .cons-address-submit { min-height: 37px; margin-top: 7px; }
}

/* Azul predominante e dourado nos detalhes. */
.cons-address-submit {background:#15366b!important;color:#fff!important;border-color:#d4b77e!important;}
.cons-address-submit:hover, .cons-address-submit:focus {background:#102952!important;color:#fff!important;border-color:#d4b77e!important;}
.cons-address-submit:focus-visible {outline:2px solid #d4b77e;outline-offset:3px;}
