/* updates.css — the "Updates" changelog: a gift-icon button in the home admin
   bar centre (VIP + admin) that opens a simple modal listing manually-logged
   updates. Reuses the global .mn-modal* chrome (links.css); only the button,
   filter, list and admin editor are defined here. */

/* ===== Admin-bar button ===== */
.mn-updates-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  background: color-mix(in srgb, currentColor 9%, transparent);
  color: inherit;
  font-family: var(--font-header);
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.mn-updates-btn[hidden] { display: none; }
.mn-updates-btn:hover,
.mn-updates-btn:focus-visible {
  background: color-mix(in srgb, currentColor 16%, transparent);
  border-color: color-mix(in srgb, currentColor 30%, transparent);
  outline: none;
}
.mn-updates-btn i { font-size: 0.9em; }

/* Drop the text label on very small screens — keep just the gift icon. */
@media (max-width: 480px) {
  .mn-updates-btn-label { display: none; }
  .mn-updates-btn { padding: 0.32rem 0.5rem; }
}

/* Honour the [hidden] attribute inside the modal. Several elements here carry
   a `display:*` rule (.mn-updates-toolbar, the reused .mn-modal-actions,
   .icon-button) that would otherwise override the browser default
   `[hidden]{display:none}`. The ID selector wins on specificity — no
   !important needed — so JS toggling `.hidden` reliably shows/hides them. */
#mnUpdatesModal [hidden] { display: none; }

/* ===== Modal panel sizing ===== */
#mnUpdatesModal .mn-modal-panel {
  width: min(640px, calc(100vw - 1.2rem));
  max-height: calc(100vh - 6.5rem);
  display: flex;
  flex-direction: column;
}

/* ===== Filter ===== */
.mn-updates-filter-row {
  padding-bottom: 0.75rem;
}
.mn-updates-filter {
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius-panel) - 2px);
  background: color-mix(in srgb, var(--panel-bg) 72%, transparent);
  padding: 0.55rem 0.65rem;
  color: var(--color-text);
  font-family: var(--font-body);
}
.mn-updates-filter:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent-soft) 35%, transparent);
}

/* ===== List ===== */
.mn-updates-list {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.15rem 0.1rem 0.25rem;
}

.mn-update-card {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-panel);
  background: color-mix(in srgb, var(--panel-bg) 55%, transparent);
  padding: 0.7rem 0.85rem;
}

.mn-update-date {
  font-family: var(--font-header);
  font-weight: 900;
  letter-spacing: 0.01em;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.mn-update-bullets {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mn-update-bullets li {
  line-height: 1.4;
}

/* Empty / no-match states */
.mn-updates-empty {
  text-align: center;
  opacity: 0.6;
  padding: 1.75rem 0.5rem;
  font-size: 0.95rem;
}

/* ===== Admin editor ===== */
.mn-updates-toolbar {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 0.6rem;
}

.mn-update-edit {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-panel);
  background: color-mix(in srgb, var(--panel-bg) 55%, transparent);
  padding: 0.7rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mn-update-edit-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mn-update-date-input {
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius-panel) - 2px);
  background: color-mix(in srgb, var(--panel-bg) 72%, transparent);
  padding: 0.4rem 0.5rem;
  color: var(--color-text);
  font-family: var(--font-body);
}

.mn-update-del {
  margin-left: auto;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  flex: 0 0 auto;
}
.mn-update-del:hover,
.mn-update-del:focus-visible {
  opacity: 1;
  background: color-mix(in srgb, #e74c3c 18%, transparent);
  color: #e74c3c;
  outline: none;
}

.mn-update-items-input {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius-panel) - 2px);
  background: color-mix(in srgb, var(--panel-bg) 72%, transparent);
  padding: 0.5rem 0.6rem;
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.4;
}
.mn-update-items-input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent-soft) 35%, transparent);
}

.mn-update-items-hint {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  opacity: 0.6;
}
