/**
 * Hello Plataforma · Checkout SPEI Styles
 */


/* ============================================================
   CONTAINER
   ============================================================ */

.hp-checkout {
  background: var(--hp-bg-secondary);
  min-height: 100vh;
}

.hp-checkout-content {
  padding: 16px;
  max-width: 480px;
  margin: 0 auto;
}


/* ============================================================
   TOPNAV
   ============================================================ */

.hp-checkout-topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--hp-border-subtle);
}

.hp-checkout-topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  max-width: 480px;
  margin: 0 auto;
  min-height: 56px;
}

.hp-checkout-back {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--hp-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color var(--hp-duration-normal) var(--hp-ease);
  color: var(--hp-text-primary);
}

.hp-checkout-back:hover {
  background: var(--hp-border-subtle);
}

.hp-checkout-back i {
  font-size: 22px;
}

.hp-checkout-topnav-title {
  font-family: var(--hp-font-base);
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-text-primary);
  margin: 0;
}

.hp-checkout-topnav-spacer {
  width: 36px;
}


/* ============================================================
   STEPPER
   ============================================================ */

.hp-checkout-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 24px;
  max-width: 480px;
  margin: 0 auto;
  background: var(--hp-bg-primary);
  border-bottom: 0.5px solid var(--hp-border-subtle);
}

.hp-stepper-item {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}

.hp-stepper-item:last-child {
  flex: 0;
}

.hp-stepper-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--hp-bg-card);
  border: 1px solid var(--hp-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--hp-font-base);
  font-size: 11px;
  font-weight: 600;
  color: var(--hp-text-tertiary);
  transition: all var(--hp-duration-normal) var(--hp-ease);
}

.hp-stepper-item.is-active .hp-stepper-dot {
  background: var(--hp-gradient-purple-button);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(105, 73, 158, 0.30);
}

.hp-stepper-item.is-done .hp-stepper-dot {
  background: var(--hp-green-success);
  border-color: transparent;
  color: #FFFFFF;
}

.hp-stepper-item.is-done .hp-stepper-dot i {
  font-size: 14px;
  stroke-width: 3;
}

.hp-stepper-label {
  font-family: var(--hp-font-base);
  font-size: 11px;
  font-weight: 500;
  color: var(--hp-text-tertiary);
  white-space: nowrap;
}

.hp-stepper-item.is-active .hp-stepper-label {
  color: var(--hp-text-primary);
  font-weight: 600;
}

.hp-stepper-item.is-done .hp-stepper-label {
  color: var(--hp-green-success);
}

.hp-stepper-line {
  flex: 1;
  height: 1px;
  background: var(--hp-border-subtle);
  margin: 0 4px;
  min-width: 12px;
}

.hp-stepper-item.is-done .hp-stepper-line {
  background: var(--hp-green-success);
}


/* ============================================================
   PLAN CARD (resumen visible siempre)
   ============================================================ */

.hp-checkout-plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF8FD 100%);
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow:
    0 0 0 0.5px var(--hp-border-purple),
    0 4px 12px -2px rgba(105, 73, 158, 0.08);
}

.hp-checkout-plan-creator {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hp-checkout-plan-creator-name {
  font-family: var(--hp-font-base);
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-text-primary);
  margin: 0;
  line-height: 1.2;
}

.hp-checkout-plan-period {
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-text-tertiary);
  margin: 2px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 500;
}

.hp-checkout-plan-price {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.hp-checkout-plan-amount {
  font-family: var(--hp-font-base);
  font-size: 20px;
  font-weight: 700;
  color: var(--hp-text-primary);
  letter-spacing: -0.5px;
  line-height: 1;
}

.hp-checkout-plan-currency {
  font-family: var(--hp-font-base);
  font-size: 10px;
  color: var(--hp-text-tertiary);
  font-weight: 500;
  letter-spacing: 0.5px;
}


/* ============================================================
   STEP CONTAINER
   ============================================================ */

.hp-checkout-step {
  animation: hpFadeInUp 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hpFadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hp-checkout-step-title {
  font-family: var(--hp-font-base);
  font-size: 24px;
  font-weight: 700;
  color: var(--hp-text-primary);
  margin: 0;
  letter-spacing: -0.6px;
  line-height: 1.2;
}

.hp-checkout-step-sub {
  font-family: var(--hp-font-base);
  font-size: 14px;
  color: var(--hp-text-secondary);
  margin: 6px 0 24px;
  line-height: 1.5;
}


/* ============================================================
   FORM
   ============================================================ */

.hp-checkout-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hp-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp-form-group .hp-input {
  font-size: 16px; /* evita zoom iOS */
}

.hp-form-hint {
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-text-tertiary);
  margin: 4px 0 0;
}

.hp-form-error {
  font-family: var(--hp-font-base);
  font-size: 12px;
  color: var(--hp-red-error);
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hp-input.has-error {
  border-color: var(--hp-red-error);
}

.hp-input.has-error:focus {
  box-shadow: 0 0 0 3px rgba(192, 69, 69, 0.15);
}


/* Password input con toggle */
.hp-password-input {
  position: relative;
}

.hp-password-input input {
  padding-right: 44px;
}

.hp-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--hp-text-tertiary);
  transition: background-color var(--hp-duration-normal) var(--hp-ease);
}

.hp-password-toggle:hover {
  background: var(--hp-bg-card);
  color: var(--hp-text-primary);
}

.hp-password-toggle i {
  font-size: 18px;
}


/* ============================================================
   CHECKBOX (términos)
   ============================================================ */

.hp-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 4px 0;
}

.hp-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  cursor: pointer;
  accent-color: var(--hp-purple-deep);
  flex-shrink: 0;
}

