/* ==========================================================
   SUBIR DE NÍVEL — ENTREGAS DE CAMINHÃO
========================================================== */

.level-up-view {
  --level-up-green: #3f6f43;
  --level-up-green-dark: #305735;
  --level-up-green-soft: #edf5ec;
  --level-up-yellow: #f4b817;
  --level-up-yellow-soft: #fff5cd;
  --level-up-ink: #302a22;
  display: grid;
  gap: 18px;
}

.level-up-view > .customer-view__topbar,
.level-up-view > .customer-secondary-button {
  margin: 0;
}

.level-up-view .colored-vouchers-maintenance-notice {
  margin: 0;
}

.level-up-intro,
.level-up-calculator,
.level-up-price-table {
  border: 1px solid #e0d8d1;
  border-radius: 17px;
  background: #fff;
}

.level-up-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  padding: clamp(18px, 4vw, 24px);
  background:
    linear-gradient(135deg, rgb(255 250 230 / 95%), rgb(239 248 238 / 96%)),
    #fff;
}

.level-up-intro__icon {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 1px solid #efd483;
  border-radius: 18px;
  background: #ffdc62;
  box-shadow: 0 7px 18px rgb(73 55 24 / 12%);
  font-size: 2rem;
}

.level-up-intro h2 {
  margin: 0;
  color: var(--level-up-ink);
  font-size: clamp(1.15rem, 3.8vw, 1.42rem);
  line-height: 1.25;
}

.level-up-intro p:last-child {
  margin: 7px 0 0;
  color: #665d53;
  font-size: 0.9rem;
  line-height: 1.5;
}

.level-up-calculator {
  padding: clamp(18px, 4vw, 24px);
}

.level-up-section-heading {
  align-items: center;
}

.level-up-calculator__badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--level-up-green-soft);
  color: var(--level-up-green-dark);
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.level-up-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.level-up-fields label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #493f3b;
  font-size: 0.86rem;
  font-weight: 800;
}

.level-up-fields input {
  width: 100%;
  min-width: 0;
  min-height: 55px;
  padding: 0 13px;
  border: 1px solid #cfc2b7;
  border-radius: 12px;
  background: #fff;
  color: var(--level-up-ink);
  font: inherit;
  font-size: 1.12rem;
  font-weight: 850;
  outline: none;
}

.level-up-fields input:focus-visible {
  border-color: var(--level-up-green);
  box-shadow: 0 0 0 3px rgb(63 111 67 / 16%);
}

.level-up-fields input[data-invalid="true"] {
  border-color: #b42318;
  background: #fff8f7;
}

.level-up-fields small {
  color: #81766e;
  font-size: 0.72rem;
  font-weight: 650;
}

.level-up-fields__arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-top: 19px;
  border-radius: 50%;
  background: var(--level-up-yellow-soft);
  color: #755600;
  font-size: 1.1rem;
  font-weight: 900;
}

.level-up-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
}

.level-up-shortcuts > span {
  margin-right: 2px;
  color: #776b66;
  font-size: 0.78rem;
  font-weight: 800;
}

.level-up-shortcuts button {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #d7cdc4;
  border-radius: 999px;
  background: #fbfaf9;
  color: #493f3b;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.level-up-shortcuts button:hover,
.level-up-shortcuts button:focus-visible {
  border-color: var(--level-up-green);
  background: var(--level-up-green-soft);
}

.level-up-quote {
  margin-top: 18px;
  padding: clamp(15px, 3.4vw, 20px);
  border: 1px solid #dfd7ce;
  border-radius: 15px;
  background: #fbfaf8;
}

.level-up-quote[data-valid="false"] {
  border-color: #efc2bd;
  background: #fff8f7;
}

.level-up-route {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.level-up-route > span {
  display: grid;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  place-items: center;
  border-radius: 12px;
  background: var(--level-up-green);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 900;
}

.level-up-route > div {
  position: relative;
  height: 34px;
}

.level-up-route i {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 4px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    #d1b358 0 13px,
    transparent 13px 20px
  );
  transform: translateY(-50%);
}

.level-up-route b {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 2px 5px;
  background: #fbfaf8;
  font-size: 1.35rem;
  transform: translate(-50%, -55%);
}

.level-up-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 16px 0 0;
}

