/* Checkout público ACIS — layout, formulario y resumen */
.checkout-page {
  background: linear-gradient(180deg, #f0f4ff 0%, #f8fafc 45%, #fff 100%);
}

.checkout-page__head {
  max-width: 42rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.checkout-page__title {
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--acis-primary-dark, #0d3d8c);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.checkout-panel {
  border: 1px solid var(--acis-border, #e2e8f0);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  padding: 1.35rem 1.4rem;
}

.checkout-panel h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.checkout-help {
  margin: 0 0 1rem;
  color: var(--acis-muted, #64748b);
  font-size: 0.9rem;
  line-height: 1.5;
}

.checkout-form-card .checkout-field-group {
  margin-bottom: 0.95rem;
}

.checkout-form-card .checkout-field-group label {
  display: block;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
  font-size: 0.84rem;
}

.checkout-form-card .checkout-field-group input:not([type="checkbox"]):not([type="radio"]),
.checkout-form-card .checkout-field-group select {
  width: 100%;
  border: 1.5px solid var(--acis-border, #e2e8f0);
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-form-card .checkout-field-group select {
  cursor: pointer;
  min-height: 2.75rem;
}

.checkout-form-card .checkout-field-group input:focus,
.checkout-form-card .checkout-field-group select:focus {
  outline: none;
  border-color: var(--acis-primary, #1d57c5);
  box-shadow: 0 0 0 4px rgba(29, 87, 197, 0.12);
}

.checkout-form-row {
  display: grid;
  gap: 0.85rem 1rem;
  margin-bottom: 0.95rem;
}

.checkout-form-row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkout-form-row--doc {
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
  align-items: end;
  margin-bottom: 0.35rem;
}

.checkout-field-hint {
  margin: 0 0 0.95rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--acis-muted, #64748b);
}

.checkout-pay-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--acis-primary, #1d57c5) 0%, var(--acis-primary-dark, #0d3d8c) 100%);
  box-shadow: 0 8px 22px rgba(29, 87, 197, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.checkout-pay-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(29, 87, 197, 0.34);
  color: #fff;
}

.checkout-error {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 0;
}

.checkout-error:empty {
  display: none;
}

.checkout-sidebar {
  display: grid;
  gap: 1rem;
}

.checkout-summary .checkout-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px dashed var(--acis-border, #e2e8f0);
  padding: 0.5rem 0;
  color: #475569;
  font-size: 0.9rem;
}

.checkout-summary .checkout-line[hidden] {
  display: none !important;
}

.checkout-summary .checkout-line strong {
  color: #0f172a;
  white-space: nowrap;
}

.checkout-summary .checkout-line.checkout-total {
  border-bottom: 0;
  padding-top: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.checkout-course-title {
  margin: 0 0 0.75rem;
  color: var(--acis-primary-dark, #0d3d8c);
  font-weight: 700;
  line-height: 1.4;
}

.checkout-note {
  margin: 0.85rem 0 0;
  color: var(--acis-muted, #64748b);
  font-size: 0.8rem;
  line-height: 1.45;
}

.checkout-panel .public-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: #475569;
  font-size: 0.9rem;
}

.checkout-panel .public-list li {
  margin-bottom: 0.35rem;
}

/* Resumen de programas */
.checkout-order-programs__lead {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  color: var(--acis-muted, #64748b);
}

.checkout-order-programs__list {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.checkout-order-programs__item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.88rem;
}

.checkout-order-programs__name {
  color: #1e293b;
  line-height: 1.35;
}

.checkout-order-programs__price {
  color: var(--acis-primary, #1d57c5);
  white-space: nowrap;
}

/* Franja medios de pago */
.checkout-payment-trust {
  margin-top: 1.75rem;
  border-radius: 1rem;
  border: 1px solid var(--acis-border, #e2e8f0);
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.checkout-payment-trust__inner {
  padding: 1.15rem 1.25rem;
}

.checkout-payment-trust__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--acis-border, #e2e8f0);
}

.checkout-payment-trust__badge {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--acis-primary, #1d57c5);
  background: rgba(29, 87, 197, 0.1);
  border: 1px solid rgba(29, 87, 197, 0.15);
}

.checkout-payment-trust__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.checkout-payment-trust__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--acis-muted, #64748b);
}

.checkout-payment-trust__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.checkout-payment-trust__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem 0.4rem 0.4rem;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid var(--acis-border, #e2e8f0);
}

.checkout-payment-trust__item--muted {
  background: #f8fafc;
}

.checkout-payment-trust__chip {
  width: 2.5rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.35rem;
  background: #f1f5f9;
  color: #1e3a5f;
  font-size: 1.1rem;
}

.checkout-payment-trust__name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

@media (min-width: 992px) {
  .checkout-sidebar {
    position: sticky;
    top: 6.5rem;
  }
}

@media (max-width: 767px) {
  .checkout-form-row--2,
  .checkout-form-row--doc {
    grid-template-columns: 1fr;
  }
}
