/* =====================================================================
   Pedagiômetro Section — embed da calculadora no site institucional.
   - Lado esquerdo: mini-calculadora (origem/destino/veículo/eixos)
   - Lado direito: preview do mapa (SVG animado antes do cálculo,
     imagem estática do Mapbox após o cálculo).
   - Após calcular: km + tempo liberados; custo de pedágio bloqueado
     atrás de captura de email (lead).
   - "Ver rota completa" → handoff para pedagiometro.webrota.com.br
   ===================================================================== */

.pedagiometro-section {
  position: relative;
  padding: clamp(64px, 8vw, 110px) 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(245, 134, 52, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(28, 31, 38, 0.06), transparent 60%),
    linear-gradient(180deg, #fbfbfd 0%, #f4f5f7 100%);
  overflow: hidden;
  isolation: isolate;
}

.pedagiometro-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(28, 31, 38, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 31, 38, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
  pointer-events: none;
  z-index: -1;
}

/* O container herda o padrão do site (max-width: 1440px em index.css) para
   alinhar com as demais sections. Sem override aqui. */

/* === Header da section === */
.pedagiometro-section__header {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 56px);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.pedagiometro-section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--wr-primary, #f58634);
  background: rgba(245, 134, 52, 0.10);
  border: 1px solid rgba(245, 134, 52, 0.22);
  border-radius: 999px;
  margin-bottom: 16px;
}

.pedagiometro-section__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wr-primary, #f58634);
  box-shadow: 0 0 0 0 rgba(245, 134, 52, 0.7);
  animation: pedagiometro-pulse 2s ease-out infinite;
}

@keyframes pedagiometro-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 134, 52, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(245, 134, 52, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 134, 52, 0); }
}

.pedagiometro-section__title {
  font-size: clamp(1.65rem, 3.2vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.pedagiometro-section__title strong {
  color: var(--wr-primary, #f58634);
  font-weight: 700;
}

.pedagiometro-section__subtitle {
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  color: var(--wr-text-secondary, #4B5563);
  line-height: 1.55;
}

/* === Grid principal === */
.pedagiometro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(20px, 2.4vw, 32px);
  align-items: stretch;
}

/* === Card base (esquerda e direita) === */
.pedagiometro-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(28, 31, 38, 0.08);
  border-radius: 22px;
  box-shadow:
    0 1px 2px rgba(28, 31, 38, 0.04),
    0 18px 40px -22px rgba(28, 31, 38, 0.18);
  overflow: hidden;
}

/* === FORM (lado esquerdo) === */
.pedagiometro-form {
  padding: clamp(22px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* overflow visible para o dropdown do autocomplete sair do card */
  overflow: visible;
}

.pedagiometro-form__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.pedagiometro-form__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff8a3c 0%, #f58634 100%);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(245, 134, 52, 0.55);
}

.pedagiometro-form__icon svg { width: 22px; height: 22px; }

.pedagiometro-form__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--wr-text, #1C1F26);
  line-height: 1.2;
}

.pedagiometro-form__title-sub {
  font-size: .82rem;
  color: var(--wr-text-secondary, #6B7280);
  font-weight: 500;
}

/* Inputs de origem/destino */
.ped-route-fields {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #f8f9fb;
  border: 1px solid rgba(28, 31, 38, 0.06);
  border-radius: 14px;
}

.ped-route-fields::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 38px;
  bottom: 38px;
  width: 2px;
  background-image: linear-gradient(180deg, rgba(28, 31, 38, 0.18) 50%, transparent 50%);
  background-size: 2px 6px;
  pointer-events: none;
}

.ped-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid rgba(28, 31, 38, 0.07);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}

.ped-field:focus-within {
  border-color: rgba(245, 134, 52, 0.55);
  box-shadow: 0 0 0 4px rgba(245, 134, 52, 0.12);
}

.ped-field__bullet {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
  background: #1C1F26;
  letter-spacing: 0;
}

