/* Consulta Pagos Unificada - Estilos */

.cpu-consulta-container {
  max-width: 800px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-top: 40px;
  margin-bottom: 40px;
}

/* Header */
.cpu-header {
  background: #ffb300;
  color: #000;
  padding: 30px;
  text-align: center;
}

.cpu-header-icon {
  margin-bottom: 15px;
}

.cpu-title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 600;
}

.cpu-subtitle {
  margin: 0;
  opacity: 0.9;
  font-size: 16px;
}

/* Form */
.cpu-form {
  padding: 30px;
}

.cpu-section-title {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

/* Selector de plataforma */
.cpu-plataforma-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.cpu-plataforma-option {
  cursor: pointer;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  display: block;
  background: #f8f9fa;
}

.cpu-plataforma-option:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.cpu-plataforma-option input[type="radio"] {
  display: none;
}

.cpu-plataforma-option input[type="radio"]:checked + .cpu-option-content {
  color: #667eea;
}

.cpu-plataforma-option
  input[type="radio"]:checked
  + .cpu-option-content
  .cpu-plataforma-logo,
.cpu-plataforma-option
  input[type="radio"]:checked
  + .cpu-option-content
  .cpu-placetopay-logo,
.cpu-plataforma-option
  input[type="radio"]:checked
  + .cpu-option-content
  .cpu-ambos-icon {
  transform: scale(1.1);
}

.cpu-plataforma-option input[type="radio"]:checked {
  border-color: #667eea;
  background: #f0f4ff;
}

.cpu-option-content {
  text-align: center;
  transition: all 0.3s ease;
}

.cpu-plataforma-logo {
  height: 30px;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.cpu-placetopay-logo {
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.cpu-ambos-icon {
  margin-bottom: 10px;
  color: #667eea;
  transition: transform 0.3s ease;
}

.cpu-option-text {
  /* display: block; */
  display: none;
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 16px;
}

.cpu-option-hint {
  display: block;
  color: #6c757d;
  font-size: 12px;
}

/* Sección de búsqueda */
.cpu-busqueda-section {
  border-top: 1px solid #e1e5e9;
  padding-top: 30px;
}

.cpu-form-group {
  margin-bottom: 25px;
}

.cpu-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.cpu-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.cpu-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Estilo especial para input de teléfono */
.cpu-input[type="tel"] {
  font-family: 'Consolas', 'Monaco', monospace;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.cpu-input[type="tel"]:focus {
  border-color: #9c27b0;
  box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.1);
}

.cpu-input-help {
  margin-top: 5px;
  font-size: 12px;
  color: #6c757d;
}

/* Botón de envío */
.cpu-submit-btn {
  width: 100%;
  background: #ffb300;
  color: #000;
  border: none;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cpu-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.cpu-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.cpu-submit-btn.loading .cpu-btn-text {
  display: none;
}

.cpu-submit-btn.loading .cpu-btn-icon {
  display: none;
}

.cpu-loader {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cpu-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: cpu-spin 1s linear infinite;
}

@keyframes cpu-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Resultados */
.cpu-resultados {
  margin-top: 30px;
  border-top: 1px solid #e1e5e9;
  padding-top: 30px;
}

.cpu-resultados-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 20px;
}

.cpu-resultados-header h3 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.cpu-resultados-stats {
  color: #6c757d;
  font-size: 14px;
}

.cpu-plataforma-resultados {
  margin-bottom: 30px;
  padding: 20px;
}

.cpu-plataforma-titulo {
  margin: 0 0 15px;
  font-size: 18px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cpu-tabla-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e1e5e9;
}

.cpu-tabla {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 14px;
}

.cpu-tabla th {
  background: #f8f9fa;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e1e5e9;
}

.cpu-tabla td {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.cpu-tabla tr:last-child td {
  border-bottom: none;
}

.cpu-tabla tr:hover {
  background: #f8f9fa;
}

/* Estilos de estado - más específicos */
.cpu-tabla .cpu-estado {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  color: white !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: none;
  white-space: nowrap;
  background-color: #666 !important; /* Color por defecto */
}

.cpu-tabla .cpu-estado.exitoso {
  background-color: #4caf50 !important;
}

.cpu-tabla .cpu-estado.pendiente {
  background-color: #ffb300 !important;
}

.cpu-tabla .cpu-estado.fallido {
  background-color: #e53935 !important;
}

.cpu-tabla .cpu-estado.revertido,
.cpu-tabla .cpu-estado.cancelado {
  background-color: #9e9e9e !important;
}

.cpu-tabla .cpu-estado.rechazado {
  background-color: #e53935 !important;
}

.cpu-tabla .cpu-estado.desconocido {
  background-color: #666 !important;
}

.cpu-tabla code {
  background: #f1f3f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  color: #333;
}

/* No resultados - estilo mejorado */
.cpu-no-resultados {
  text-align: center;
  padding: 50px 20px;
  color: #6b7280;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-radius: 16px;
  border: 2px dashed #d1d5db;
  margin: 20px 0;
}

.cpu-no-resultados-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.8;
}

.cpu-no-resultados h3 {
  margin: 0 0 12px;
  color: #374151;
  font-size: 20px;
  font-weight: 600;
}

.cpu-no-resultados p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #6b7280;
}
  font-size: 16px;
}

/* Mensaje de error principal mejorado */
.cpu-error {
  background: linear-gradient(135deg, #fef7f7 0%, #fecaca 50%, #fee2e2 100%);
  color: #7f1d1d;
  padding: 20px 24px;
  border-radius: 16px;
  margin: 24px 0;
  border: 2px solid #f87171;
  border-left: 6px solid #dc2626;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.15), 0 2px 4px rgba(220, 38, 38, 0.1);
  display: flex;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.6;
  animation: slideInDown 0.4s ease-out;
  position: relative;
  overflow: hidden;
}

.cpu-error::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #dc2626, #f87171, #dc2626);
  animation: shimmer 2s ease-in-out infinite;
}

.cpu-error::before {
  content: "🚨";
  margin-right: 16px;
  font-size: 22px;
  flex-shrink: 0;
  animation: pulse 1.5s ease-in-out infinite;
}

.cpu-error strong {
  font-weight: 700;
  color: #991b1b;
  font-size: 16px;
}

.cpu-error div {
  flex: 1;
}
  color: #7f1d1d;
}

