/* L-WORKS notice shell — master-detail, Figma tokens (SP2, node 843:18514) */
:root {
  color-scheme: light;
  /* design tokens (Figma) */
  --c-dark: #0c243b;
  --c-muted: #677381;
  --c-accent: #008f46;
  --c-accent-soft: rgba(0, 143, 70, 0.05);
  --c-card-border: #c7c9d4;
  --c-divider: #d7dce6;
  --c-bg: #ebedf2;
  --c-surface: #fff;
  --c-hover: #f9f9f9;
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* clamp() needs Chrome 79+; the desktop webview floor is Chromium 49, so a
     fixed size with the existing @media breakpoints below covers the range. */
  font-size: 0.875rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-dark);
}

/* inner area: left list + right detail + footer (modal header is the desktop
   app's). Flexbox, not CSS Grid (Chrome 57+) — the desktop webview floor is
   Chromium 49. .notice-main (index.html) wraps detail+footer into a column so
   the list pane can still span the full height as a flex sibling. */
.notice-app {
  display: flex;
  height: 100vh;
  padding: 20px;
}
/* flex gap needs Chrome 84+ (later than flexbox itself) — the Chromium 49
   floor predates it, so space the two children with a margin instead. */
.notice-app > * + * {
  margin-left: 20px;
}

/* ───── left list ───── */
.notice-list-pane {
  flex: 0 0 30%;
  min-width: 280px;
  min-height: 0;
  background: var(--c-surface);
  border-radius: 10px;
  padding: 16px;
  overflow-y: auto;
}
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notice-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: var(--c-surface);
  border: 1px solid var(--c-card-border);
  border-radius: 5px;
  padding: 16px 20px;
  cursor: pointer;
  font: inherit;
}
.notice-card:hover {
  background: var(--c-hover);
}
.notice-card.is-selected {
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
}
.notice-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notice-card__category {
  color: var(--c-accent);
  font-size: 0.9375rem;
}
.notice-card__date {
  color: var(--c-muted);
  font-size: 0.9375rem;
}
.notice-card__title {
  color: var(--c-dark);
  font-size: 1.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notice-empty {
  color: var(--c-muted);
  padding: 12px 4px;
}

/* ───── right column (detail + footer) ───── */
.notice-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.notice-main > * + * {
  margin-top: 20px;
}

/* ───── right detail ───── */
.notice-detail-pane {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--c-surface);
  border-radius: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.notice-detail__header {
  padding: 24px 30px;
  border-bottom: 1px solid var(--c-card-border);
  position: sticky;
  top: 0;
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.notice-detail__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--c-dark);
}
.notice-detail__date {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--c-muted);
}
.notice-install {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-width: 140px;
  padding: 0 16px;
  border-radius: 6px;
  background: var(--c-accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  text-transform: capitalize;
}
.notice-install:hover {
  filter: brightness(0.95);
}
.notice-detail__body {
  padding: 24px 30px 40px;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--c-muted);
  text-align: justify;
}
.notice-detail__body img {
  max-width: 100%;
  height: auto;
}
.notice-detail__body a {
  color: var(--c-accent);
}
.notice-status {
  margin: 0;
  padding: 0 30px 16px;
  color: var(--c-muted);
}

/* ───── footer ───── */
.notice-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.notice-dismiss {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-muted);
  font-size: 0.9375rem;
  cursor: pointer;
}
.notice-dismiss input {
  width: 18px;
  height: 18px;
  accent-color: var(--c-accent);
}

/* ───── responsive ───── */

/* medium: tighten spacing; column width is handled by flex: 0 0 30% above */
@media (max-width: 880px) {
  .notice-app {
    padding: 16px;
  }
  .notice-app > * + * {
    margin-left: 16px;
  }
}

/* small: single-column stack — list on top (capped, scrollable), detail below.
   .notice-main (index.html) already wraps detail+footer in its own column, so
   stacking the outer flex just switches its direction. */
@media (max-width: 720px) {
  .notice-app {
    flex-direction: column;
    padding: 12px;
  }
  .notice-app > * + * {
    margin-left: 0;
    margin-top: 12px;
  }
  .notice-list-pane {
    flex: 0 0 auto;
    min-width: 0;
    max-height: 38vh;
    padding: 12px;
  }
  .notice-main > * + * {
    margin-top: 12px;
  }
  .notice-detail__header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 18px;
  }
  .notice-detail__title {
    font-size: 18px;
  }
  .notice-detail__body {
    padding: 16px 18px 28px;
    font-size: 16px;
  }
  .notice-card__title {
    font-size: 17px;
  }
  .notice-install {
    min-width: 0;
    height: 40px;
  }
}
