.changelog-trigger {
  cursor: pointer;
}

.changelog-trigger:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.feature-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(960px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  overflow: hidden;
}

.feature-modal > header,
.feature-modal > footer {
  position: relative;
  z-index: 2;
  background: #fff;
}

.feature-modal > footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.feature-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: #f8fafc;
}

.changelog-modal {
  width: min(720px, calc(100vw - 32px));
}

.changelog-list {
  display: grid;
  gap: 10px;
}

.changelog-entry,
.wishlist-item,
.wishlist-compose {
  border: 1px solid #dbe3ec;
  border-radius: 7px;
  background: #fff;
}

.changelog-entry {
  padding: 16px;
}

.changelog-entry.is-latest {
  border-color: #93c5fd;
  box-shadow: inset 3px 0 #2563eb;
}

.changelog-entry-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.changelog-entry-head strong {
  color: #0f172a;
  font-size: 18px;
}

.changelog-entry-head time {
  margin-left: auto;
  color: #64748b;
  font-size: 12px;
}

.changelog-section + .changelog-section {
  margin-top: 10px;
}

.changelog-section h3 {
  margin: 0 0 4px;
  color: #334155;
  font-size: 13px;
}

.changelog-section ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 20px;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.wishlist-body {
  display: grid;
  align-content: start;
  gap: 12px;
}

.wishlist-compose {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.wishlist-compose-row {
  display: grid;
  grid-template-columns: 140px minmax(260px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.wishlist-compose label,
.wishlist-toolbar label,
.wishlist-admin-controls label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.wishlist-compose textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
}

.wishlist-toolbar {
  display: flex;
  align-items: end;
  gap: 8px;
}

.wishlist-toolbar label:not(.wishlist-mine-filter) {
  min-width: 135px;
}

.wishlist-toolbar .wishlist-mine-filter {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-left: auto;
  color: #334155;
  font-size: 12px;
}

.wishlist-list {
  display: grid;
  gap: 10px;
}

.wishlist-item {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.wishlist-item-head,
.wishlist-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wishlist-item-head time {
  margin-left: auto;
  color: #64748b;
  font-size: 11px;
}

.wishlist-item h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}

.wishlist-item > p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.wishlist-item-meta {
  color: #64748b;
  font-size: 11px;
}

.wishlist-support {
  margin-left: auto;
}

.wishlist-support.active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.wishlist-delete {
  border-color: #fecaca;
  color: #b91c1c;
}

.wishlist-delete.is-confirming {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff;
}

.wishlist-admin-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  padding: 9px 11px;
  border-left: 3px solid #2563eb;
  background: #eff6ff;
  color: #334155;
  font-size: 12px;
}

.wishlist-admin-controls {
  display: grid;
  grid-template-columns: 150px minmax(240px, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.feature-pill.category-improvement {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}

.feature-pill.category-bug,
.feature-pill.status-declined {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.feature-pill.status-pending {
  border-color: #fde68a;
  background: #fffbeb;
  color: #a16207;
}

.feature-pill.status-planned,
.feature-pill.status-in_progress {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.feature-pill.status-completed {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.feature-empty {
  padding: 36px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #64748b;
  text-align: center;
}

.feature-empty.is-error,
.feature-status[data-tone="error"] {
  color: #b91c1c;
}

.feature-status {
  margin-right: auto;
  color: #64748b;
  font-size: 12px;
}

.feature-status[data-tone="success"] {
  color: #047857;
}

@media (max-width: 720px) {
  .feature-modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .wishlist-compose-row,
  .wishlist-admin-controls {
    grid-template-columns: 1fr;
  }

  .wishlist-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .wishlist-toolbar .wishlist-mine-filter {
    margin-left: 0;
  }
}
