/* ============================================================
   AUTODATA eCOMMERCE JOURNEY — PLUGIN STYLES
   Version: 1.0.0
   Prefix: adec-  (to avoid conflicts with WordPress / Elementor)
   ============================================================ */

/* ─── DESIGN TOKENS ────────────────────────────────────────── */
:root {
  --adec-navy:          #1E1B4B;
  --adec-navy-700:      #2D2A6E;
  --adec-navy-900:      #13103A;
  --adec-orange:        #F5A623;
  --adec-orange-h:      #E09516;
  --adec-blue:          #2563EB;
  --adec-blue-light:    #EFF6FF;
  --adec-blue-border:   #BFDBFE;
  --adec-green:         #22C55E;
  --adec-red:           #EF4444;
  --adec-red-bg:        #FEF2F2;
  --adec-red-border:    #FCA5A5;
  --adec-white:         #FFFFFF;
  --adec-gray-50:       #F9FAFB;
  --adec-gray-100:      #F3F4F6;
  --adec-gray-200:      #E5E7EB;
  --adec-gray-300:      #D1D5DB;
  --adec-gray-400:      #9CA3AF;
  --adec-gray-500:      #6B7280;
  --adec-gray-600:      #4B5563;
  --adec-gray-700:      #374151;
  --adec-gray-900:      #111827;
  --adec-text:          #1F2937;
  --adec-radius:        8px;
  --adec-radius-lg:     12px;
  --adec-radius-full:   9999px;
  --adec-shadow-sm:     0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --adec-shadow-md:     0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --adec-shadow-lg:     0 10px 25px rgba(30,27,75,.2), 0 4px 10px rgba(30,27,75,.12);
  --adec-ease:          0.2s ease;
  --adec-font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --adec-max:           1200px;
  --adec-bar-h:         80px;
}

/* ─── RESET & BASE ─────────────────────────────────────────── */
.adec-app *,
.adec-app *::before,
.adec-app *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.adec-app {
  font-family: var(--adec-font);
  color: var(--adec-text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.adec-app a {
  color: inherit;
  text-decoration: none;
}

.adec-app button {
  font-family: var(--adec-font);
  cursor: pointer;
}

/* ─── SCREEN VISIBILITY ────────────────────────────────────── */
.adec-screen {
  display: none;
}
.adec-screen.is-active {
  display: block;
}

/* ─── CONTAINER ────────────────────────────────────────────── */
.adec-container {
  max-width: var(--adec-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── STEPPER ──────────────────────────────────────────────── */
.adec-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--adec-gray-200);
  background: var(--adec-white);
  gap: 0;
}

.adec-stepper__step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.adec-stepper__circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid var(--adec-gray-300);
  color: var(--adec-gray-400);
  background: var(--adec-white);
  flex-shrink: 0;
  transition: background var(--adec-ease), border-color var(--adec-ease), color var(--adec-ease);
}

.adec-stepper__step--active .adec-stepper__circle {
  background: var(--adec-navy);
  border-color: var(--adec-navy);
  color: var(--adec-white);
}

.adec-stepper__step--done .adec-stepper__circle {
  background: var(--adec-green);
  border-color: var(--adec-green);
  color: var(--adec-white);
}

.adec-stepper__label {
  font-size: 14px;
  color: var(--adec-gray-400);
  font-weight: 500;
}

.adec-stepper__step--active .adec-stepper__label {
  color: var(--adec-navy);
  font-weight: 600;
}

.adec-stepper__step--done .adec-stepper__label {
  color: var(--adec-gray-600);
}

.adec-stepper__line {
  flex: 1;
  max-width: 120px;
  height: 2px;
  background: var(--adec-gray-200);
  margin: 0 12px;
  transition: background var(--adec-ease);
}

.adec-stepper__line--done {
  background: var(--adec-green);
}

/* ═══════════════════════════════════════════════════════════
   SCREEN 1 — PLAN
   ═══════════════════════════════════════════════════════════ */

/* ─── Hero ─────────────────────────────────────────────────── */
.adec-plan-hero {
  text-align: center;
  padding: 48px 24px 36px;
}

.adec-plan-hero__title {
  font-size: 34px;
  font-weight: 800;
  color: var(--adec-navy);
  line-height: 1.2;
  margin-bottom: 14px;
}

.adec-plan-hero__sub {
  font-size: 16px;
  color: var(--adec-gray-500);
  max-width: 560px;
  margin: 0 auto;
}

/* ─── Product Tabs ─────────────────────────────────────────── */
.adec-tabs-wrap {
  display: flex;
  justify-content: center;
  padding: 0 24px 36px;
}

.adec-tabs {
  display: flex;
  gap: 16px;
}

.adec-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  min-width: 240px;
  border: 2px solid var(--adec-gray-200);
  border-radius: var(--adec-radius-lg);
  background: var(--adec-white);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--adec-ease), background var(--adec-ease), box-shadow var(--adec-ease);
}

