:root {
  --acv-navy: #14263D;
  --acv-slate: #314A5F;
  --acv-gold: #C79A45;
  --acv-ivory: #F5F1E8;
  --acv-white: #FFFFFF;
  --acv-ink: #172331;
  --acv-muted: #65717D;
  --acv-line: #DDE3E8;
  --acv-error: #A4262C;
  --acv-success: #17633C;
}

.acv-invoice,
.acv-invoice * {
  box-sizing: border-box;
}

.acv-invoice {
  color: var(--acv-ink);
  background:
    radial-gradient(circle at 90% 5%, rgba(199, 154, 69, .14), transparent 28rem),
    linear-gradient(180deg, var(--acv-ivory) 0, #fff 34rem);
  padding: clamp(28px, 5vw, 72px) 18px;
  font-family: inherit;
}

.acv-invoice__shell {
  width: min(860px, 100%);
  margin: 0 auto;
}

.acv-invoice__header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
}

.acv-invoice__eyebrow {
  display: inline-block;
  color: var(--acv-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  margin-bottom: 10px;
}

.acv-invoice__header h1 {
  color: var(--acv-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.05;
  margin: 0 0 16px;
}

/* La página ya contiene su propio H1 dentro del formulario. */
body.acv-facturacion-page .entry-header,
body.acv-facturacion-page .page-header {
  display: none;
}

.acv-invoice__header > p {
  color: var(--acv-slate);
  font-size: 17px;
  line-height: 1.65;
  margin: 0 auto;
  max-width: 640px;
}

.acv-invoice__trust {
  align-items: center;
  color: var(--acv-slate);
  display: inline-flex;
  font-size: 13px;
  gap: 8px;
  margin-top: 16px;
}

.acv-invoice__trust span {
  align-items: center;
  background: rgba(23, 99, 60, .1);
  border-radius: 50%;
  color: var(--acv-success);
  display: inline-flex;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.acv-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  position: relative;
}

.acv-steps::before {
  background: var(--acv-line);
  content: "";
  height: 2px;
  left: 16.66%;
  position: absolute;
  right: 16.66%;
  top: 19px;
}

.acv-steps li {
  align-items: center;
  color: var(--acv-muted);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 7px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.acv-steps span {
  align-items: center;
  background: var(--acv-white);
  border: 2px solid var(--acv-line);
  border-radius: 50%;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  transition: .2s ease;
  width: 40px;
}

.acv-steps .is-active,
.acv-steps .is-complete {
  color: var(--acv-navy);
}

.acv-steps .is-active span {
  background: var(--acv-navy);
  border-color: var(--acv-navy);
  color: var(--acv-white);
  box-shadow: 0 0 0 6px rgba(20, 38, 61, .08);
}

.acv-steps .is-complete span {
  background: var(--acv-gold);
  border-color: var(--acv-gold);
  color: var(--acv-white);
}

.acv-form,
.acv-success {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(20, 38, 61, .09);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(20, 38, 61, .1);
  padding: clamp(24px, 5vw, 48px);
}

.acv-step {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.acv-step legend {
  color: var(--acv-navy);
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.2;
  margin: 0;
  padding: 0;
  width: 100%;
}

.acv-step__intro {
  color: var(--acv-muted);
  line-height: 1.55;
  margin: 8px 0 28px;
}

.acv-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.acv-field {
  color: var(--acv-ink);
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.acv-field--full {
  grid-column: 1 / -1;
  margin-bottom: 22px;
}

.acv-field > span,
.acv-label {
  display: block;
  margin-bottom: 8px;
}

.acv-field em,
.acv-label em {
  color: var(--acv-gold);
  font-style: normal;
}

.acv-field input,
.acv-field select {
  appearance: none;
  background-color: #fff;
  border: 1px solid #BCC7D0;
  border-radius: 12px;
  box-shadow: none;
  color: var(--acv-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  min-height: 50px;
  outline: none;
  padding: 12px 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
  width: 100%;
}

.acv-field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--acv-slate) 50%), linear-gradient(135deg, var(--acv-slate) 50%, transparent 50%);
  background-position: calc(100% - 19px) 22px, calc(100% - 14px) 22px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  padding-right: 38px;
}

.acv-field input:focus,
.acv-field select:focus {
  border-color: var(--acv-gold);
  box-shadow: 0 0 0 4px rgba(199, 154, 69, .15);
}

.acv-field input[aria-invalid="true"],
.acv-field select[aria-invalid="true"] {
  border-color: var(--acv-error);
  box-shadow: 0 0 0 3px rgba(164, 38, 44, .09);
}

.acv-field > small:not(.acv-error) {
  color: var(--acv-muted);
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  margin-top: 6px;
}

.acv-error {
  color: var(--acv-error);
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  min-height: 0;
  margin-top: 5px;
}

.acv-error:empty {
  display: none;
}

.acv-choice-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.acv-choice {
  cursor: pointer;
  display: block;
  margin: 0;
  position: relative;
}

.acv-choice input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.acv-choice > span {
  background: #fff;
  border: 1px solid var(--acv-line);
  border-radius: 14px;
  display: block;
  min-height: 92px;
  padding: 20px;
  transition: .18s ease;
}

.acv-choice b {
  color: var(--acv-navy);
  display: block;
  font-size: 16px;
  margin-bottom: 5px;
}

.acv-choice small {
  color: var(--acv-muted);
  font-size: 13px;
  font-weight: 400;
}

.acv-choice input:checked + span {
  background: rgba(199, 154, 69, .08);
  border-color: var(--acv-gold);
  box-shadow: 0 0 0 3px rgba(199, 154, 69, .12);
}

.acv-choice input:focus-visible + span {
  outline: 3px solid rgba(20, 38, 61, .25);
  outline-offset: 2px;
}

.acv-money {
  position: relative;
}

.acv-money > span {
  color: var(--acv-slate);
  font-size: 17px;
  left: 15px;
  position: absolute;
  top: 13px;
}

.acv-money input {
  padding-left: 31px;
}

.acv-confirmation {
  align-items: flex-start;
  background: #FAFBFC;
  border: 1px solid var(--acv-line);
  border-radius: 14px;
  color: var(--acv-slate);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  gap: 13px;
  line-height: 1.55;
  margin: 0 0 14px;
  padding: 18px;
}

.acv-confirmation input {
  accent-color: var(--acv-navy);
  flex: 0 0 auto;
  height: 20px;
  margin: 1px 0 0;
  width: 20px;
}

.acv-confirmation b {
  color: var(--acv-navy);
}

.acv-privacy {
  color: var(--acv-muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 18px 0 0;
}

.acv-privacy a {
  color: var(--acv-navy);
  font-weight: 700;
}

.acv-actions {
  border-top: 1px solid var(--acv-line);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 34px;
  padding-top: 24px;
}

.acv-button {
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  min-height: 48px;
  padding: 12px 25px;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.acv-button:hover {
  transform: translateY(-1px);
}

.acv-button:focus-visible {
  outline: 3px solid rgba(199, 154, 69, .45);
  outline-offset: 3px;
}

.acv-button--primary {
  background: var(--acv-navy);
  box-shadow: 0 10px 24px rgba(20, 38, 61, .18);
  color: #fff;
}

.acv-button--primary:hover {
  background: var(--acv-slate);
}

.acv-button--secondary {
  background: #fff;
  border-color: #BBC5CD;
  color: var(--acv-navy);
}

.acv-button:disabled {
  cursor: wait;
  opacity: .65;
  transform: none;
}

.acv-alert {
  background: #FFF4F4;
  border: 1px solid #E7B8BB;
  border-radius: 12px;
  color: var(--acv-error);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 16px;
  padding: 14px 16px;
}

.acv-success {
  padding-block: clamp(48px, 8vw, 78px);
  text-align: center;
}

.acv-success__icon {
  align-items: center;
  background: rgba(23, 99, 60, .1);
  border-radius: 50%;
  color: var(--acv-success);
  display: inline-flex;
  font-size: 28px;
  height: 66px;
  justify-content: center;
  margin-bottom: 18px;
  width: 66px;
}

.acv-success h2 {
  color: var(--acv-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  font-weight: 500;
  margin: 0 0 12px;
}

.acv-success p {
  color: var(--acv-slate);
  line-height: 1.6;
  margin: 0 auto 18px;
  max-width: 520px;
}

.acv-success strong {
  background: var(--acv-ivory);
  border: 1px solid rgba(199, 154, 69, .35);
  border-radius: 10px;
  color: var(--acv-navy);
  display: inline-block;
  font-size: 20px;
  letter-spacing: .04em;
  margin-bottom: 20px;
  padding: 10px 18px;
}

.acv-success__note {
  font-size: 13px;
}

.acv-status {
  background: linear-gradient(145deg, #fff 0%, #F8FAFC 100%);
  border: 1px solid rgba(20, 38, 61, .1);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(20, 38, 61, .08);
  margin-top: 30px;
  padding: clamp(24px, 4vw, 38px);
}

.acv-status__intro {
  margin-bottom: 22px;
}

.acv-status__intro h2 {
  color: var(--acv-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 8px;
}

.acv-status__intro p {
  color: var(--acv-muted);
  line-height: 1.55;
  margin: 0;
}

.acv-status__form {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto;
}

.acv-status__form .acv-button {
  min-width: 160px;
}

.acv-status__result {
  border: 1px solid var(--acv-line);
  border-radius: 13px;
  margin-top: 18px;
  outline: none;
  padding: 15px 17px;
}

.acv-status__result strong {
  color: var(--acv-navy);
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.acv-status__result p {
  color: var(--acv-slate);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.acv-status__result.is-success {
  background: rgba(23, 99, 60, .08);
  border-color: rgba(23, 99, 60, .25);
}

.acv-status__result.is-warning {
  background: #FFF8E8;
  border-color: #E4C982;
}

.acv-status__result.is-info {
  background: #F1F6FB;
  border-color: #BED0E1;
}

.acv-status__result.is-error {
  background: #FFF4F4;
  border-color: #E7B8BB;
}

.acv-status__privacy {
  color: var(--acv-muted);
  font-size: 11px;
  line-height: 1.45;
  margin: 14px 0 0;
}

.acv-honeypot {
  left: -9999px !important;
  opacity: 0 !important;
  position: absolute !important;
}

[hidden] {
  display: none !important;
}

@media (max-width: 680px) {
  .acv-invoice {
    padding-inline: 12px;
  }

  .acv-grid,
  .acv-choice-grid {
    grid-template-columns: 1fr;
  }

  .acv-form,
  .acv-success,
  .acv-status {
    border-radius: 17px;
    padding: 23px 18px;
  }

  .acv-status__form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .acv-steps b {
    font-size: 11px;
  }

  .acv-actions {
    flex-direction: column-reverse;
  }

  .acv-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .acv-invoice *,
  .acv-invoice *::before,
  .acv-invoice *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
