/* ==================== SEARCH PROGRESS MODAL - ESTILOS ==================== */
/* Prefijo: spm- (Search Progress Modal) para evitar conflictos */

/* Overlay - Fondo oscuro */
.spm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.spm-overlay.spm-visible {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.spm-modal {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  width: 90%;
  max-width: 600px;
  padding: 0;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.spm-overlay.spm-visible .spm-modal {
  transform: scale(1) translateY(0);
}

/* Header */
.spm-header {
  padding: 32px 32px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.spm-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: spm-pulse 2s ease-in-out infinite;
}

@keyframes spm-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.spm-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.spm-subtitle {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* Body */
.spm-body {
  padding: 32px;
}

/* Status */
.spm-status {
  margin-bottom: 24px;
  text-align: center;
}

.spm-status-text {
  font-size: 1rem;
  font-weight: 600;
  color: #a78bfa;
  display: inline-block;
  position: relative;
}

.spm-status-text::after {
  content: '';
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #8b5cf6;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spm-spin 0.8s linear infinite;
}

@keyframes spm-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* Progress Bar Container */
.spm-progress-container {
  margin-bottom: 32px;
}

.spm-progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.3) inset;
}

.spm-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa, #8b5cf6);
  background-size: 200% 100%;
  border-radius: 10px;
  width: 0%;
  transition: width 0.5s ease;
  animation: spm-shimmer 2s linear infinite;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

@keyframes spm-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.spm-progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

#spm-progress-count {
  color: #ffffff;
}

#spm-progress-percent {
  color: #8b5cf6;
}

/* Stats Grid */
.spm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.spm-stat {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.spm-stat:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.spm-stat-icon {
  font-size: 2rem;
  line-height: 1;
}

.spm-stat-content {
  flex: 1;
}

.spm-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 4px;
}

.spm-stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Current Platform */
.spm-current-platform {
  background: rgba(139, 92, 246, 0.08);
  border-left: 4px solid #8b5cf6;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.spm-current-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #a78bfa;
}

.spm-current-name {
  font-size: 0.875rem;
  color: #ffffff;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Info Box */
.spm-info {
  background: rgba(79, 209, 197, 0.1);
  border: 1px solid rgba(79, 209, 197, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.spm-info-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.spm-info-text {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* Footer */
.spm-footer {
  padding: 20px 32px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  justify-content: center;
}

/* Buttons */
.spm-btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.spm-btn-cancel {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 2px solid rgba(239, 68, 68, 0.3);
}

.spm-btn-cancel:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.spm-btn-cancel:active {
  transform: translateY(0);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .spm-modal {
    width: 95%;
    max-width: none;
  }
  
  .spm-header {
    padding: 24px 20px 20px;
  }
  
  .spm-icon {
    font-size: 3rem;
  }
  
  .spm-title {
    font-size: 1.5rem;
  }
  
  .spm-body {
    padding: 24px 20px;
  }
  
  .spm-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .spm-stat {
    padding: 12px;
  }
  
  .spm-stat-value {
    font-size: 1.25rem;
  }
  
  .spm-footer {
    padding: 16px 20px;
  }
}

@media (max-width: 480px) {
  .spm-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
  }
  
  .spm-title {
    font-size: 1.25rem;
  }
  
  .spm-subtitle {
    font-size: 0.875rem;
  }
  
  .spm-body {
    padding: 20px 16px;
  }
  
  .spm-stat-icon {
    font-size: 1.5rem;
  }
  
  .spm-btn {
    padding: 10px 24px;
    font-size: 0.875rem;
  }
}

/* ==================== ANIMACIONES ADICIONALES ==================== */
@keyframes spm-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spm-visible .spm-header,
.spm-visible .spm-body,
.spm-visible .spm-footer {
  animation: spm-fade-in 0.5s ease forwards;
}

.spm-visible .spm-body {
  animation-delay: 0.1s;
}

.spm-visible .spm-footer {
  animation-delay: 0.2s;
}