/* ============================
   button-primary
   ============================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--color-cta);
  color: var(--color-white);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.04px;
  white-space: nowrap;
  transition: background-color var(--transition-base);
}

.btn-primary:hover {
  background: var(--color-cta-hover);
}

.btn-primary:active {
  background: var(--color-cta-active);
}

.btn-primary:disabled,
.btn-primary[aria-disabled="true"] {
  background: var(--color-border);
  color: var(--color-text-secondary);
  cursor: not-allowed;
}

/* Variante maior, verde primário — usada na busca do hero */
.btn-primary--search {
  background: var(--color-primary);
  font-size: 15px;
  min-height: 53px;
  padding: 10px 28px;
}

.btn-primary--search:hover {
  background: #275a42;
}

/* ============================
   input-text
   ============================ */
.input-text-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.input-text-label {
  font-size: 13px;
  font-weight: 600;
  color: #2d2d3a;
}

.input-text {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  font-size: 14px;
  color: #2d2d3a;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.input-text::placeholder {
  color: rgba(45, 45, 58, 0.5);
}

.input-text:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(46, 106, 79, 0.15);
}

.input-text:disabled {
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
  cursor: not-allowed;
}

.input-text[aria-invalid="true"] {
  border-color: var(--color-error);
}

.input-text[aria-invalid="true"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(192, 52, 31, 0.15);
}

.input-text-error {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-error);
}

.input-text-error.is-visible {
  display: flex;
}

/* ============================
   search-bar (busca-cep)
   ============================ */
.search-bar {
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.search-bar__row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  width: 100%;
  padding: 8px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.search-bar__field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 8px 12px;
}

.search-bar__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--color-text-secondary);
}

.search-bar__input {
  flex: 1;
  min-width: 0;
  border: none;
  font-size: 15px;
  color: var(--color-text);
  background: transparent;
}

.search-bar__input::placeholder {
  color: #6a7282;
}

.search-bar__input:focus-visible {
  outline: none;
}

.search-bar .btn-primary--search {
  width: 100%;
}

.search-bar__error {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-inline: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-error);
}

.search-bar__error.is-visible {
  display: flex;
}

@media (min-width: 768px) {
  .search-bar__row {
    flex-direction: row;
    align-items: center;
    border-radius: var(--radius-pill);
  }

  .search-bar .btn-primary--search {
    width: auto;
  }
}

/* ============================
   site-header
   ============================ */
.site-header {
  position: relative;
  z-index: 2000;
  background: var(--color-header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header__topbar {
  height: 45px;
  background: var(--color-header-topbar);
}

.site-header .container {
  max-width: none;
  padding-inline: 20px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-block: 7px 8px;
}

.site-header__logo {
  margin-right: auto;
}

.site-header__logo img {
  width: 116px;
  height: auto;
}

.site-header__cta {
  order: 1;
  flex-shrink: 0;
  font-size: 11px;
}

.site-header__lang {
  order: 3;
  flex-shrink: 0;
}

.site-header__lang-toggle {
  display: inline-flex;
  position: relative;
  top: 2px;
  align-items: center;
  gap: 4px;
  list-style: none;
  cursor: pointer;
}

.site-header__lang-toggle::-webkit-details-marker {
  display: none;
}

.site-header__lang-flag {
  width: 24px;
  height: 18px;
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0.8;
  transition: opacity 0.08s ease;
}

.site-header__lang-chevron {
  width: 16px;
  height: 16px;
  color: var(--color-white);
  transition: transform var(--transition-base);
}

.site-header__lang[open] .site-header__lang-chevron {
  transform: rotate(180deg);
}

.site-header__lang-menu {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 150px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.site-header__lang-option {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 8px;
  background: none;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color var(--transition-base);
}

.site-header__lang-option:hover,
.site-header__lang-option:focus-visible {
  background: var(--color-bg-muted);
}

.site-header__lang-option.is-selected {
  background: var(--color-bg-muted);
  color: var(--color-cta);
  font-weight: 600;
}

.site-header__nav-details {
  order: 2;
  position: static;
}

.site-header__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-white);
  cursor: pointer;
  list-style: none;
}

.site-header__toggle::-webkit-details-marker {
  display: none;
}

.site-header__toggle-icon {
  width: 24px;
  height: 24px;
}

.site-header__nav-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, display 0.22s allow-discrete;
}

