/* NotebookLM-exact shell for design library pull */

:root {
  --nb-bg: #131314;
  --nb-surface: #1e1f20;
  --nb-surface-2: #282a2c;
  --nb-line: rgba(255, 255, 255, 0.08);
  --nb-text: #e3e3e3;
  --nb-muted: #9aa0a6;
  --nb-subtle: #6b7280;
  --nb-pill-bg: #e8eaed;
  --nb-pill-text: #202124;
  --nb-accent: #8ab4f8;
  --nb-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font: 400 14px/1.5 var(--nb-font);
  color: var(--nb-text);
  background: var(--nb-bg);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.nb-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--nb-bg);
}

.nb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px 0 12px;
  border-bottom: 1px solid var(--nb-line);
  flex-shrink: 0;
}

.nb-topbar__left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nb-logo { display: flex; flex-shrink: 0; }
.nb-topbar__title {
  font-size: 15px; font-weight: 400; color: var(--nb-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nb-topbar__right { display: flex; align-items: center; gap: 8px; }
.nb-topbar__meta { font-size: 12px; color: var(--nb-subtle); margin-right: 4px; }

.nb-pill {
  display: inline-flex; align-items: center; padding: 7px 16px;
  font-size: 13px; font-weight: 500; border-radius: 999px;
  border: 1px solid var(--nb-line); color: var(--nb-text); background: transparent;
}
.nb-pill:hover { background: var(--nb-surface); }
.nb-pill--solid { background: var(--nb-pill-bg); color: var(--nb-pill-text); border-color: transparent; }
.nb-pill--solid:hover { background: #f1f3f4; }
.nb-pill--solid:disabled { opacity: 0.45; cursor: not-allowed; }

.nb-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  flex: 1;
  min-height: 0;
}

.nb-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--nb-line);
}
.nb-col--detail { border-right: 0; }

.nb-col__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px; flex-shrink: 0;
}
.nb-col__title { margin: 0; font-size: 14px; font-weight: 500; }
.nb-col__toggle { color: var(--nb-subtle); opacity: 0.65; padding: 4px; }

.nb-col__body {
  flex: 1; min-height: 0; overflow: auto; padding: 0 14px 14px;
  display: flex; flex-direction: column;
}

.nb-add-sources {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 11px 16px; margin-bottom: 12px;
  font-size: 14px; font-weight: 500; border-radius: 999px; border: none;
  background: var(--nb-pill-bg); color: var(--nb-pill-text); flex-shrink: 0;
}
.nb-add-sources:hover { background: #f1f3f4; }

.nb-search { display: flex; align-items: stretch; margin-bottom: 12px; flex-shrink: 0; }
.nb-search__box {
  flex: 1; min-width: 0; background: var(--nb-surface);
  border: 1px solid var(--nb-line); border-radius: 12px 0 0 12px; overflow: hidden;
}
.nb-search__pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 0; }
.nb-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  font-size: 12px; font-weight: 500; border-radius: 999px;
  border: 1px solid var(--nb-line); background: var(--nb-surface-2); color: var(--nb-muted);
}
.nb-chip--static { color: var(--nb-text); }
.nb-chip--toggle { cursor: pointer; }
.nb-chip--toggle:has(input:checked) { color: var(--nb-accent); border-color: rgba(138,180,248,.35); }
.nb-chip--toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.nb-search__input {
  width: 100%; padding: 10px 12px 12px; font-size: 14px; border: 0;
  background: transparent; color: var(--nb-text); outline: none;
}
.nb-search__input::placeholder { color: var(--nb-subtle); }
.nb-search__submit {
  display: flex; align-items: center; justify-content: center; width: 48px;
  border: 1px solid var(--nb-line); border-left: 0; border-radius: 0 12px 12px 0;
  background: var(--nb-surface); color: var(--nb-muted);
}
.nb-search__submit:hover { color: var(--nb-text); background: var(--nb-surface-2); }