.adec-tab:hover {
  border-color: var(--adec-blue-border);
  box-shadow: var(--adec-shadow-sm);
}

.adec-tab.is-active {
  border-color: var(--adec-blue);
  background: var(--adec-blue-light);
}

.adec-tab__badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--adec-orange);
  color: var(--adec-white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: var(--adec-radius-full);
  white-space: nowrap;
}

.adec-tab__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adec-blue);
}

.adec-tab__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--adec-navy);
}

.adec-tab__sub {
  display: block;
  font-size: 12px;
  color: var(--adec-gray-500);
  margin-top: 2px;
}

/* ─── Pricing Cards Grid ────────────────────────────────────── */
.adec-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-bottom: 36px;
}

.adec-plan-card {
  position: relative;
  background: var(--adec-white);
  border: 2px solid var(--adec-gray-200);
  border-radius: var(--adec-radius-lg);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--adec-ease), border-color var(--adec-ease), background var(--adec-ease);
  cursor: pointer;
}

.adec-plan-card:hover {
  box-shadow: var(--adec-shadow-md);
}

/* Selected card (dark navy) — toggled by JS, only one at a time */
.adec-plan-card--featured {
  background: var(--adec-navy-900);
  border-color: var(--adec-navy-900);
  color: var(--adec-white);
  box-shadow: var(--adec-shadow-lg);
}

.adec-plan-card__badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--adec-orange);
  color: var(--adec-white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: var(--adec-radius-full);
  white-space: nowrap;
}

.adec-plan-card__name {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--adec-navy);
  margin-bottom: 6px;
}
.adec-plan-card--featured .adec-plan-card__name { color: var(--adec-white); }

.adec-plan-card__desc {
  font-size: 13px;
  color: var(--adec-gray-500);
  margin-bottom: 18px;
}
.adec-plan-card--featured .adec-plan-card__desc { color: rgba(255,255,255,.6); }

/* Price block */
.adec-plan-card__price-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 5px;
}

.adec-plan-card__price-old {
  font-size: 16px;
  color: var(--adec-gray-400);
  text-decoration: line-through;
}
.adec-plan-card--featured .adec-plan-card__price-old { color: rgba(255,255,255,.4); }

.adec-plan-card__price-current {
  font-size: 44px;
  font-weight: 800;
  color: var(--adec-navy);
  line-height: 1;
  letter-spacing: -.02em;
}
.adec-plan-card--featured .adec-plan-card__price-current { color: var(--adec-white); }

.adec-plan-card__price-unit {
  font-size: 15px;
  font-weight: 500;
  color: var(--adec-gray-500);
}
.adec-plan-card--featured .adec-plan-card__price-unit { color: rgba(255,255,255,.6); }

.adec-plan-card__billing {
  font-size: 13px;
  color: var(--adec-gray-500);
  margin-bottom: 3px;
}
.adec-plan-card--featured .adec-plan-card__billing { color: rgba(255,255,255,.6); }

.adec-plan-card__vat {
  font-size: 12px;
  color: var(--adec-gray-400);
  margin-bottom: 22px;
}
.adec-plan-card--featured .adec-plan-card__vat { color: rgba(255,255,255,.4); }

/* Feature list */
.adec-plan-card__features {
  list-style: none;
  flex: 1;
  margin-bottom: 24px;
}

.adec-plan-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  color: var(--adec-gray-700);
  padding: 5px 0;
}
.adec-plan-card--featured .adec-plan-card__features li { color: rgba(255,255,255,.85); }

.adec-plan-card__features li .adec-icon-check {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--adec-green);
}

/* CTA buttons inside cards */
.adec-plan-card__cta {
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--adec-radius);
  font-size: 15px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--adec-ease), border-color var(--adec-ease), color var(--adec-ease);
  font-family: var(--adec-font);
  letter-spacing: .01em;
}