.site-header__nav-details[open] .site-header__nav-panel {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

@starting-style {
  .site-header__nav-details[open] .site-header__nav-panel {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.site-header__nav-link {
  font-size: 13px;
  font-weight: 500;
  color: #2d2d3a;
  text-align: center;
}

.site-header__nav-link--account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-header__account-icon {
  width: 22px;
  height: 22px;
  color: var(--color-cta);
}

.site-header__nav-link--desktop {
  display: none;
}

.site-header__nav-links-desktop {
  display: none;
}

.site-header__divider {
  display: none;
}

@media (min-width: 768px) {
  .site-header__inner {
    gap: 20px;
  }

  .site-header__logo img {
    width: 140px;
  }

  .site-header__nav-details {
    display: none;
  }

  .site-header__cta {
    order: 3;
    font-size: 13px;
  }

  .site-header__lang {
    order: 4;
  }

  .site-header__nav-link--desktop {
    display: block;
    font-size: 13px;
    color: var(--color-text-on-dark);
    white-space: nowrap;
  }

  .site-header__nav-links-desktop {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    gap: 24px;
  }

  .site-header__divider {
    display: block;
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
  }
}

/* ============================
   badge / section label
   ============================ */
.section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-cta);
  text-align: center;
}

/* ============================
   card
   ============================ */
.card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-bg-muted);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  height: 100%;
}

.card__image {
  width: 100%;
  aspect-ratio: 311 / 146;
  object-fit: cover;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 22px;
}

.card__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.card__text {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
}

/* ============================
   feature-item (gestor-cidade)
   ============================ */
.feature-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.feature-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.feature-item__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.feature-item__text {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.3;
}

@media (min-width: 1024px) {
  .feature-item__icon {
    width: 44px;
    height: 44px;
  }

  .feature-item__title {
    font-size: 20px;
  }
}

/* ============================
   site-footer
   ============================ */
.site-footer {
  background: var(--color-footer-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-block: 48px 32px;
}

.site-footer__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.site-footer__cta-title {
  font-size: 22px;
  font-weight: 400;
  color: var(--color-white);
}

.site-footer__cta-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-on-dark);
  max-width: 30ch;
}

.site-footer__content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-block: 32px;
}

.site-footer__logo img {
  width: 140px;
  height: auto;
  margin-bottom: 20px;
}

.site-footer__about {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-on-dark);
  max-width: 34ch;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-on-dark);
}

.site-footer__copyright {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--color-copyright-bg);
  padding: 15px var(--container-padding);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-on-dark);
}

.site-footer__copyright-links {
  display: flex;
  gap: 16px;
}

@media (min-width: 768px) {
  .site-footer__content {
    flex-direction: row;
    justify-content: space-between;
  }

  .site-footer__copyright {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1440px) {
  .site-footer {
    padding-block: 60px;
  }
}

/* ============================
   chip (input-chip)
   ============================ */
.chip {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 8px 16px;
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: #2d2d3a;
  transition: background-color var(--transition-base), border-color var(--transition-base),
    color var(--transition-base);
}

.chip:hover {
  border-color: var(--color-cta);
}

.chip[aria-pressed="true"] {
  background: var(--color-cta);
  border-color: var(--color-cta);
  color: var(--color-white);
}

/* ============================
   field-checkbox
   ============================ */
.field-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--color-white);
  cursor: pointer;
}

.checkbox {
  appearance: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 2px solid #2d2d3a;
  border-radius: 2px;
  background: var(--color-white);
  position: relative;
  cursor: pointer;
}

.checkbox:checked {
  background: var(--color-cta);
  border-color: var(--color-cta);
}

.checkbox:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0px;
  width: 5px;
  height: 9px;
  border: solid var(--color-white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.checkbox:disabled {
  border-color: var(--color-border);
  background: var(--color-bg-muted);
  cursor: not-allowed;
}

.field-checkbox__label {
  font-size: 14px;
  color: #2d2d3a;
}

/* ============================
   link-button
   ============================ */
.link-button {
  padding: 10px 0;
  background: none;
  border: none;
  color: var(--color-cta);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.link-button:hover,
.link-button:focus-visible {
  text-decoration: underline;
}

.link-button:disabled {
  color: var(--color-text-secondary);
  cursor: not-allowed;
  text-decoration: none;
}

/* ============================
   account-panel
   ============================ */
.account-panel {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(320px, 100vw);
  height: 100vh;
  max-height: 100vh;
  padding: 24px 20px;
  border: none;
  border-radius: 0;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.25s ease, overlay 0.25s allow-discrete, display 0.25s allow-discrete;
}

.account-panel[open] {
  transform: translateX(0);
}

@starting-style {
  .account-panel[open] {
    transform: translateX(100%);
  }
}

.account-panel::backdrop {
  background: rgba(12, 13, 13, 0.4);
}

.account-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-bg-muted);
}