.cpu-plataforma-error {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
  position: relative;
  animation: fadeIn 0.4s ease-out;
}

.cpu-plataforma-error::before {
  content: "⚠️";
  position: absolute;
  left: 20px;
  top: 18px;
  font-size: 16px;
}

.cpu-plataforma-error > div {
  margin-left: 32px;
}

.cpu-plataforma-error h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #78350f;
}

.cpu-plataforma-error p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

/* Mensaje de éxito (para usar en el futuro) */
.cpu-success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: #166534;
  padding: 16px 20px;
  border-radius: 12px;
  margin-top: 20px;
  border: 1px solid #86efac;
  border-left: 4px solid #16a34a;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.1);
  display: flex;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  animation: slideInUp 0.3s ease-out;
}

.cpu-success::before {
  content: "✅";
  margin-right: 12px;
  font-size: 18px;
  flex-shrink: 0;
}

/* Mensaje de información */
.cpu-info {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  padding: 16px 20px;
  border-radius: 12px;
  margin-top: 20px;
  border: 1px solid #93c5fd;
  border-left: 4px solid #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
  display: flex;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  animation: fadeIn 0.3s ease-out;
}

.cpu-info::before {
  content: "ℹ️";
  margin-right: 12px;
  font-size: 18px;
  flex-shrink: 0;
}

/* Animaciones */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .cpu-consulta-container {
    margin: 10px;
    border-radius: 8px;
  }

  .cpu-header,
  .cpu-form {
    padding: 20px;
  }

  .cpu-plataforma-options {
    grid-template-columns: 1fr;
  }

  .cpu-resultados-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .cpu-tabla-container {
    font-size: 12px;
  }

  .cpu-tabla th,
  .cpu-tabla td {
    padding: 8px;
  }

  /* Error responsive */
  .cpu-error {
    padding: 16px 18px;
    margin: 16px 0;
    font-size: 14px;
    border-radius: 12px;
    border-left-width: 4px;
  }

  .cpu-error::before {
    font-size: 18px;
    margin-right: 12px;
  }

  .cpu-error strong {
    font-size: 15px;
  }
}

/* Mejoras para la accesibilidad */
.cpu-plataforma-option:focus-within {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.cpu-input:invalid {
  border-color: #dc3545;
}

.cpu-input:invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}