/* Default cards: outlined */
.adec-plan-card:not(.adec-plan-card--featured) .adec-plan-card__cta {
  background: var(--adec-white);
  color: var(--adec-navy);
  border-color: var(--adec-gray-300);
}
.adec-plan-card:not(.adec-plan-card--featured) .adec-plan-card__cta:hover {
  border-color: var(--adec-navy);
  background: var(--adec-gray-50);
}

/* Featured card: filled orange */
.adec-plan-card--featured .adec-plan-card__cta {
  background: var(--adec-orange);
  color: var(--adec-white);
  border-color: var(--adec-orange);
}
.adec-plan-card--featured .adec-plan-card__cta:hover {
  background: var(--adec-orange-h);
  border-color: var(--adec-orange-h);
}

.adec-plan-card__trial {
  font-size: 12px;
  color: var(--adec-gray-400);
  text-align: center;
  margin-top: 12px;
}
.adec-plan-card--featured .adec-plan-card__trial { color: rgba(255,255,255,.4); }
.adec-plan-card__trial a {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.adec-plan-card__trial a:hover { opacity: .8; }
.adec-plan-card--featured .adec-plan-card__trial a { color: rgba(255,255,255,.75); }

/* ─── Users Toggle ──────────────────────────────────────────── */
.adec-users {
  text-align: center;
  padding-bottom: 36px;
}

.adec-users__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--adec-gray-500);
  margin-bottom: 14px;
}

.adec-users__group {
  display: inline-flex;
  border: 2px solid var(--adec-gray-200);
  border-radius: var(--adec-radius-full);
  overflow: hidden;
  background: var(--adec-white);
}

.adec-users__btn {
  padding: 10px 26px;
  font-size: 13px;
  font-weight: 600;
  color: var(--adec-gray-600);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background var(--adec-ease), color var(--adec-ease);
  letter-spacing: .02em;
  font-family: var(--adec-font);
}

.adec-users__btn.is-active {
  background: var(--adec-navy);
  color: var(--adec-white);
  border-radius: var(--adec-radius-full);
}

/* ─── Optional Add-ons ──────────────────────────────────────── */
.adec-addons-wrap {
  display: flex;
  justify-content: center;
  padding-bottom: 36px;
}

.adec-addons {
  width: 100%;
  max-width: 480px;
}

.adec-addons__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--adec-gray-500);
  margin-bottom: 12px;
}

.adec-addon {
  position: relative;
  border: 2px solid var(--adec-gray-200);
  border-radius: var(--adec-radius);
  background: var(--adec-white);
  transition: border-color var(--adec-ease);
}
.adec-addon:has(input:checked) { border-color: var(--adec-blue); }
.adec-addon:has(input:disabled) { opacity: .5; }
.adec-addon:has(input:disabled) .adec-addon__label { cursor: not-allowed; }

/* Oculta visualmente la casilla nativa pero la mantiene accesible con teclado y lectores de pantalla. */
.adec-addon__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.adec-addon__input:focus-visible ~ .adec-addon__label .adec-addon__box {
  outline: 2px solid var(--adec-blue);
  outline-offset: 2px;
}

.adec-addon__label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
}

.adec-addon__box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--adec-gray-300);
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--adec-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--adec-ease), border-color var(--adec-ease);
}
.adec-addon__input:checked ~ .adec-addon__label .adec-addon__box {
  background: var(--adec-blue);
  border-color: var(--adec-blue);
}
.adec-addon__box-check {
  opacity: 0;
  transition: opacity var(--adec-ease);
  color: white;
}
.adec-addon__input:checked ~ .adec-addon__label .adec-addon__box-check {
  opacity: 1;
}

.adec-addon__info { flex: 1; }

.adec-addon__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--adec-navy);
}

.adec-addon__desc {
  display: block;
  font-size: 12px;
  color: var(--adec-gray-500);
  margin-top: 2px;
}

.adec-addon__price {
  font-size: 14px;
  font-weight: 600;
  color: var(--adec-gray-700);
  flex-shrink: 0;
}

/* ─── Plan Comparison Accordion ─────────────────────────────── */
.adec-comparison-wrap {
  display: flex;
  justify-content: center;
  padding-bottom: 36px;
}

.adec-comparison {
  width: 100%;
  max-width: 520px;
}

.adec-comparison__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border: 2px solid var(--adec-gray-200);
  border-radius: var(--adec-radius);
  background: var(--adec-white);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--adec-blue);
  font-family: var(--adec-font);
  transition: border-color var(--adec-ease);
}
.adec-comparison__toggle:hover { border-color: var(--adec-blue-border); }

