/* Shared by workspace, login and password-reset pages. */
/* Collapsing the last notice must not change the page width. */
html { scrollbar-gutter:stable; }
/* Grow with the cards so wrapped text stays above the page controls. */
.app-notice-slot { min-width:0; margin-bottom:12px; flex-shrink:0; }
.app-notices {
  --notice-surface: #fff;
  --notice-border: #d6e3eb;
  --notice-text: #12293f;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  max-height: min(360px, 50vh);
  overflow: hidden;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--notice-text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", "Malgun Gothic", sans-serif;
  text-align: start;
}
.app-notices[hidden] { display: none !important; }
.app-notice-tools { display:flex; align-items:center; justify-content:flex-end; gap:6px; height:20px; flex-shrink:0; padding:0 4px; }
.app-notice-count { padding:0 6px; border-radius:10px; background:var(--notice-border); font-size:12px; line-height:20px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.app-notices .app-notice-dismiss-all { height:20px; padding:0 4px; border:0; border-radius:4px; background:transparent; color:inherit; font:inherit; font-size:12px; line-height:20px; cursor:pointer; }
.app-notices .app-notice-dismiss-all:hover { background:var(--notice-border); }
.app-notices .app-notice-dismiss-all:focus-visible { outline:2px solid currentColor; outline-offset:-2px; }
.app-notice-list { display:grid; align-content:start; gap:12px; flex:0 1 auto; min-height:0; overflow-y:auto; overflow-anchor:none; padding:4px; }
dialog > .app-notice-slot { margin:12px 20px 0; }
.app-notice-slot:not(:has(> .app-notices:not([hidden]))) { height:0; margin:0; }
.app-notices .app-notice {
  --notice-tone: #23734a;
  --notice-soft: #e9f5ee;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 32px;
  align-items: start;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--notice-border);
  border-inline-start: 4px solid var(--notice-tone);
  border-radius: 12px;
  background: var(--notice-surface);
  color: var(--notice-text);
  box-shadow: 0 4px 14px #12293f18;
  pointer-events: auto;
}
.app-notices .app-notice-error { --notice-tone: #b42318; --notice-soft: #fef0ed; }
.app-notice-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--notice-soft); color: var(--notice-tone); font-size: 18px; font-weight: 700; line-height: 1; }
.app-notice-text { min-width: 0; padding-top: 3px; overflow-wrap: anywhere; white-space: pre-wrap; }
.app-notices .app-notice-close { display: grid; place-items: center; width: 32px; height: 32px; margin: -2px -4px 0 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.app-notices .app-notice-close:hover { color: var(--notice-tone); background: var(--notice-soft); }
.app-notices .app-notice-close:focus-visible { outline: 2px solid var(--notice-tone); outline-offset: 2px; }
:root[data-theme="dark"] .app-notices { --notice-surface: #172a3d; --notice-border: #3b5269; --notice-text: #e9f1f8; }
:root[data-theme="dark"] .app-notices .app-notice { --notice-tone: #78dba3; --notice-soft: #204535; }
:root[data-theme="dark"] .app-notices .app-notice-error { --notice-tone: #ffaaa2; --notice-soft: #4a292c; }
@media (max-width: 600px) {
  .app-notices { width: 100%; }
  .app-notices .app-notice { gap: 10px; }
}