.ped-field--destination .ped-field__bullet {
  background: var(--wr-primary, #f58634);
}

.ped-field__input {
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: .95rem;
  font-family: inherit;
  color: var(--wr-text, #1C1F26);
  padding: 8px 0;
  min-width: 0;
}

.ped-field__input::placeholder {
  color: #9aa0a6;
}

.ped-field__clear {
  flex: 0 0 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #9aa0a6;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .15s, background .15s, color .15s;
}

.ped-field__input:not(:placeholder-shown) ~ .ped-field__clear {
  opacity: 1;
}

.ped-field__clear:hover {
  background: rgba(28, 31, 38, 0.06);
  color: var(--wr-text, #1C1F26);
}

/* Autocomplete dropdown */
.ped-autocomplete {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(28, 31, 38, 0.08);
  border-radius: 12px;
  box-shadow: 0 14px 30px -10px rgba(28, 31, 38, 0.18);
  max-height: 240px;
  overflow-y: auto;
  z-index: 30;
  list-style: none;
  padding: 6px;
  margin: 0;
  display: none;
}

.ped-autocomplete.is-open { display: block; }

.ped-autocomplete li {
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  line-height: 1.35;
}

.ped-autocomplete li:hover,
.ped-autocomplete li.is-active {
  background: rgba(245, 134, 52, 0.08);
}

.ped-autocomplete li .ac-title {
  display: block;
  color: var(--wr-text, #1C1F26);
  font-weight: 500;
}

.ped-autocomplete li .ac-sub {
  display: block;
  color: #9aa0a6;
  font-size: .78rem;
  margin-top: 2px;
}

/* Veículo + eixos */
.ped-vehicle-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.ped-vehicle {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #f8f9fb;
  border: 1px solid rgba(28, 31, 38, 0.06);
  border-radius: 12px;
  padding: 4px;
}

.ped-vehicle__btn {
  background: transparent;
  border: 0;
  padding: 8px 4px;
  border-radius: 9px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--wr-text-secondary, #6B7280);
  transition: background .15s, color .15s, transform .12s;
}

.ped-vehicle__btn svg { width: 22px; height: 22px; }

.ped-vehicle__btn:hover {
  background: rgba(28, 31, 38, 0.05);
}

.ped-vehicle__btn.is-active {
  background: #1C1F26;
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(28, 31, 38, 0.4);
}

.ped-axles {
  display: inline-flex;
  align-items: center;
  background: #f8f9fb;
  border: 1px solid rgba(28, 31, 38, 0.06);
  border-radius: 12px;
  padding: 2px;
}

.ped-axles__btn {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--wr-text, #1C1F26);
  cursor: pointer;
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.ped-axles__btn:hover:not(:disabled) {
  background: rgba(28, 31, 38, 0.06);
}

.ped-axles__btn:disabled { opacity: .3; cursor: not-allowed; }

.ped-axles__btn svg { width: 14px; height: 14px; }

.ped-axles__value {
  min-width: 56px;
  text-align: center;
  font-size: .85rem;
  font-weight: 600;
  color: var(--wr-text, #1C1F26);
}

/* Submit */
.ped-submit {
  position: relative;
  width: 100%;
  padding: 14px 18px;
  background: linear-gradient(135deg, #ff8a3c 0%, #f58634 100%);
  color: #fff;
  border: 0;
  border-radius: 14px;
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow:
    0 1px 2px rgba(245, 134, 52, 0.25),
    0 12px 28px -12px rgba(245, 134, 52, 0.55);
  transition: transform .12s, box-shadow .2s, opacity .15s;
}

.ped-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 1px 2px rgba(245, 134, 52, 0.3),
    0 16px 32px -10px rgba(245, 134, 52, 0.55);
}

.ped-submit:disabled {
  opacity: .55;
  cursor: not-allowed;
  background: linear-gradient(135deg, #c0c4cc 0%, #a8acb3 100%);
  box-shadow: none;
}

.ped-submit svg { width: 18px; height: 18px; }

.ped-submit.is-loading .ped-submit__label { opacity: .6; }
.ped-submit.is-loading .ped-submit__icon { display: none; }

.ped-submit__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ped-spin .8s linear infinite;
}

.ped-submit.is-loading .ped-submit__spinner { display: inline-block; }

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

/* Trust badges abaixo do form */
.ped-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: .76rem;
  color: var(--wr-text-secondary, #6B7280);
  margin-top: 2px;
  flex-wrap: wrap;
}

.ped-trust span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ped-trust svg { width: 14px; height: 14px; color: #16a34a; }

/* === MAPA (lado direito) === */
.pedagiometro-map {
  position: relative;
  min-height: 480px;
  background: linear-gradient(140deg, #1a2942 0%, #0f1729 60%, #0a1020 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.pedagiometro-map__canvas {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
}

.pedagiometro-map__preview,
.pedagiometro-map__image,
.pedagiometro-map__gl {
  position: absolute;
  inset: 0;
}

.pedagiometro-map__image {
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity .5s ease;
}

.pedagiometro-map__gl {
  opacity: 0;
  transition: opacity .6s ease;
}

.pedagiometro-map.gl-ready .pedagiometro-map__gl { opacity: 1; }
.pedagiometro-map.gl-ready .pedagiometro-map__preview { opacity: 0; }
.pedagiometro-map.has-result .pedagiometro-map__image { opacity: 0; }
.pedagiometro-map.has-result .pedagiometro-map__preview { opacity: 0; }

/* Quando Mapbox falha (token sem permissão no domínio), mantém o preview
   decorativo e esconde o loading. */
.pedagiometro-map.gl-failed .pedagiometro-map__gl,
.pedagiometro-map.gl-failed .pedagiometro-map__gl-loading {
  display: none;
}
.pedagiometro-map.gl-failed.has-result .pedagiometro-map__image {
  opacity: 1;
}
.pedagiometro-map.gl-failed.has-result .pedagiometro-map__preview {
  opacity: 0;
}

/* Esconde controles do Mapbox que poluem o visual premium */
.pedagiometro-map__gl .mapboxgl-ctrl-bottom-left,
.pedagiometro-map__gl .mapboxgl-ctrl-bottom-right {
  opacity: 0.55;
  transform: scale(0.85);
  transform-origin: bottom right;
}

.pedagiometro-map__gl .mapboxgl-canvas {
  outline: none;
}

/* Loading shimmer enquanto Mapbox carrega */
.pedagiometro-map__gl-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(15, 23, 41, 0.6), rgba(10, 16, 32, 0.6));
  color: rgba(255, 255, 255, 0.7);
  font-size: .82rem;
  pointer-events: none;
  opacity: 1;
  transition: opacity .35s;
}

.pedagiometro-map.gl-ready .pedagiometro-map__gl-loading {
  opacity: 0;
  visibility: hidden;
}

.pedagiometro-map__gl-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--wr-primary, #f58634);
  border-radius: 50%;
  animation: ped-spin .9s linear infinite;
  margin-bottom: 10px;
}

.pedagiometro-map__preview {
  opacity: 1;
  transition: opacity .4s ease;
  background-image:
    radial-gradient(800px 400px at 30% 70%, rgba(245, 134, 52, 0.10), transparent 60%),
    radial-gradient(600px 400px at 80% 20%, rgba(56, 132, 255, 0.10), transparent 60%);
}

.pedagiometro-map__preview svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Grid pattern do mapa */
.pedagiometro-map__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 40%, transparent 90%);
}

/* Linha de rota animada (preview) */
.ped-route-line {
  stroke: var(--wr-primary, #f58634);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(245, 134, 52, 0.7));
  stroke-dasharray: 10 6;
  animation: ped-dash 22s linear infinite;
}

@keyframes ped-dash {
  to { stroke-dashoffset: -300; }
}

.ped-route-line--bg {
  stroke: rgba(245, 134, 52, 0.18);
  stroke-width: 6;
  filter: none;
  animation: none;
  stroke-dasharray: none;
}

.ped-route-pin {
  fill: #fff;
  stroke: var(--wr-primary, #f58634);
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(245, 134, 52, 0.5));
}

.ped-route-pin--start {
  stroke: #fff;
  fill: #1C1F26;
}

.ped-toll-dot {
  fill: var(--wr-primary, #f58634);
  animation: ped-blink 2.4s ease-in-out infinite;
}

@keyframes ped-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}

/* Header sobreposto no mapa */
.pedagiometro-map__topbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 3;
  pointer-events: none;
}

.pedagiometro-map__tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  pointer-events: auto;
}

.pedagiometro-map__tag svg { width: 12px; height: 12px; color: #4ade80; }

.pedagiometro-map__brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: .02em;
}

.pedagiometro-map__brand strong { color: #fff; font-weight: 700; }

/* Cards flutuantes sobre o mapa (preview state) */
.pedagiometro-map__floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.ped-float {
  position: absolute;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: 14px;
  padding: 12px 14px;
  color: #fff;
  font-size: .85rem;
  line-height: 1.25;
  pointer-events: auto;
  min-width: 130px;
  box-shadow: 0 16px 32px -16px rgba(0,0,0,0.45);
}

.ped-float__label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ped-float__label svg { width: 12px; height: 12px; color: var(--wr-primary, #f58634); }

.ped-float__value {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ped-float__value small {
  font-size: .68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  margin-left: 2px;
}

.ped-float--km    { top: 22%; left: 6%;  animation: ped-float-a 7s ease-in-out infinite; }
.ped-float--time  { top: 38%; right: 6%; animation: ped-float-b 8s ease-in-out infinite; }
.ped-float--toll  { bottom: 28%; left: 10%; animation: ped-float-b 9s ease-in-out infinite; }
.ped-float--saved {
  bottom: 18%; right: 6%;
  animation: ped-float-a 7.5s ease-in-out infinite;
  border-color: rgba(74, 222, 128, 0.30);
  background: rgba(74, 222, 128, 0.08);
}

.ped-float--saved .ped-float__value { color: #4ade80; }

@keyframes ped-float-a {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes ped-float-b {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* === Painel de resultado === */
.pedagiometro-map__result {
  position: relative;
  flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(15, 23, 41, 0.85) 0%, #0a1020 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ped-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ped-stat__label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.ped-stat__value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.1;
}

.ped-stat__value small {
  font-size: .8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 3px;
}

.ped-stat--locked .ped-stat__value {
  filter: blur(7px);
  user-select: none;
}

.ped-stat--locked {
  position: relative;
}

.ped-stat--locked::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(245, 134, 52, 0.10), rgba(245, 134, 52, 0.02));
  z-index: -1;
}

/* Estado: antes do cálculo */
.pedagiometro-map:not(.has-result) .pedagiometro-map__result {
  display: none;
}

.pedagiometro-map:not(.has-result) .pedagiometro-map__floats { opacity: 1; }
.pedagiometro-map.has-result .pedagiometro-map__floats { opacity: 0; pointer-events: none; transition: opacity .3s; }

/* === Email gate (lock overlay) === */
.ped-gate {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: rgba(10, 16, 32, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: ped-fade-in .25s ease both;
}

.pedagiometro-map.is-gated .ped-gate { display: flex; }

@keyframes ped-fade-in { from { opacity: 0; } to { opacity: 1; } }

.ped-gate__box {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  color: var(--wr-text, #1C1F26);
  border-radius: 18px;
  padding: 22px 22px 20px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.45);
  text-align: center;
}

.ped-gate__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(245, 134, 52, 0.16), rgba(245, 134, 52, 0.06));
  color: var(--wr-primary, #f58634);
}

.ped-gate__icon svg { width: 22px; height: 22px; }

.ped-gate__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.25;
}

.ped-gate__desc {
  font-size: .85rem;
  color: var(--wr-text-secondary, #4B5563);
  line-height: 1.45;
  margin-bottom: 14px;
}

.ped-gate__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ped-gate__input {
  padding: 11px 14px;
  border: 1px solid rgba(28, 31, 38, 0.12);
  border-radius: 10px;
  font-size: .9rem;
  font-family: inherit;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}

.ped-gate__input:focus {
  border-color: var(--wr-primary, #f58634);
  box-shadow: 0 0 0 3px rgba(245, 134, 52, 0.18);
}

.ped-gate__submit {
  padding: 11px 16px;
  background: var(--wr-primary, #f58634);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: background .15s, transform .12s;
}

.ped-gate__submit:hover:not(:disabled) {
  background: var(--wr-primary-hover, #e0751f);
  transform: translateY(-1px);
}

.ped-gate__submit:disabled { opacity: .6; cursor: not-allowed; }

.ped-gate__fine {
  font-size: .68rem;
  color: var(--wr-text-secondary, #6B7280);
  margin-top: 10px;
  line-height: 1.4;
}

.ped-gate__error {
  color: #dc2626;
  font-size: .78rem;
  margin-top: 6px;
  min-height: 16px;
}

/* === CTAs pós-resultado === */
.pedagiometro-map__ctas {
  display: none;
  gap: 10px;
  padding: 0 20px 20px;
  flex-wrap: wrap;
}

.pedagiometro-map.has-result .pedagiometro-map__ctas { display: flex; }

.ped-cta {
  flex: 1 1 auto;
  min-width: 160px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, transform .12s, border-color .15s;
}

.ped-cta:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
  color: #fff;
}

.ped-cta--primary {
  background: var(--wr-primary, #f58634);
  border-color: var(--wr-primary, #f58634);
}

.ped-cta--primary:hover {
  background: var(--wr-primary-hover, #e0751f);
  border-color: var(--wr-primary-hover, #e0751f);
}

.ped-cta svg { width: 14px; height: 14px; }

/* === Erro inline === */
.ped-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .82rem;
  display: none;
}

.ped-error.is-visible { display: block; }

/* === Responsivo === */
@media (max-width: 980px) {
  .pedagiometro-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pedagiometro-map { min-height: 420px; }
}

@media (max-width: 640px) {
  .pedagiometro-section { padding: 56px 0 64px; }

  .pedagiometro-map { min-height: 360px; }

  .pedagiometro-map__result {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 14px;
  }

  .ped-stat--toll { grid-column: span 2; }

  .ped-float { font-size: .78rem; padding: 9px 11px; min-width: 110px; }
  .ped-float__value { font-size: .95rem; }

  .pedagiometro-map__ctas { padding: 0 14px 14px; }

  .ped-cta { flex-basis: 100%; }

  .ped-vehicle-row {
    grid-template-columns: 1fr;
  }
  .ped-axles { justify-self: start; }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  .pedagiometro-section__eyebrow::before,
  .ped-route-line,
  .ped-toll-dot,
  .ped-float {
    animation: none;
  }
}

/* =====================================================================
   Variante iframe — embed direto do app pedagiometro.webrota.com.br
   ===================================================================== */

/* Section iframe: herda .container do site (max-width: 1440px) para alinhar
   com as outras sections institucionais. Sem override aqui. */

/* === Variante split: texto à esquerda, iframe à direita === */
.pedagiometro-split {
  display: grid;
  /* Texto mais estreito, iframe ocupa mais espaço */
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: stretch;
}

.pedagiometro-split__copy {
  text-align: left;
  display: flex;
  flex-direction: column;
  /* 3 filhos diretos: título (topo), features (centro), CTAs (fundo).
     space-between distribui o espaço uniformemente — features fica
     centralizado verticalmente entre o título e os CTAs. */
  justify-content: space-between;
  gap: 14px;
  /* Largura confortável de leitura */
  max-width: 440px;
}

.pedagiometro-split__copy-top {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pedagiometro-split .pedagiometro-section__eyebrow {
  align-self: flex-start;
  margin-bottom: 4px;
}

.pedagiometro-split .pedagiometro-section__title {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  margin-bottom: 8px;
  text-align: left;
}

.pedagiometro-split .pedagiometro-section__subtitle {
  text-align: left;
  margin: 0;
  font-size: clamp(.98rem, 1vw, 1.08rem);
}

/* Lista de vantagens — estilo dos features da section "Uma plataforma completa".
   Ícone laranja em quadrado arredondado + título strong + descrição abaixo.
   Uma feature por linha, ícone alinhado ao topo do bloco de texto. */
.pedagiometro-features {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pedagiometro-feature {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.pedagiometro-feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(180deg, #ff9c42 0%, #f58634 100%);
  box-shadow: 0 10px 20px rgba(245, 134, 52, 0.20);
  color: #ffffff;
  /* Pequeno offset para alinhar oticamente com o título (line-height) */
  margin-top: 2px;
}

.pedagiometro-feature__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.pedagiometro-feature__copy {
  min-width: 0;
}

.pedagiometro-feature__copy strong {
  display: block;
  color: var(--wr-text, #1C1F26);
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.25;
}

.pedagiometro-feature__copy span {
  display: block;
  margin-top: 2px;
  color: var(--wr-text-secondary, #4B5563);
  font-size: .84rem;
  line-height: 1.4;
}

.pedagiometro-split__embed {
  min-width: 0;
}

/* CTAs alinhados à esquerda e ao fundo do iframe.
   Em desktop, ocupam 100% da largura disponível, lado a lado.
   Especificidade dupla porque a regra base `.pedagiometro-iframe-ctas`
   aparece depois no arquivo. */
.pedagiometro-iframe-ctas.pedagiometro-iframe-ctas--left {
  justify-content: stretch;
  margin-top: 0;
  flex-wrap: nowrap;
  width: 100%;
  gap: 12px;
}

.pedagiometro-iframe-ctas.pedagiometro-iframe-ctas--left .ped-cta {
  flex: 1 1 0;
  min-width: 0;
  /* Reduz padding lateral para textos caberem em colunas estreitas */
  padding-left: 14px;
  padding-right: 14px;
  white-space: nowrap;
  font-size: .88rem;
}

@media (max-width: 980px) {
  .pedagiometro-split {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(24px, 4vw, 36px);
  }
  .pedagiometro-split__copy {
    max-width: none;
    text-align: center;
    align-items: center;
    /* No mobile não há iframe ao lado, então space-between vira gap normal */
    justify-content: flex-start;
    gap: 18px;
  }
  .pedagiometro-split__copy-top {
    align-items: center;
  }
  .pedagiometro-split .pedagiometro-section__eyebrow {
    align-self: center;
  }
  .pedagiometro-split .pedagiometro-section__title,
  .pedagiometro-split .pedagiometro-section__subtitle {
    text-align: center;
  }
  .pedagiometro-features {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
  }
  .pedagiometro-feature {
    text-align: left;
  }
  .pedagiometro-iframe-ctas.pedagiometro-iframe-ctas--left {
    justify-content: center;
    flex-wrap: wrap;
  }
  .pedagiometro-iframe-ctas.pedagiometro-iframe-ctas--left .ped-cta {
    flex: 1 1 100%;
  }
}

.pedagiometro-iframe-shell {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #0f1729;
  border: 0;
  /* Sombra flutuante igual ao .ov-stats-panel (cards "19 mil+", etc) */
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.08);
  isolation: isolate;
}

.pedagiometro-iframe-shell__topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #fbfbfd 0%, #f4f5f7 100%);
  border-bottom: 1px solid rgba(28, 31, 38, 0.08);
}

.pedagiometro-iframe-shell__dots {
  display: inline-flex;
  gap: 6px;
  flex: 0 0 auto;
}

.pedagiometro-iframe-shell__dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d0d4db;
  display: inline-block;
}

.pedagiometro-iframe-shell__dots span:nth-child(1) { background: #ff5f57; }
.pedagiometro-iframe-shell__dots span:nth-child(2) { background: #febc2e; }
.pedagiometro-iframe-shell__dots span:nth-child(3) { background: #28c840; }

.pedagiometro-iframe-shell__url {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid rgba(28, 31, 38, 0.08);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--wr-text-secondary, #4B5563);
  max-width: 360px;
  margin: 0 auto;
}

.pedagiometro-iframe-shell__url svg { color: #16a34a; flex: 0 0 auto; }

.pedagiometro-iframe-shell__open {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--wr-primary, #f58634);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s, transform .12s;
}

.pedagiometro-iframe-shell__open:hover {
  background: var(--wr-primary-hover, #e0751f);
  color: #fff;
  transform: translateY(-1px);
}

.pedagiometro-iframe-shell__frame {
  position: relative;
  width: 100%;
  /* Altura responsiva: ~70vh com mínimo confortável e máximo razoável */
  height: clamp(520px, 70vh, 720px);
  /* Background transparente para não aparecer "pretinho" nos cantos do
     iframe quando o conteúdo é claro. O loading overlay tem seu próprio
     fundo escuro enquanto o iframe não carregou. */
  background: #ffffff;
}

/* Na variante split (lado a lado) a altura precisa caber junto da copy à
   esquerda. Mantemos um valor um pouco menor para evitar overflow vertical
   gigante em telas maiores. */
.pedagiometro-section--split .pedagiometro-iframe-shell__frame {
  height: clamp(500px, 64vh, 660px);
}

.pedagiometro-iframe-shell__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  display: block;
  background: #ffffff;
}

.pedagiometro-iframe-shell__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: .88rem;
  background: linear-gradient(135deg, #1a2942 0%, #0f1729 60%, #0a1020 100%);
  pointer-events: none;
  transition: opacity .4s ease;
}

.pedagiometro-iframe-shell__loading.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.pedagiometro-iframe-shell__spinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--wr-primary, #f58634);
  border-radius: 50%;
  animation: ped-spin .9s linear infinite;
  margin-bottom: 12px;
}

.pedagiometro-iframe-ctas {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: clamp(20px, 2.4vw, 28px);
  flex-wrap: wrap;
}

.pedagiometro-iframe-ctas .ped-cta {
  flex: 0 0 auto;
  min-width: 200px;
  padding: 12px 22px;
  font-size: .92rem;
  text-decoration: none;
}

.pedagiometro-iframe-ctas .ped-cta--solid {
  background: var(--wr-primary, #f58634);
  color: #fff;
  border-color: var(--wr-primary, #f58634);
  box-shadow: 0 10px 24px -10px rgba(245, 134, 52, 0.55);
}

.pedagiometro-iframe-ctas .ped-cta--solid:hover {
  background: var(--wr-primary-hover, #e0751f);
  border-color: var(--wr-primary-hover, #e0751f);
  transform: translateY(-1px);
  color: #fff;
}

.pedagiometro-iframe-ctas .ped-cta--ghost {
  background: transparent;
  color: var(--wr-text, #1C1F26);
  border-color: rgba(28, 31, 38, 0.18);
}

.pedagiometro-iframe-ctas .ped-cta--ghost:hover {
  background: rgba(28, 31, 38, 0.05);
  border-color: rgba(28, 31, 38, 0.28);
  color: var(--wr-text, #1C1F26);
}

@media (max-width: 768px) {
  .pedagiometro-iframe-shell__topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }
  .pedagiometro-iframe-shell__url {
    order: 3;
    width: 100%;
    max-width: none;
    flex: 1 1 100%;
    justify-content: center;
    font-size: .75rem;
  }
  .pedagiometro-iframe-shell__open {
    margin-left: auto;
    font-size: .75rem;
    padding: 6px 10px;
  }
  .pedagiometro-iframe-shell__frame {
    height: clamp(480px, 88vh, 720px);
  }
  .pedagiometro-iframe-ctas .ped-cta {
    flex: 1 1 100%;
    min-width: 0;
  }
}