.nb-source-list { list-style: none; margin: 0; padding: 0; flex: 1; overflow: auto; }
.nb-source-list[hidden] { display: none !important; }
.nb-source-item { display: flex; gap: 10px; padding: 10px 8px; border-radius: 8px; }
.nb-source-item__dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--nb-subtle); }
.nb-source-item--loading .nb-source-item__dot { background: var(--nb-accent); animation: nb-pulse 1s ease infinite; }
.nb-source-item--done .nb-source-item__dot { background: #81c995; }
.nb-source-item--error .nb-source-item__dot { background: #f28b82; }
@keyframes nb-pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.nb-source-item__title { margin: 0; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-source-item__meta { min-width: 0; flex: 1; }
.nb-source-item__sub { margin: 2px 0 0; font-size: 12px; color: var(--nb-subtle); }

.nb-sources-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 1.5rem 1rem;
}
.nb-sources-empty[hidden] { display: none !important; }
.nb-sources-empty__icon { color: var(--nb-muted); margin-bottom: 12px; }
.nb-sources-empty__title { margin: 0 0 8px; font-size: 14px; font-weight: 500; color: var(--nb-muted); }
.nb-sources-empty__text { margin: 0 0 12px; font-size: 13px; color: var(--nb-subtle); line-height: 1.5; max-width: 240px; }
.nb-sources-empty__cta { margin: 0; font-size: 13px; color: var(--nb-subtle); }
.nb-link { color: var(--nb-accent); background: none; border: none; padding: 0; font: inherit; cursor: pointer; }
.nb-shell.has-queue .nb-sources-empty { display: none; }

.nb-col--main { display: flex; flex-direction: column; }
.nb-main__body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.nb-welcome {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 2rem 1.5rem;
}
.nb-welcome[hidden] { display: none !important; }
.nb-welcome__emoji { font-size: 2.5rem; margin: 0 0 12px; }
.nb-welcome__heading { margin: 0 0 8px; font-size: 22px; font-weight: 400; letter-spacing: -0.02em; }
.nb-welcome__sub { margin: 0; font-size: 14px; color: var(--nb-muted); max-width: 360px; line-height: 1.5; }

.nb-progress { padding: 0 18px 12px; flex-shrink: 0; }
.nb-progress[hidden] { display: none !important; }
.nb-progress__bar { height: 2px; background: var(--nb-surface); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.nb-progress__fill { height: 100%; width: 0%; background: var(--nb-accent); transition: width .2s ease; }
.nb-progress__msg { margin: 0 0 8px; font-size: 12px; color: var(--nb-subtle); }
.nb-progress__steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nb-step { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 4px; color: var(--nb-subtle); background: var(--nb-surface); }
.nb-step.is-active { color: var(--nb-accent); }
.nb-step.is-done { color: var(--nb-muted); }

.nb-status { padding: 0 18px 8px; font-size: 13px; color: var(--nb-muted); }
.nb-status[hidden] { display: none; }
.nb-grid-wrap { flex: 1; min-height: 0; overflow: auto; padding: 0 18px 18px; }
.nb-grid-wrap[hidden] { display: none !important; }
.nb-shell.has-results .nb-welcome, .nb-shell.is-pulling .nb-welcome { display: none; }

.nb-composer { flex-shrink: 0; padding: 12px 18px 16px; border-top: 1px solid var(--nb-line); background: var(--nb-bg); }
.nb-composer__box { border-radius: 16px; border: 1px solid var(--nb-line); background: var(--nb-surface); overflow: hidden; }
.nb-composer__input { width: 100%; padding: 14px 16px 8px; font-size: 14px; border: 0; background: transparent; color: var(--nb-text); outline: none; }
.nb-composer__input::placeholder { color: var(--nb-subtle); }
.nb-composer__foot { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 10px 16px; }
.nb-composer__count { font-size: 12px; color: var(--nb-subtle); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--nb-line); background: var(--nb-surface-2); }
.nb-composer__send { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--nb-line); background: var(--nb-surface-2); color: var(--nb-muted); }
.nb-composer__note { margin: 8px 4px 0; font-size: 11px; color: var(--nb-subtle); text-align: center; }

.nb-detail__empty { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; text-align: center; font-size: 13px; color: var(--nb-subtle); line-height: 1.5; }
.nb-detail__empty[hidden] { display: none !important; }
.nb-detail__body { flex: 1; min-height: 0; overflow: auto; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.nb-detail__body[hidden] { display: none !important; }
.nb-detail__asset-name { margin: 0; font-size: 12px; color: var(--nb-subtle); word-break: break-all; }
.nb-detail__preview { border-radius: 12px; border: 1px solid var(--nb-line); background: var(--nb-surface); min-height: 160px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.nb-detail__placeholder { font-size: 13px; color: var(--nb-subtle); }
.nb-detail__img { max-width: 100%; max-height: 240px; object-fit: contain; }
.nb-detail__form { display: flex; flex-direction: column; gap: 6px; }
.nb-field-label { font-size: 11px; font-weight: 500; color: var(--nb-subtle); margin-top: 4px; }
.nb-field { width: 100%; padding: 8px 10px; font-size: 13px; border-radius: 8px; border: 1px solid var(--nb-line); background: var(--nb-surface); color: var(--nb-text); outline: none; }
.nb-field--area { resize: vertical; min-height: 72px; }
.media-card.is-selected { outline: 2px solid var(--nb-accent); outline-offset: 2px; }

.nb-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.nb-modal[hidden] { display: none !important; }
.nb-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.65); }
.nb-modal__dialog { position: relative; width: min(640px,100%); max-height: calc(100vh - 48px); overflow: auto; padding: 28px 24px 24px; border-radius: 24px; border: 1px solid rgba(255,255,255,.1); background: var(--nb-surface); }
.nb-modal__close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--nb-line); background: var(--nb-surface-2); color: var(--nb-muted); font-size: 1.25rem; }
.nb-modal__title { margin: 0 0 20px; font-size: 1.35rem; font-weight: 400; text-align: center; line-height: 1.35; }
.nb-modal__accent { background: linear-gradient(90deg,#8ab4f8,#81c995); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nb-modal__drop { padding: 2rem 1.25rem 1.25rem; border-radius: 16px; border: 1.5px dashed rgba(255,255,255,.15); text-align: center; margin-bottom: 16px; }
.nb-modal__drop-label { margin: 0 0 4px; font-size: 1rem; }
.nb-modal__drop-sub { margin: 0 0 16px; font-size: 13px; color: var(--nb-subtle); }
.nb-modal__textarea { width: 100%; padding: 10px; font-size: 12px; font-family: ui-monospace,Menlo,monospace; border-radius: 10px; border: 1px solid var(--nb-line); background: var(--nb-bg); color: var(--nb-text); resize: vertical; text-align: left; }
.nb-modal__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nb-modal__action { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 13px; border-radius: 999px; border: 1px solid var(--nb-line); background: var(--nb-surface-2); }
.nb-modal__count { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--nb-subtle); }
.nb-modal__drop.is-dragover { border-color: var(--nb-accent); background: rgba(138,180,248,.06); }

.batch-section { grid-column: 1 / -1; margin: 12px 0 8px; padding-top: 12px; border-top: 1px solid var(--nb-line); }
.batch-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.batch-section__title { margin: 0 0 4px; font-size: 13px; font-weight: 500; }
.batch-section__sub { margin: 0 0 8px; font-size: 11px; color: var(--nb-subtle); word-break: break-all; }
.batch-section__sub a { color: var(--nb-accent); }
.media-card.is-skeleton { pointer-events: none; opacity: 0.45; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.media-card {
  border: 1px solid var(--nb-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--nb-surface);
  cursor: pointer;
  text-align: left;
  color: inherit;
  padding: 0;
}

.media-card:hover { border-color: rgba(138, 180, 248, 0.35); }

.media-card__thumb {
  aspect-ratio: 4 / 3;
  background: var(--nb-surface-2);
  overflow: hidden;
}

.media-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-card__meta {
  padding: 8px 10px;
  border-top: 1px solid var(--nb-line);
}

.media-card__sub {
  font-size: 10px;
  color: var(--nb-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(138, 180, 248, 0.12);
  color: #c7d2fe;
}

@media (max-width: 960px) {
  .nb-columns { grid-template-columns: 1fr; }
  .nb-col--sources { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--nb-line); }
  .nb-col--detail { max-height: 280px; border-top: 1px solid var(--nb-line); }
}
