/* Standalone component: the host owns placement; all colors follow theme.css. */
.mley-updates {
  min-width: 0;
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.mley-updates [hidden] { display: none !important; }
.mley-updates__heading { padding: 4px 4px 16px; }
.mley-updates__eyebrow {
  margin: 0 0 6px;
  color: var(--accent-color);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .14em;
}
.mley-updates__heading h2 { margin: 0; font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.mley-updates__heading > p:not(.mley-updates__eyebrow) { margin: 5px 0 0; color: var(--text-muted); font-size: .8rem; }
.mley-updates__days { display: flex; gap: 4px; margin-top: 15px; padding: 4px; border-radius: 12px; background: var(--bg-surface-2); border: 1px solid var(--border-color); }
.mley-updates__days button {
  flex: 1;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.mley-updates__days button[aria-pressed="true"] { background: var(--bg-surface); border-color: var(--border-color); color: var(--accent-color); box-shadow: 0 1px 3px #0000000a; }
.mley-updates__days button:hover { color: var(--accent-color); background: var(--accent-color-soft); }
.mley-updates__card { margin-bottom: 14px; border: 1px solid var(--border-color); border-radius: 16px; background: var(--bg-surface); overflow: hidden; }
.mley-updates__card-heading { display: flex; align-items: center; gap: 9px; padding: 18px 18px 10px; }
.mley-updates__card-heading > div { min-width: 0; flex: 1; }
.mley-updates__card-heading h3 { font-size: .95rem; font-weight: 700; margin: 0; }
.mley-updates__card-heading p { font-size: .75rem; color: var(--text-muted); margin: 2px 0 0; }
.mley-updates__icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; color: var(--accent-color); background: var(--accent-color-soft); }
.mley-updates__source-label { font-size: .62rem; letter-spacing: .04em; font-weight: 700; color: var(--text-muted); }
.mley-updates__date { margin: 0 18px; font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.mley-updates__date:empty { display: none; }
.mley-updates__status { margin: 12px 18px 16px; font-size: .78rem; color: var(--text-muted); }
.mley-updates__status:empty { display: none; }
.mley-updates__list { list-style: none; margin: 0; padding: 0 18px; }
.mley-updates__item { padding: 13px 0; border-top: 1px solid var(--border-color); }
.mley-updates__item-title { display: block; color: var(--text-color); text-decoration: none; font-size: .86rem; line-height: 1.45; font-weight: 600; }
.mley-updates__item a:hover { color: var(--accent-color); text-decoration: underline; text-underline-offset: 3px; }
.mley-updates__item-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mley-updates__item-label { display: block; font-size: .7rem; color: var(--text-muted); margin-bottom: 4px; }
.mley-updates__item-meta { margin: 5px 0 0; color: var(--text-muted); font-size: .73rem; line-height: 1.45; }
.mley-updates__more summary { padding: 12px 18px; min-height: 44px; cursor: pointer; color: var(--accent-color); font-weight: 600; font-size: .8rem; }
.mley-updates__more summary:hover { background: var(--bg-surface-2); }
.mley-updates__scope { margin: 10px 18px 16px; font-size: .7rem; line-height: 1.5; color: var(--text-muted); }
.mley-updates__editions { display: flex; flex-wrap: wrap; gap: 0 12px; margin: 0 18px 10px; }
.mley-updates__editions a { display: inline-flex; align-items: center; min-height: 44px; font-size: .75rem; color: var(--accent-color); }
.mley-updates__edition { padding-top: 14px; border-top: 1px solid var(--border-color); }
.mley-updates__edition-heading { margin: 0 18px 4px; color: var(--text-color); font-size: .85rem; font-weight: 700; }
.mley-updates__edition-status { margin: 0 18px 14px; color: var(--text-muted); font-size: .73rem; }
.mley-updates__retry { margin: 0 18px 16px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-surface-2); color: var(--accent-color); font: inherit; cursor: pointer; }
.mley-updates__retry:disabled { color: var(--text-muted); cursor: wait; }
.mley-updates__footer { border-top: 1px solid var(--border-color); }
.mley-updates__footer a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 10px 18px; color: var(--accent-color); font-size: .78rem; font-weight: 600; text-decoration: none; }
.mley-updates__footer a:hover, .mley-updates__retry:hover { background: var(--accent-color-soft); }
.mley-updates__timezone { margin: 0 4px 18px; color: var(--text-muted); font-size: .7rem; }
.mley-updates :is(a, button, summary):focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; border-radius: 3px; }

/* Optional compact presentation; shared type, colors and controls stay intact. */
.mley-updates[hidden], .mley-updates-backdrop[hidden] { display: none !important; }
.mley-updates-trigger[aria-expanded="true"] { color: var(--accent-color); background: var(--accent-color-soft); }
.mley-updates-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / .28); }
.mley-updates--panel {
  position: fixed;
  top: calc(var(--mley-header-height, 61px) + 8px);
  right: max(16px, env(safe-area-inset-right));
  width: min(420px, calc(100% - 32px));
  max-height: calc(100dvh - var(--mley-header-height, 61px) - 24px - max(var(--mley-reader-dock-height, 0px), env(safe-area-inset-bottom)));
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}
.mley-updates--panel .mley-updates__heading {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: 4px 8px;
  padding: 12px 18px 0;
  border-bottom: 1px solid var(--border-color);
}
.mley-updates--panel .mley-updates__eyebrow { grid-column: 1; grid-row: 1; margin: 0; white-space: nowrap; }
/* Keep the section heading available to assistive technology in the compact view. */
.mley-updates--panel .mley-updates__title { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.mley-updates--panel .mley-updates__summary { display: none; }
.mley-updates--panel .mley-updates__days { grid-column: 2; grid-row: 1; gap: 0; margin: 0; padding: 3px; border-radius: 10px; }
.mley-updates--panel .mley-updates__days button { min-width: 44px; padding: 0 8px; font-size: .8rem; border-radius: 7px; white-space: nowrap; }
.mley-updates__close { grid-column: 3; grid-row: 1; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; color: var(--text-color); background: transparent; cursor: pointer; }
.mley-updates__close:hover { background: var(--bg-surface-2); }
.mley-updates--panel .mley-updates__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 0; }
.mley-updates__sources { grid-column: 1 / -1; display: flex; gap: 12px; }
.mley-updates__sources button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 48px; padding: 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--text-muted); font: inherit; font-weight: 600; cursor: pointer; }
.mley-updates__sources .mley-navigation-icon { flex: 0 0 18px; }
.mley-updates__sources button[aria-selected="true"] { color: var(--accent-color); border-bottom-color: var(--accent-color); }
.mley-updates__sources button:hover { color: var(--accent-color); background: var(--bg-surface-2); }
@media (max-width: 599px) {
  .mley-updates--panel { right: max(8px, env(safe-area-inset-right)); width: calc(100% - max(8px, env(safe-area-inset-left)) - max(8px, env(safe-area-inset-right))); border-radius: 12px; }
  .mley-updates--panel .mley-updates__heading { padding-inline: 14px; }
  .mley-updates--panel .mley-updates__body { padding-inline: 10px; }
}
/* The mobile panel covers the site header; closing it reveals the same header
   and restores focus through the shared overlay runtime. */
@media (max-width: 767px), (max-width: 1199px) and (max-height: 500px) {
  .mley-updates--panel {
    top: 0;
    left: 0;
    right: 0;
    width: auto;
    max-height: calc(100dvh - 16px - max(var(--mley-reader-dock-height, 0px), env(safe-area-inset-bottom)));
    border-width: 0 0 1px;
    border-radius: 0 0 12px 12px;
  }
  .mley-updates--panel .mley-updates__heading {
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right));
  }
  .mley-updates--panel .mley-updates__body {
    padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
  }
}
/* In landscape/zoomed view, let the whole panel scroll so the heading cannot
   consume all available room and make the publications unreachable. */
@media (max-height: 500px) {
  .mley-updates--panel { display: block; overflow-y: auto; overscroll-behavior: contain; }
  .mley-updates--panel .mley-updates__body { overflow: visible; }
}
@media print { .mley-updates--panel, .mley-updates-backdrop { display: none !important; } }
