/* lm1-dock.css — a dock that looks like a dock, and a command palette that looks designed.
   Additive: uses the app's tokens, no layout rewrite, dark-mode aware, reduced-motion aware. */

/* ---------- the field is gone; the dock keeps its height ---------- */
.tb-composer.lm1-dock-hidden { display: none !important; }
:root { --tb-h: 56px; }            /* constant: no growth while typing (app.js used to set this per keystroke) */

.taskbar {
  --lm1-dock-line: rgba(255,255,255,.10);
  box-shadow: 0 -1px 0 var(--taskbar-border), 0 -18px 40px -24px rgba(8,15,30,.55);
  padding-inline: 10px;
}
/* a shelf: the dock reads as a surface, not a strip */
.taskbar::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,103,192,.55), rgba(139,92,246,.45), transparent);
  opacity: .55; pointer-events: none;
}

/* ---------- the primary action ---------- */
.lm1-dock-cta {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0;
  height: 36px; padding: 0 12px 0 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(0,103,192,.35);
  background:
    linear-gradient(120deg, rgba(0,103,192,.14), rgba(139,92,246,.16)),
    var(--task-btn, rgba(255,255,255,.06));
  color: var(--task-ink, #16233a); font: inherit; font-size: 13px; font-weight: 650;
  transition: transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .16s, border-color .16s, background .16s;
  white-space: nowrap;
}
.lm1-dock-cta:hover {
  border-color: rgba(0,103,192,.6);
  box-shadow: 0 6px 18px -10px rgba(0,103,192,.7), inset 0 0 0 1px rgba(0,103,192,.15);
  transform: translateY(-1px);
}
.lm1-dock-cta:active { transform: translateY(0) scale(.98); }
.lm1-dock-cta:focus-visible { outline: 2px solid var(--accent, #0067c0); outline-offset: 2px; }
.lm1-dock-mark { font-size: 14px; color: var(--accent, #0067c0); }
.lm1-dock-kbd {
  font: 600 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 3px 5px; border-radius: 5px; opacity: .7;
  background: rgba(15,23,42,.08); border: 1px solid rgba(15,23,42,.10);
}
[data-theme="dark"] .lm1-dock-kbd { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.14); }

/* the task items breathe again, now that the field is gone */
.task-items { gap: 5px; }
.task-item { border-radius: 10px; }

/* ---------- the palette ---------- */
html.lm1-pal-open { overflow: hidden; }
.lm1-pal {
  position: fixed; inset: 0; z-index: 12000; display: none;
  align-items: flex-start; justify-content: center;
  padding: min(14vh, 120px) 16px 16px;
  background: rgba(8,12,22,.42);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  opacity: 0; transition: opacity .16s ease;
}
.lm1-pal.is-open { display: flex; opacity: 1; }
.lm1-pal > * { pointer-events: auto; }

.lm1-pal::before {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(60% 40% at 50% 0%, rgba(0,103,192,.18), transparent 70%);
}

/* the card itself: one column, generous, quiet */
.lm1-pal-head {
  display: flex; align-items: center; gap: 10px;
  width: min(680px, 100%); margin: 0 auto; padding: 14px 14px 14px 16px;
  background: var(--panel, #fff); color: var(--ink, #16233a);
  border: 1px solid var(--line, #e3e3e3); border-radius: 18px;
  box-shadow: 0 30px 80px -30px rgba(8,15,30,.65), 0 2px 10px rgba(8,15,30,.10);
  transform: translateY(-6px) scale(.99); transition: transform .18s cubic-bezier(.2,.8,.2,1);
}
.lm1-pal.is-open .lm1-pal-head { transform: none; }
.lm1-pal-mark { font-size: 18px; color: var(--accent, #0067c0); }
.lm1-pal-input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
  color: inherit; font: inherit; font-size: 16.5px; line-height: 1.4; padding: 6px 0;
}
.lm1-pal-input::placeholder { color: var(--muted, #6b7280); font-size: 15px; }
.lm1-pal-build {
  flex: 0 0 auto; border: 0; border-radius: 11px; padding: 0 16px; height: 40px;
  background: var(--cta, linear-gradient(120deg, #0067c0, #5b2fd6)); color: #fff;
  font: inherit; font-weight: 650; font-size: 13.5px; cursor: pointer;
  transition: transform .14s, filter .14s;
}
.lm1-pal-build:hover { filter: brightness(1.06); }
.lm1-pal-build:active { transform: scale(.97); }

.lm1-pal-ideas {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  width: min(680px, 100%); margin: 10px auto 0;
}
.lm1-pal-chip {
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.10);
  color: #eef4ff; border-radius: 999px; padding: 7px 12px; cursor: pointer;
  font: inherit; font-size: 12.5px; backdrop-filter: blur(6px);
  transition: background .14s, border-color .14s, transform .14s;
}
.lm1-pal-chip:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); transform: translateY(-1px); }
.lm1-pal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: min(680px, 100%); margin: 10px auto 0; color: rgba(238,244,255,.75); font-size: 11.5px;
}
.lm1-pal-foot kbd {
  font: 600 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 3px 5px; border-radius: 5px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
}
.lm1-pal-tier { opacity: .85; }

/* dark mode: the card is already token-based; the overlay keeps its depth */
[data-theme="dark"] .lm1-pal { background: rgba(4,7,14,.55); }
[data-theme="dark"] .lm1-pal-head { background: #131a2a; border-color: rgba(255,255,255,.10); color: #e6edf7; }

@media (max-width: 620px) {
  .lm1-dock-kbd { display: none; }
  .lm1-dock-label { font-size: 12.5px; }
  .lm1-pal { padding-top: 8vh; }
  .lm1-pal-head { border-radius: 16px; }
  .lm1-pal-ideas { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .lm1-dock-cta, .lm1-pal, .lm1-pal-head, .lm1-pal-chip, .lm1-pal-build { transition: none !important; }
}

/* the hint row inside the palette (used by dock.js, styled here so nothing renders unstyled) */
.lm1-pal-hint { font-size: 11.5px; letter-spacing: .1px; }
.lm1-pal-hint kbd { margin: 0 2px; }
