/* Only Contacto / Cotizacion form states. Header, footer and TLC Box are untouched. */
.cargo-form-shell {
  display: grid;
  min-inline-size: 0;
  align-content: start;
}

.cargo-form-shell [hidden] {
  display: none;
}

.cargo-form-shell [data-form-status][data-state='error'],
.cargo-form__error {
  color: #a52828;
  font-size: 13px;
  line-height: 1.5;
}

.cargo-form-shell [data-form-status],
.cargo-form__error,
.cargo-form__confirmation > * {
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}

.cargo-form-shell [aria-invalid='true'] {
  border-color: #a52828;
}

.cargo-form-shell :is(input, textarea, button):focus-visible,
.cargo-form__confirmation:focus {
  outline: 3px solid #ad7600;
  outline-offset: 3px;
}

.cargo-form-shell [data-state='sending'] button[type='submit'] {
  opacity: 1;
  cursor: progress;
}

.cargo-form__spinner {
  flex: 0 0 auto;
  inline-size: 20px;
  block-size: 20px;
  border: 2px solid #061e4040;
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: cargo-spin .8s linear infinite;
}

.cargo-form__confirmation {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 18px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid #b4dcc7;
  border-radius: 12px;
  color: var(--navy);
  background: #f4fbf7;
  box-shadow: 0 8px 30px #061e4008;
  text-align: center;
  animation: cargo-enter .28s ease-out both;
}

.cargo-form__confirmation h2 {
  font-size: clamp(23px, 3vw, 30px);
}

.cargo-form__confirmation p {
  max-inline-size: 480px;
  line-height: 1.65;
}

.cargo-form__check {
  inline-size: 76px;
  block-size: 76px;
  fill: none;
  stroke: #198754;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cargo-form__check :is(circle, path) {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: cargo-draw .4s ease-out forwards;
}

.cargo-form__check path {
  animation-delay: .18s;
}

@keyframes cargo-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes cargo-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cargo-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 430px) {
  .cargo-form-shell button {
    inline-size: 100%;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cargo-form-shell *,
  .cargo-form-shell *::before,
  .cargo-form-shell *::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}
