/* NOVARIC® Workforce Planning Memo — memo.css
   Version: 20260910  D-23 compliant
   Buttons, modal, preview, print styles */

/* ── Memo action buttons ──────────────────────────────────────────── */
.nv-memo-actions {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: 1.25rem; align-items: center;
}
.nv-memo-actions--compact { margin-top: .75rem; }

.nv-memo-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.35rem;
  border-radius: 6px; border: 2px solid transparent;
  font-family: Helvetica, Arial, sans-serif;
  font-size: .92rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: background .18s, border-color .18s, color .18s;
  white-space: nowrap;
}
.nv-memo-btn:focus-visible {
  outline: 3px solid #0072A9; outline-offset: 3px;
}
.nv-memo-btn svg {
  width: 16px; height: 16px; flex-shrink: 0;
  stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* Primary — generate */
.nv-memo-btn--primary {
  background: #30384B; color: #fff; border-color: #30384B;
}
.nv-memo-btn--primary:hover { background: #293040; border-color: #293040; }
.nv-memo-btn--primary:disabled {
  opacity: .55; cursor: not-allowed; pointer-events: none;
}

/* Secondary — share */
.nv-memo-btn--secondary {
  background: #fff; color: #0072A9; border-color: #0072A9;
}
.nv-memo-btn--secondary:hover { background: #F0F7FD; }
.nv-memo-btn--secondary:disabled {
  background: #fff; color: #9CBCD8; border-color: #9CBCD8;
  cursor: not-allowed; pointer-events: none;
}

.nv-memo-stale-note {
  font-size: .8rem; color: #B8791A; font-weight: 600;
  padding: .4rem .7rem;
  background: #FFF6E5; border-radius: 4px;
  display: none;
}
.nv-memo-stale-note.is-visible { display: block; }

/* ── Modal overlay ────────────────────────────────────────────────── */
.nv-memo-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(30,39,50,.6);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 2rem 1rem; overflow-y: auto;
}
.nv-memo-overlay[hidden] { display: none; }

.nv-memo-dialog {
  background: #fff; border-radius: 8px;
  box-shadow: 0 8px 40px rgba(30,39,50,.22);
  width: 100%; max-width: 780px;
  display: flex; flex-direction: column;
  max-height: 90vh;
}
@media (max-width: 40em) {
  .nv-memo-overlay { padding: 0; align-items: flex-start; }
  .nv-memo-dialog { max-width: 100%; min-height: 100vh; border-radius: 0; max-height: none; }
}

.nv-memo-dialog__header {
  background: #30384B; color: #fff;
  padding: 1.25rem 1.5rem;
  border-radius: 8px 8px 0 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-shrink: 0;
}
@media (max-width: 40em) { .nv-memo-dialog__header { border-radius: 0; } }
.nv-memo-dialog__title { font-size: 1.05rem; font-weight: 800; margin: 0; color: #fff; }
.nv-memo-dialog__ref { font-size: .78rem; color: #B9C4D0; margin: .2rem 0 0; font-family: monospace; }
.nv-memo-dialog__close {
  background: transparent; border: 0; color: #fff; font-size: 1.5rem;
  cursor: pointer; padding: .25rem .5rem; line-height: 1; border-radius: 4px;
  flex-shrink: 0;
}
.nv-memo-dialog__close:focus-visible { outline: 3px solid #0072A9; }
.nv-memo-dialog__close:hover { background: rgba(255,255,255,.12); }

.nv-memo-dialog__summary {
  padding: 1.25rem 1.5rem;
  background: #F4F6F8; border-bottom: 1px solid #D9DFE7;
  display: grid; grid-template-columns: repeat(4,1fr); gap: .5rem .75rem;
  flex-shrink: 0;
}
@media (max-width: 40em) { .nv-memo-dialog__summary { grid-template-columns: repeat(2,1fr); } }
.nv-memo-sum-item {}
.nv-memo-sum-item dt { font-size: .72rem; font-weight: 700; color: #4D5A6B; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .15rem; }
.nv-memo-sum-item dd { font-size: .88rem; font-weight: 700; color: #30384B; margin: 0; }

.nv-memo-dialog__actions {
  padding: 1rem 1.5rem; border-bottom: 1px solid #D9DFE7;
  display: flex; flex-wrap: wrap; gap: .65rem; flex-shrink: 0;
}

.nv-memo-dialog__body {
  padding: 1.5rem; overflow-y: auto; flex: 1;
}

/* ── Privacy confirmation ─────────────────────────────────────────── */
.nv-memo-privacy {
  padding: 1rem 1.25rem;
  background: #F0F7FD;
  border: 1px solid #D9DFE7;
  border-left: 4px solid #0072A9;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1rem;
}
.nv-memo-privacy h3 { font-size: .9rem; margin: 0 0 .5rem; color: #30384B; }
.nv-memo-privacy p { font-size: .83rem; color: #4D5A6B; margin: 0 0 .75rem; }
.nv-memo-privacy label { display: flex; gap: .65rem; align-items: flex-start; font-size: .85rem; cursor: pointer; }
.nv-memo-privacy input[type=checkbox] { flex-shrink: 0; width: 1.1rem; height: 1.1rem; margin-top: .15rem; accent-color: #30384B; }

/* ── Status announcer ─────────────────────────────────────────────── */
#nv-memo-status {
  font-size: .83rem; color: #4D5A6B; margin-top: .5rem; min-height: 1.2em;
}

/* ── Memo preview inside modal ────────────────────────────────────── */
.nv-memo-preview {
  font-family: Helvetica, Arial, sans-serif;
  font-size: .85rem; color: #1E2732; line-height: 1.6;
}
.nv-memo-preview h2 {
  font-size: 1rem; color: #30384B; margin: 1.25rem 0 .5rem;
  border-bottom: 2px solid #009AE4; padding-bottom: .3rem;
}
.nv-memo-preview h3 { font-size: .88rem; color: #30384B; margin: 1rem 0 .35rem; }
.nv-memo-preview p { margin: 0 0 .5rem; }
.nv-memo-preview dl { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .75rem; margin: 0 0 .75rem; }
@media (max-width: 40em) { .nv-memo-preview dl { grid-template-columns: 1fr; } }
.nv-memo-preview dt { font-size: .78rem; font-weight: 700; color: #4D5A6B; }
.nv-memo-preview dd { font-size: .83rem; color: #1E2732; margin: 0; }
.nv-memo-notice {
  background: #FFF6E5; border-left: 4px solid #B8791A;
  border-radius: 0 4px 4px 0; padding: .75rem 1rem;
  font-size: .8rem; color: #6B4A0E; margin: .75rem 0;
}
.nv-memo-notice p { margin: 0; }
.nv-memo-disclaimer {
  background: #F4F6F8; border: 1px solid #D9DFE7; border-radius: 4px;
  padding: 1rem; font-size: .78rem; color: #4D5A6B; margin-top: 1.25rem;
}
.nv-memo-disclaimer strong { color: #30384B; display: block; margin-bottom: .3rem; }

/* Cost bar in preview */
.nv-memo-bar-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.nv-memo-bar-label { font-size: .78rem; color: #4D5A6B; min-width: 140px; flex-shrink: 0; }
.nv-memo-bar-track { flex: 1; background: #D9DFE7; height: 8px; border-radius: 99px; overflow: hidden; min-width: 60px; }
.nv-memo-bar-fill { height: 100%; background: #30384B; border-radius: 99px; }
.nv-memo-bar-val { font-size: .78rem; font-weight: 700; color: #30384B; min-width: 55px; text-align: right; flex-shrink: 0; }
.nv-memo-bar-pct { font-size: .72rem; color: #4D5A6B; min-width: 34px; text-align: right; flex-shrink: 0; }

/* Timeline in preview */
.nv-memo-tl { list-style: none; padding: 0; margin: 0 0 .75rem; }
.nv-memo-tl li { display: flex; gap: .6rem; align-items: baseline; font-size: .83rem; margin-bottom: .3rem; }
.nv-memo-tl-num { font-size: .72rem; font-weight: 800; color: #0072A9; min-width: 1.25rem; flex-shrink: 0; }

/* ── Print / PDF output ────────────────────────────────────────────── */
@media print {
  body * { visibility: hidden; }
  .nv-memo-print-root, .nv-memo-print-root * { visibility: visible; }
  .nv-memo-print-root {
    position: absolute; inset: 0;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 11pt; color: #1E2732;
    background: #fff;
  }
}

/* Print window styles (applied inside the print window) */


/* ── Hub share card — bridge hub.css tokens into toolkit context ─── */
.nv-hub-share-wrapper .grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  margin-top: 0;
}
.nv-hub-share-wrapper .card {
  background: #fff;
  border: 1px solid var(--nv-border, #D9DFE7);
  border-radius: 14px;
  padding: 21px;
  box-shadow: 0 1px 3px rgba(15,23,42,.05);
}
.nv-hub-share-wrapper .hero-card {
  grid-column: span 8;
  background: linear-gradient(125deg, #1C232D, #861A1B) !important;
  color: #fff;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  padding: 30px;
}
.nv-hub-share-wrapper .hero-card::after {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  border: 44px solid rgba(255,255,255,.05);
  border-radius: 50%;
  right: -60px; top: -70px;
}
.nv-hub-share-wrapper .hero-card .eyebrow {
  color: #ffd0ca;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  margin: 0 0 .5rem;
}
.nv-hub-share-wrapper .hero-card h2 {
  color: #fff; font-family: Georgia, serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin: 6px 0 8px; line-height: 1.2;
}
.nv-hub-share-wrapper .hero-card p { color: #c9dce7; max-width: 520px; margin: 0; }
.nv-hub-share-wrapper .chips {
  display: flex; gap: 7px; flex-wrap: wrap; margin-top: 1rem;
}
.nv-hub-share-wrapper .chips span {
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.09);
  border-radius: 999px;
  padding: 5px 10px; font-size: .75rem; color: #fff;
}
.nv-hub-share-wrapper .action {
  display: block; text-decoration: none;
  color: var(--nv-text, #1E2732);
  border: 1px solid var(--nv-border, #D9DFE7);
  border-radius: 10px; padding: 14px;
  background: var(--nv-surface, #F4F6F8);
  transition: .15s;
}
.nv-hub-share-wrapper .action:hover {
  transform: translateY(-2px);
  border-color: var(--nv-action, #0072A9);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.nv-hub-share-wrapper .action i {
  width: 32px; height: 32px;
  background: #F8EAEA; color: #861A1B;
  border-radius: 8px; display: grid;
  place-items: center; font-style: normal; margin-bottom: 0;
}
.nv-hub-share-wrapper .action b { display: block; margin: 8px 0 4px; }
.nv-hub-share-wrapper .action small { display: block; color: var(--nv-text-muted, #4D5A6B); font-size: .78rem; }
.nv-hub-share-wrapper .section-head {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 12px;
}
.nv-hub-share-wrapper .update {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--nv-border, #D9DFE7);
  align-items: start;
}
.nv-hub-share-wrapper .update:first-of-type { border: 0; padding-top: 0; }
.nv-hub-share-wrapper .update p { margin: 3px 0 0; color: var(--nv-text-muted, #4D5A6B); font-size: .82rem; }
.nv-hub-share-wrapper .badge {
  font-size: .68rem; font-weight: 800; text-transform: uppercase;
  border-radius: 999px; padding: 4px 8px;
  background: #F8EAEA; color: #861A1B;
  height: max-content; white-space: nowrap;
}
@media(max-width:60em) {
  .nv-hub-share-wrapper .grid { grid-template-columns: 1fr; }
  .nv-hub-share-wrapper .hero-card { min-height: auto; }
}
@media(max-width:40em) {
  .nv-hub-share-wrapper .hero-card { padding: 1.25rem; }
}