.adec-comparison__chevron {
  color: var(--adec-blue);
  transition: transform .3s ease;
  flex-shrink: 0;
}
.adec-comparison__toggle[aria-expanded="false"] .adec-comparison__chevron {
  transform: rotate(-180deg);
}

.adec-comparison__body {
  overflow: hidden;
  max-height: 0;
  visibility: hidden;
  /* La visibilidad cambia al terminar el cierre para que la animación se vea completa. */
  transition: max-height .35s ease, visibility 0s linear .35s;
}
.adec-comparison__body.is-open {
  max-height: 700px;
  visibility: visible;
  transition: max-height .35s ease, visibility 0s;
}

.adec-comparison__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  border: 2px solid var(--adec-gray-200);
  border-radius: var(--adec-radius);
  overflow: hidden;
  font-size: 14px;
}

.adec-comparison__table thead tr {
  background: var(--adec-navy);
}
.adec-comparison__table thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--adec-white);
}
.adec-comparison__table thead th:not(:first-child) { text-align: center; }

.adec-comparison__table tbody tr { border-bottom: 1px solid var(--adec-gray-200); }
.adec-comparison__table tbody tr:last-child { border-bottom: none; }
.adec-comparison__table tbody tr:nth-child(even) { background: var(--adec-gray-50); }

.adec-comparison__table tbody td {
  padding: 12px 16px;
  color: var(--adec-gray-700);
}
.adec-comparison__table tbody td:not(:first-child) { text-align: center; }

.adec-check-green { color: var(--adec-green); display: block; }
.adec-comparison__table .adec-check-green { margin: 0 auto; }
.adec-dash        { color: var(--adec-gray-400); }

/* ─── "Everything" section ──────────────────────────────────── */
.adec-everything {
  text-align: center;
  padding: 36px 24px 40px;
  background: var(--adec-gray-50);
  border-top: 1px solid var(--adec-gray-200);
}

.adec-everything__title {
  font-size: 26px;
  font-weight: 700;
  color: var(--adec-navy);
  margin-bottom: 8px;
}

.adec-everything__sub {
  font-size: 15px;
  color: var(--adec-gray-500);
  margin-bottom: 20px;
}

/* Avisos legales bajo "Todo lo que necesitas" */
.adec-notes {
  padding: 24px 24px 32px;
  background: var(--adec-gray-50);
  font-size: 12px;
  line-height: 1.6;
  color: var(--adec-gray-500);
}
.adec-notes__heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
/* El texto legal es más alto que la tabla comparativa, sobre todo en móvil: necesita más altura al abrirse. */
.adec-notes__body.is-open { max-height: 2400px; }
.adec-notes__content { padding-top: 14px; }
.adec-notes p + p { margin-top: 10px; }
.adec-notes a {
  color: var(--adec-blue);
  text-decoration: underline;
}

.adec-everything__list {
  list-style: none;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}

.adec-everything__list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  color: var(--adec-gray-700);
}

.adec-everything__list li .adec-icon-check {
  flex-shrink: 0;
  /* Centra el icono con la primera línea (14px × 1,5 de interlineado = 21px; icono de 16px). */
  margin-top: 2.5px;
  color: var(--adec-green);
}

/* ─── Sticky Summary Bar ────────────────────────────────────── */
.adec-summary-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--adec-navy);
}

.adec-summary-bar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.adec-summary-bar__info { flex: 1; min-width: 0; }

.adec-summary-bar__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 3px;
}

.adec-summary-bar__details {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adec-summary-bar__price-col { text-align: right; flex-shrink: 0; }

.adec-summary-bar__price {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--adec-white);
  letter-spacing: -.01em;
}

.adec-summary-bar__vat {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}

.adec-summary-bar__cta {
  flex-shrink: 0;
  padding: 14px 28px;
  background: var(--adec-orange);
  color: var(--adec-white);
  border: none;
  border-radius: var(--adec-radius);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background var(--adec-ease);
  font-family: var(--adec-font);
}
.adec-summary-bar__cta:hover { background: var(--adec-orange-h); }

/* Plan screen bottom padding (so content isn't hidden behind sticky bar) */
#adec-screen-plan { padding-bottom: calc(var(--adec-bar-h) + 20px); }

/* ═══════════════════════════════════════════════════════════
   SCREEN 2 — CHECKOUT
   ═══════════════════════════════════════════════════════════ */