.account-panel__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-text);
}

.account-panel__email {
  margin-top: 2px;
  font-size: 13px;
  color: var(--color-text-secondary);
  word-break: break-all;
}

/* ============================
   modal/panel close icon buttons (shared default)
   ============================ */
[class$="__close"] {
  border: 1px solid var(--color-primary);
}

[class$="__close"]:focus-visible {
  outline: none;
}

.account-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--color-text-secondary);
  transition: background-color var(--transition-base);
}

.account-panel__close svg {
  width: 16px;
  height: 16px;
}

.account-panel__close:hover,
.account-panel__close:focus-visible {
  background: var(--color-bg-muted);
}

.account-panel__menu {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
}

.account-panel__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  background: none;
  border: none;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-base);
}

.account-panel__item:hover,
.account-panel__item:focus-visible {
  background: var(--color-bg-muted);
}

.account-panel__item-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-secondary);
}

/* ============================
   dialog-horario
   ============================ */
.hours-dialog {
  margin: auto;
  width: min(493px, calc(100vw - 40px));
  max-height: min(524px, calc(100vh - 40px));
  padding: 24px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
}

.hours-dialog::backdrop {
  background: rgba(12, 13, 13, 0.5);
}

@media (min-width: 768px) {
  .hours-dialog {
    padding: 40px;
  }
}

.hours-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.hours-dialog__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
}

.hours-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: -4px;
  border-radius: 50%;
  color: var(--color-text);
  transition: background-color var(--transition-base);
}

.hours-dialog__close:hover,
.hours-dialog__close:focus-visible {
  background: var(--color-bg-muted);
}

.hours-dialog__close svg {
  width: 18px;
  height: 18px;
}

.hours-dialog__list {
  display: flex;
  flex-direction: column;
}

.hours-dialog__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 15px;
  border-bottom: 1px solid var(--color-bg-muted);
  font-size: 14px;
}

.hours-dialog__row:last-child {
  border-bottom: none;
}

.hours-dialog__day {
  color: var(--color-text);
}

.hours-dialog__value-wrap {
  display: flex;
  align-items: center;
  gap: 21px;
}

.hours-dialog__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
}

.hours-dialog__badge[hidden] {
  display: none;
}

.hours-dialog__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-cta);
}

.hours-dialog__badge-text {
  font-size: 9px;
  font-weight: 500;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.hours-dialog__time {
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
}

.hours-dialog__time--closed {
  color: #9ca3af;
}

/* ============================
   badge-stack (selos de programas do PEV)
   ============================ */
.badge-stack {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 8px;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.badge-stack::after {
  content: "Rotas ECO Conexão";
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--color-text-secondary);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  z-index: 10;
}

.badge-stack:hover::after,
.badge-stack:focus-visible::after {
  opacity: 1;
}

/* ============================
   programs-dialog (rotas eco conexão)
   ============================ */
.programs-dialog {
  margin: auto;
  width: min(493px, calc(100vw - 40px));
  max-height: min(524px, calc(100vh - 40px));
  padding: 24px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
}

.programs-dialog::backdrop {
  background: rgba(12, 13, 13, 0.5);
}

@media (min-width: 768px) {
  .programs-dialog {
    padding: 40px;
  }
}

.programs-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.programs-dialog__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
}

.programs-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: -4px;
  border-radius: 50%;
  color: var(--color-text);
  transition: background-color var(--transition-base);
}

.programs-dialog__close:hover,
.programs-dialog__close:focus-visible {
  background: var(--color-bg-muted);
}

.programs-dialog__close svg {
  width: 18px;
  height: 18px;
}

.programs-dialog__list {
  display: flex;
  flex-direction: column;
}

.programs-dialog__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 16px;
  border-bottom: 1px solid var(--color-bg-muted);
}

.programs-dialog__row:last-child {
  border-bottom: none;
}

.programs-dialog__icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}

.programs-dialog__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.badge-stack__item {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}

.badge-stack__item:not(:first-child) {
  margin-left: -6px;
}

.badge-stack__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
