/* ===================================================
 * Changelog / Novedades Modal Styles
 * =================================================== */

.erp-changelog-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 16px;
  box-sizing: border-box;
}

.erp-changelog-modal-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.erp-changelog-modal {
  background: #ffffff;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
}

.erp-changelog-modal-backdrop.is-visible .erp-changelog-modal {
  transform: translateY(0) scale(1);
}

/* Header */
.erp-changelog-header {
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.erp-changelog-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.erp-changelog-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
  flex-shrink: 0;
}

.erp-changelog-header-titles {
  display: flex;
  flex-direction: column;
}

.erp-changelog-main-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}

.erp-changelog-meta-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.erp-changelog-version-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e40af;
  background-color: #dbeafe;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.02em;
}

.erp-changelog-tag-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.erp-changelog-tag-pill.tag-novedad {
  background-color: #dcfce7;
  color: #15803d;
}

.erp-changelog-tag-pill.tag-mejora {
  background-color: #fef9c3;
  color: #854d0e;
}

.erp-changelog-tag-pill.tag-actualizacion {
  background-color: #ede9fe;
  color: #6b21a8;
}

.erp-changelog-tag-pill.tag-correccion {
  background-color: #fee2e2;
  color: #b91c1c;
}

.erp-changelog-close-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #64748b;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.erp-changelog-close-btn:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: #0f172a;
}

/* Body */
.erp-changelog-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.erp-changelog-slide {
  display: none;
  animation: erpChangelogFadeIn 0.3s ease;
}

.erp-changelog-slide.is-active {
  display: block;
}

@keyframes erpChangelogFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.erp-changelog-slide-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
  line-height: 1.35;
}

.erp-changelog-date {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.erp-changelog-image-wrapper {
  margin-bottom: 18px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.erp-changelog-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.erp-changelog-desc {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.55;
  margin-bottom: 18px;
}

/* Details list */
.erp-changelog-details-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.erp-changelog-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background-color: #f8fafc;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #1e293b;
}

.erp-changelog-detail-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 1px;
}

.erp-changelog-detail-cat.cat-novedad {
  background-color: #dcfce7;
  color: #15803d;
}

.erp-changelog-detail-cat.cat-mejora {
  background-color: #e0f2fe;
  color: #0369a1;
}

.erp-changelog-detail-cat.cat-correccion {
  background-color: #fee2e2;
  color: #b91c1c;
}

.erp-changelog-detail-text {
  flex: 1 1 auto;
}

/* Progress & Dots */
.erp-changelog-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.erp-changelog-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  padding: 0;
}

.erp-changelog-dot.is-active {
  background-color: #2563eb;
  width: 24px;
  border-radius: 8px;
}

/* Footer */
.erp-changelog-footer {
  padding: 16px 24px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.erp-changelog-counter-text {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.erp-changelog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.erp-changelog-btn {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.erp-changelog-btn--prev {
  background-color: #ffffff;
  color: #475569;
  border-color: #cbd5e1;
}

.erp-changelog-btn--prev:hover:not(:disabled) {
  background-color: #f1f5f9;
  color: #0f172a;
}

.erp-changelog-btn--prev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.erp-changelog-btn--next {
  background-color: #2563eb;
  color: #ffffff;
}

.erp-changelog-btn--next:hover {
  background-color: #1d4ed8;
  color: #ffffff;
}

.erp-changelog-btn--finish {
  background-color: #10b981;
  color: #ffffff;
}

.erp-changelog-btn--finish:hover {
  background-color: #059669;
  color: #ffffff;
}

/* Responsive */
@media (max-width: 640px) {
  .erp-changelog-modal {
    max-height: 94vh;
    border-radius: 16px;
  }
  .erp-changelog-header {
    padding: 16px 16px 12px;
  }
  .erp-changelog-body {
    padding: 16px;
  }
  .erp-changelog-footer {
    padding: 12px 16px 16px;
    flex-wrap: wrap;
  }
  .erp-changelog-slide-title {
    font-size: 1.1rem;
  }
}
