/* Changelog modal — reuses features-modal shell look, continuous feed. */

.updates-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.updates-modal[hidden] {
  display: none;
}

.updates-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.updates-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(88dvh, 900px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.updates-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 12px;
  flex-shrink: 0;
}

.updates-modal__header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #111;
}

.updates-modal__close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0 4px;
}

.updates-modal__close:hover {
  color: #111;
}

.updates-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 22px 28px;
  -webkit-overflow-scrolling: touch;
}

.updates-modal__body::-webkit-scrollbar {
  width: 6px;
}

.updates-modal__feed {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.updates-item__date {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #7a8290;
  letter-spacing: 0.01em;
}

.updates-item__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: #111;
  line-height: 1.25;
}

.updates-item__text {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  line-height: 1.45;
}

.updates-item__media {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  line-height: 0;
  border-radius: 12px;
  background: #eef1f5;
  min-height: 120px;
}

.updates-item__media.is-loading {
  min-height: 220px;
}

.updates-item__media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(52dvh, 520px);
  margin: 0 auto;
}

.updates-modal__sentinel {
  height: 1px;
  width: 100%;
}

.updates-modal__loading {
  display: flex;
  justify-content: center;
  padding: 16px 0 4px;
  color: #9da4ae;
  font-size: 13px;
  font-weight: 500;
}

.updates-modal__loading[hidden] {
  display: none;
}

body.updates-modal-open {
  overflow: hidden !important;
}

@media (max-width: 640px) {
  .updates-modal {
    padding: 14px 12px;
  }

  .updates-modal__dialog {
    width: 100%;
    max-height: min(90dvh, 860px);
    border-radius: 18px;
  }

  .updates-modal__header {
    padding: 16px 16px 8px;
  }

  .updates-modal__body {
    padding: 4px 16px 24px;
  }
}
