/* ========== FORMULARIO DE PAGO STRIPE ========== */
.card-element {
  margin: 20px 0;
  background: #fff;
}

.payment-form {
  background: #f8f9fa;
  border: 1px solid #e3e6f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin: 20px 0;
}

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #344563;
  margin-bottom: 8px;
}

.form-row-group {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 16px;
}

/* ========== ELEMENTOS STRIPE ========== */
.stripe-element {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 20px;
}

.stripe-element:hover {
  border-color: #9ca3af;
}

.stripe-element:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.stripe-input {
  width: 100%;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  font-family: var(--font-family);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.stripe-input::placeholder {
  color: #9ca3af;
  font-family: var(--font-family);
}

.stripe-input:hover {
  border-color: #9ca3af;
}

.stripe-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ========== INFORMACIÓN DE PAGO ========== */
.payment-info {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.security-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #10B981;
  font-size: 14px;
  font-weight: 600;
}

.security-info svg {
  flex-shrink: 0;
}

.payment-methods {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
  margin-top: 8px;
}

/* ========== OCULTAR ELEMENTOS NO DESEADOS DE STRIPE ========== */
.stripe-element .LinkButton,
.stripe-element [data-testid="link-button"],
button[aria-label*="Link"] {
  display: none !important;
}

/* ========== ERRORES DE TARJETA ========== */
.card-errors {
  color: #dc2626;
  margin: 12px 0;
  font-size: 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--border-radius);
  padding: 8px 12px;
  display: none;
}

.card-errors:not(:empty) {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== CARGO A COBRAR ========== */
.cargo {
  margin: 20px 0;
  font-weight: 600;
  font-size: 1.2em;
  text-align: center;
  color: #1f2937;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #d1d5db;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.cargo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

/* ========== ICONOS Y ELEMENTOS VISUALES ========== */
.payment-form h3 {
  margin: 0 0 20px 0;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-form h3::before {
  content: '🔒';
  font-size: 1.2em;
}

/* ========== ESTADOS DE CARGA ========== */
.btn-green:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  position: relative;
}

.btn-green:disabled::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}