.level-up-summary > div {
  min-width: 0;
  padding: 12px 13px;
  border-radius: 11px;
  background: #fff;
}

.level-up-summary__total {
  grid-column: 1 / -1;
  border: 1px solid #d9e9d7;
  background: var(--level-up-green-soft) !important;
}

.level-up-summary dt {
  color: #7b7068;
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.level-up-summary dd {
  margin: 4px 0 0;
  color: var(--level-up-ink);
  font-size: 0.94rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.level-up-summary__total dd {
  color: var(--level-up-green-dark);
  font-size: 1.42rem;
}

.level-up-breakdown {
  margin-top: 13px;
  border-top: 1px solid #e8e1da;
}

.level-up-breakdown summary,
.level-up-price-table > summary {
  padding: 13px 0 0;
  color: #493f3b;
  font-size: 0.84rem;
  font-weight: 850;
  cursor: pointer;
}

.level-up-breakdown > div {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.level-up-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 9px;
  background: #fff;
  color: #655b54;
  font-size: 0.78rem;
}

.level-up-breakdown-row strong {
  color: var(--level-up-ink);
  white-space: nowrap;
}

.level-up-checkout {
  margin-top: 0;
}

.level-up-payment-summary > div {
  background: var(--level-up-yellow-soft);
}

.level-up-view .level-up-payment-actions button {
  background: var(--level-up-green);
}

.level-up-view .level-up-payment-actions button:hover:not(:disabled),
.level-up-view .level-up-payment-actions button:focus-visible:not(:disabled) {
  background: var(--level-up-green-dark);
}

.level-up-view .level-up-payment-actions button:disabled {
  background: #e4e1de;
}

.level-up-price-table {
  padding: 0 clamp(18px, 4vw, 24px) clamp(18px, 4vw, 24px);
}

.level-up-price-table > summary {
  padding: 18px 0 0;
}

.level-up-price-table__scroll {
  max-height: 380px;
  margin-top: 14px;
  overflow: auto;
  border: 1px solid #e4ddd6;
  border-radius: 12px;
}

.level-up-price-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.level-up-price-table th,
.level-up-price-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee8e2;
  color: #514842;
  text-align: left;
}

.level-up-price-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f0ec;
  color: #3f3732;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.level-up-price-table td:last-child,
.level-up-price-table th:last-child {
  text-align: right;
  white-space: nowrap;
}

.level-up-price-table tr:last-child td {
  border-bottom: 0;
}

@container colored-vouchers (max-width: 440px) {
  .level-up-intro {
    grid-template-columns: 1fr;
  }

  .level-up-intro__icon {
    width: 54px;
    height: 54px;
    border-radius: 15px;
    font-size: 1.65rem;
  }

  .level-up-fields {
    grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr);
    gap: 7px;
  }

  .level-up-fields input {
    min-height: 52px;
    padding: 0 10px;
  }

  .level-up-fields__arrow {
    width: 26px;
    height: 26px;
    font-size: 0.9rem;
  }

  .level-up-shortcuts {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .level-up-shortcuts > span {
    grid-column: 1 / -1;
  }

  .level-up-shortcuts button {
    padding-inline: 5px;
  }

  .level-up-route {
    grid-template-columns: auto minmax(50px, 1fr) auto;
    gap: 7px;
  }

  .level-up-route > span {
    min-width: 38px;
    height: 38px;
    padding: 0 6px;
    font-size: 0.8rem;
  }

  .level-up-breakdown-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .level-up-breakdown-row strong {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .level-up-view * {
    scroll-behavior: auto !important;
  }
}
