/* ================================================================
   MODAL DE AYUDA MODERNO - KUALLY
   ================================================================ */

/* ===== MODAL OVERLAY ===== */
.help-modal-overlay-modern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 999999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.help-modal-overlay-modern.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

/* ===== MODAL CONTENT ===== */
.help-modal-content-modern {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  transform: scale(0.7) translateY(50px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.help-modal-overlay-modern.show .help-modal-content-modern {
  transform: scale(1) translateY(0);
}

/* ===== MODAL HEADER ===== */
.help-modal-header-modern {
  background: linear-gradient(135deg, var(--ads-primary), var(--ads-primary-dark));
  color: white;
  padding: 24px 32px;
  position: relative;
  overflow: hidden;
}

.help-modal-header-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.help-modal-title-modern {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.help-modal-title-modern::before {
  content: '?';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
}

.help-modal-close-modern {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-modal-close-modern:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1) rotate(90deg);
}

/* ===== MODAL BODY ===== */
.help-modal-body-modern {
  padding: 32px;
  max-height: 60vh;
  overflow-y: auto;
}

.help-modal-body-modern::-webkit-scrollbar {
  width: 6px;
}

.help-modal-body-modern::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.help-modal-body-modern::-webkit-scrollbar-thumb {
  background: var(--ads-primary);
  border-radius: 3px;
}

.help-modal-body-modern::-webkit-scrollbar-thumb:hover {
  background: var(--ads-primary-dark);
}

.help-description-modern {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ads-gray-700);
  margin-bottom: 24px;
  text-align: justify;
}

.help-source-modern {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-left: 4px solid var(--ads-primary);
  border-radius: 8px;
  padding: 20px;
  font-size: 14px;
  color: var(--ads-gray-600);
  position: relative;
  overflow: hidden;
}

.help-source-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--ads-primary), var(--ads-primary-dark));
}

.help-source-modern strong {
  color: var(--ads-primary);
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .help-modal-content-modern {
    width: 95%;
    margin: 20px;
  }
  
  .help-modal-header-modern {
    padding: 20px 24px;
  }
  
  .help-modal-body-modern {
    padding: 24px;
  }
  
  .help-modal-title-modern {
    font-size: 1.25rem;
  }
  
  .help-description-modern {
    font-size: 15px;
  }
}

/* ===== ANIMACIONES ADICIONALES ===== */
@keyframes modalBounceIn {
  0% {
    transform: scale(0.3) translateY(100px);
    opacity: 0;
  }
  50% {
    transform: scale(1.05) translateY(-10px);
    opacity: 0.8;
  }
  70% {
    transform: scale(0.95) translateY(5px);
    opacity: 0.9;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.help-modal-bounce-in {
  animation: modalBounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== EFECTOS VISUALES ===== */
.help-modal-content-modern {
  position: relative;
}

.help-modal-content-modern::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--ads-primary), var(--ads-primary-dark), var(--ads-primary-light));
  border-radius: 18px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.help-modal-content-modern:hover::before {
  opacity: 1;
}

/* ===== ESTILOS PARA CONTENIDO ENRIQUECIDO ===== */
.help-content-detailed {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.help-content-detailed .section-overview,
.help-content-detailed .technical-details,
.help-content-detailed .business-impact,
.help-content-detailed .interpretation-guide {
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 8px;
  position: relative;
}

.help-content-detailed .section-overview {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  border-left: 4px solid #2196f3;
}

.help-content-detailed .technical-details {
  background: linear-gradient(135deg, #f3e5f5 0%, #fce4ec 100%);
  border-left: 4px solid #9c27b0;
}

.help-content-detailed .business-impact {
  background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
  border-left: 4px solid #4caf50;
}

.help-content-detailed .interpretation-guide {
  background: linear-gradient(135deg, #fff3e0 0%, #fff8e1 100%);
  border-left: 4px solid #ff9800;
}

.help-content-detailed h4 {
  color: #2F2D38 !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: none !important;
  -webkit-text-fill-color: #2F2D38 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.help-content-detailed h4::after {
  display: none !important;
}

.help-content-detailed p {
  color: #424242;
  line-height: 1.6;
  margin-bottom: 12px;
}

.help-content-detailed ul {
  list-style: none;
  padding-left: 0;
  margin: 12px 0;
}

.help-content-detailed li {
  color: #555;
  line-height: 1.5;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.help-content-detailed li::before {
  content: '•';
  color: #3351A6;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.help-content-detailed strong {
  color: #2F2D38;
  font-weight: 600;
}

/* Estilos específicos para texto de interpretación */
.help-content-detailed .interpretation-guide p {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.help-content-detailed .interpretation-guide p strong {
  display: inline-block;
  min-width: 120px;
  color: #3351A6;
}