.adec-checkout__layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  min-height: calc(100vh - 64px);
}

/* ─── Order Summary (left column) ──────────────────────────── */
.adec-order-summary {
  background: var(--adec-gray-100);
  padding: 40px 32px;
  border-right: 1px solid var(--adec-gray-200);
}

.adec-order-summary__heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--adec-gray-500);
  margin-bottom: 20px;
}

.adec-order-summary__product {
  font-size: 17px;
  font-weight: 700;
  color: var(--adec-navy);
  margin-bottom: 4px;
}

.adec-order-summary__sub {
  font-size: 13px;
  color: var(--adec-gray-500);
  margin-bottom: 24px;
}

.adec-order-summary__lines {
  border-top: 1px solid var(--adec-gray-300);
  padding-top: 12px;
}

.adec-order-summary__line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 14px;
  color: var(--adec-gray-600);
  border-bottom: 1px solid var(--adec-gray-200);
}
.adec-order-summary__line:last-child { border-bottom: none; }

.adec-order-summary__line--total {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 2px solid var(--adec-gray-300);
  border-bottom: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--adec-navy);
}

.adec-order-summary__change {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--adec-blue);
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  font-family: var(--adec-font);
}

/* ─── Form (right column) ──────────────────────────────────── */
.adec-checkout-form-col {
  padding: 40px 52px;
  background: var(--adec-white);
}

.adec-checkout-form-col h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--adec-navy);
  margin-bottom: 24px;
}

/* Error banner */
.adec-error-banner {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: var(--adec-red-bg);
  border: 1px solid var(--adec-red-border);
  border-radius: var(--adec-radius);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--adec-red);
}
.adec-error-banner.is-visible { display: flex; }
.adec-error-banner__icon { flex-shrink: 0; margin-top: 1px; }

/* Form grid */
.adec-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.adec-field { display: flex; flex-direction: column; gap: 6px; }
.adec-field--full { grid-column: 1 / -1; }

.adec-field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--adec-gray-700);
}

.adec-field__label--req::after {
  content: ' *';
  color: var(--adec-red);
}

.adec-field__input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--adec-gray-300);
  border-radius: var(--adec-radius);
  font-size: 14px;
  font-family: var(--adec-font);
  color: var(--adec-text);
  background: var(--adec-white);
  transition: border-color var(--adec-ease), box-shadow var(--adec-ease);
  outline: none;
  appearance: none;
}

.adec-field__input::placeholder { color: var(--adec-gray-400); }

.adec-field__input:focus {
  border-color: var(--adec-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.adec-field__input.is-error {
  border-color: var(--adec-red);
  background: var(--adec-red-bg);
}
.adec-field__input.is-error:focus {
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

.adec-field__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.adec-field__error {
  font-size: 12px;
  color: var(--adec-red);
  display: none;
}
.adec-field__error.is-visible { display: block; }

/* Estados de la validación remota (usuario / correo) */
.adec-field__error.is-pending { color: var(--adec-gray-500); }
.adec-field__error.is-success { color: #15803D; } /* verde oscuro para contraste AA sobre blanco */
.adec-field__input.is-valid { border-color: var(--adec-green); }
.adec-field__suggestions {
  display: block;
  margin-top: 2px;
  color: var(--adec-gray-600);
}
.adec-field__retry {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--adec-blue);
  text-decoration: underline;
  cursor: pointer;
}

/* ─── Payment Section ───────────────────────────────────────── */
.adec-payment {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--adec-gray-200);
}

.adec-payment__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--adec-navy);
  margin-bottom: 4px;
}

.adec-payment__sub {
  font-size: 13px;
  color: var(--adec-gray-400);
  margin-bottom: 14px;
}

.adec-payment__cards {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
}

.adec-card-icon {
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--adec-gray-200);
  display: inline-flex;
  align-items: center;
}

/* Stripe placeholder fields */
.adec-stripe-field {
  padding: 12px 14px;
  border: 1.5px solid var(--adec-gray-300);
  border-radius: var(--adec-radius);
  background: var(--adec-white);
  min-height: 46px;
  font-size: 14px;
  color: var(--adec-gray-400);
  display: flex;
  align-items: center;
  transition: border-color var(--adec-ease), box-shadow var(--adec-ease);
}
.adec-stripe-field.is-focused {
  border-color: var(--adec-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.adec-stripe-field.is-error { border-color: var(--adec-red); }
/* El contenedor es flex: el Element montado por Stripe debe ocupar todo el ancho para poder escribir en él. */
.adec-stripe-field > * {
  flex: 1 1 auto;
  min-width: 0;
}

.adec-stripe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

/* ─── T&C ───────────────────────────────────────────────────── */
.adec-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 22px;
  font-size: 13px;
  color: var(--adec-gray-600);
  line-height: 1.5;
}

.adec-terms input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--adec-blue);
}