.hp-checkbox-content {
  font-family: var(--hp-font-base);
  font-size: 12px;
  color: var(--hp-text-secondary);
  line-height: 1.5;
}

.hp-checkbox-content a {
  color: var(--hp-purple-deep);
  text-decoration: underline;
  font-weight: 500;
}


/* ============================================================
   LOGIN LINK
   ============================================================ */

.hp-checkout-login-link {
  font-family: var(--hp-font-base);
  font-size: 13px;
  color: var(--hp-text-secondary);
  text-align: center;
  margin: 8px 0 0;
}

.hp-checkout-login-link a {
  color: var(--hp-purple-deep);
  font-weight: 600;
  text-decoration: none;
}

.hp-checkout-login-link a:hover {
  text-decoration: underline;
}


/* ============================================================
   BANK CARD (Step 2)
   ============================================================ */

.hp-checkout-bank-card {
  background: var(--hp-bg-primary);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow:
    0 0 0 0.5px var(--hp-border-purple),
    0 4px 12px -2px rgba(105, 73, 158, 0.06);
}

.hp-checkout-bank-header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--hp-border-subtle);
}

.hp-checkout-bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--hp-border-subtle);
  gap: 12px;
}

.hp-checkout-bank-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hp-checkout-bank-row--copyable {
  cursor: pointer;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 8px;
  transition: background-color var(--hp-duration-normal) var(--hp-ease);
}

.hp-checkout-bank-row--copyable:hover {
  background: var(--hp-bg-secondary);
}

.hp-checkout-bank-row--highlight .hp-checkout-bank-value {
  font-size: 18px;
  font-weight: 700;
}

.hp-checkout-bank-label {
  font-family: var(--hp-font-base);
  font-size: 12px;
  color: var(--hp-text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.hp-checkout-bank-value-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hp-checkout-bank-value {
  font-family: var(--hp-font-base);
  font-size: 13px;
  color: var(--hp-text-primary);
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}

.hp-checkout-copy-btn {
  background: var(--hp-bg-card);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--hp-purple-deep);
  transition: all var(--hp-duration-normal) var(--hp-ease);
}

.hp-checkout-copy-btn:hover {
  background: rgba(149, 117, 205, 0.15);
}

.hp-checkout-copy-btn:active {
  transform: scale(0.92);
}

.hp-checkout-copy-btn.is-copied {
  background: rgba(29, 158, 117, 0.15);
  color: var(--hp-green-success);
}

.hp-checkout-copy-btn i {
  font-size: 16px;
}

.hp-checkout-copy-btn--lg {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.hp-checkout-copy-btn--lg i {
  font-size: 20px;
}


/* ============================================================
   REFERENCIA DESTACADA (la pieza más importante)
   ============================================================ */

.hp-checkout-reference {
  background: linear-gradient(180deg, #FAF8FD 0%, #F4F2F7 100%);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1.5px dashed rgba(149, 117, 205, 0.50);
}

.hp-checkout-reference-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--hp-font-base);
  font-size: 11px;
  font-weight: 600;
  color: var(--hp-purple-deep);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}

.hp-checkout-reference-header i {
  font-size: 14px;
}

.hp-checkout-reference-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--hp-bg-primary);
  border-radius: 12px;
  cursor: pointer;
  transition: transform var(--hp-duration-normal) var(--hp-ease);
}

.hp-checkout-reference-body:hover {
  transform: translateY(-1px);
}

.hp-checkout-reference-code {
  font-family: var(--hp-font-mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--hp-gradient-purple-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

.hp-checkout-reference-hint {
  font-family: var(--hp-font-base);
  font-size: 12px;
  color: var(--hp-text-secondary);
  margin: 10px 0 0;
  line-height: 1.5;
}

.hp-checkout-reference-hint strong {
  color: var(--hp-text-primary);
  font-weight: 600;
}


/* ============================================================
   GUARANTÍA
   ============================================================ */

.hp-checkout-guarantee {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: rgba(29, 158, 117, 0.06);
  border: 0.5px solid rgba(29, 158, 117, 0.20);
  border-radius: 12px;
  margin-bottom: 20px;
}

.hp-checkout-guarantee i {
  font-size: 22px;
  color: var(--hp-green-success);
  flex-shrink: 0;
  margin-top: 2px;
}

.hp-checkout-guarantee p {
  font-family: var(--hp-font-base);
  font-size: 12px;
  color: var(--hp-text-secondary);
  margin: 0;
  line-height: 1.5;
}

.hp-checkout-guarantee strong {
  color: var(--hp-text-primary);
  font-weight: 600;
}


/* ============================================================
   SECONDARY ACTION
   ============================================================ */

.hp-checkout-secondary-action {
  text-align: center;
  margin: 16px 0 0;
}

.hp-checkout-secondary-action a {
  font-family: var(--hp-font-base);
  font-size: 13px;
  color: var(--hp-text-tertiary);
  text-decoration: none;
}

.hp-checkout-secondary-action a:hover {
  color: var(--hp-purple-deep);
}


/* ============================================================
   LOADING STATE EN BOTONES
   ============================================================ */

.hp-btn.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

.hp-btn.is-loading i.ti-loader {
  animation: hpSpin 800ms linear infinite;
}

@keyframes hpSpin {
  to { transform: rotate(360deg); }
}


/* ============================================================
   HIDE WP DEFAULT WRAPPERS EN PÁGINAS DE CHECKOUT
   ============================================================ */

.page-template-default .entry-title {
  display: none !important;
}

body.page .hp-checkout {
  margin: -24px -24px 0; /* compensar padding del theme padre */
}