.adec-terms a {
  color: var(--adec-blue);
  text-decoration: underline;
}

.adec-terms input[type="checkbox"].is-error {
  outline: 2px solid var(--adec-red);
  outline-offset: 2px;
}
.adec-terms__error { margin-top: 6px; }

/* ─── Submit button ─────────────────────────────────────────── */
.adec-btn-submit {
  margin-top: 22px;
  width: 100%;
  padding: 16px;
  background: var(--adec-orange);
  color: var(--adec-white);
  border: none;
  border-radius: var(--adec-radius);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--adec-font);
  transition: background var(--adec-ease);
}
.adec-btn-submit:hover   { background: var(--adec-orange-h); }
.adec-btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════
   SCREEN 3 — CONFIRMATION + ERROR
   ═══════════════════════════════════════════════════════════ */

.adec-confirmation-body {
  text-align: center;
  padding: 64px 24px 80px;
  max-width: 540px;
  margin: 0 auto;
}

.adec-confirm-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--adec-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 0 0 10px rgba(34,197,94,.12);
}

.adec-confirm-icon--error { background: var(--adec-red); box-shadow: 0 0 0 10px rgba(239,68,68,.12); }

.adec-confirmation-body h1 {
  font-size: 34px;
  font-weight: 800;
  color: var(--adec-navy);
  margin-bottom: 10px;
}

.adec-confirmation-body p.adec-conf-sub {
  font-size: 16px;
  color: var(--adec-gray-500);
  margin-bottom: 36px;
  line-height: 1.6;
}

.adec-conf-summary {
  background: var(--adec-gray-50);
  border: 1.5px solid var(--adec-gray-200);
  border-radius: var(--adec-radius-lg);
  padding: 22px;
  text-align: left;
  margin-bottom: 32px;
}

.adec-conf-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 14px;
  color: var(--adec-gray-600);
  border-bottom: 1px solid var(--adec-gray-200);
}
.adec-conf-summary__row:last-child {
  border-bottom: none;
  padding-top: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--adec-navy);
}

.adec-conf-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--adec-navy);
  color: var(--adec-white);
  border: none;
  border-radius: var(--adec-radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--adec-font);
  transition: background var(--adec-ease);
}
.adec-conf-cta:hover { background: var(--adec-navy-700); color: var(--adec-white); }

/* ═══════════════════════════════════════════════════════════
   SHARED SVG ICON HELPER
   ═══════════════════════════════════════════════════════════ */
.adec-icon { display: inline-block; line-height: 0; vertical-align: middle; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .adec-checkout__layout { grid-template-columns: 340px 1fr; }
  .adec-checkout-form-col { padding: 36px 36px; }
}

@media (max-width: 880px) {
  .adec-plans-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .adec-tabs { flex-direction: column; align-items: center; }
  .adec-tab { width: 100%; max-width: 360px; }
  .adec-checkout__layout { grid-template-columns: 1fr; }
  .adec-order-summary { border-right: none; border-bottom: 1px solid var(--adec-gray-200); }
  .adec-checkout-form-col { padding: 32px 24px; }
  .adec-stepper__line { max-width: 60px; }
}

@media (max-width: 620px) {
  .adec-plan-hero__title { font-size: 26px; }
  .adec-form-grid { grid-template-columns: 1fr; }
  .adec-field--full { grid-column: auto; }
  .adec-summary-bar__inner { flex-wrap: wrap; padding: 14px 20px; }
  .adec-summary-bar__cta { width: 100%; text-align: center; order: 3; }
  .adec-stepper__label { display: none; }
  .adec-stepper__line { max-width: 32px; }

  /* Tabla comparativa: compacta en móvil para que no se recorte la última columna (marcas de verificación);
     si aun así no cabe (≈320 px), se desplaza en horizontal en lugar de cortarse. */
  .adec-comparison__table thead th,
  .adec-comparison__table tbody td { padding: 10px 8px; font-size: 12px; }
  .adec-comparison-wrap .adec-comparison__body { overflow-x: auto; }
}
