/* ============================================================
   LUNO Importer — shell adoption sheet for the canonical
   .luno-app-shell. Loaded AFTER app.css so the cascade keeps
   app.css as the legacy surface and this file as the shell layer.
   Handwritten rules for this file target only app-side geometry
   the vendored payload does not ship; nothing here restyles a
   payload component.
   ============================================================ */

/* Owner-requested work-screen density; canonical tokens stay unchanged. */
.luno-refined .luno-app-shell .luno-page-title,
.luno-refined .luno-app-shell .luno-stat-card__value {
  font-size: var(--font-size-xl);
}

/* ---------- Shell: canonical .luno-app-shell + app-side geometry ----------
   The payload owns the shell, sidebar, nav, collapse states, topbar and
   content recipes. Rules here only add importer-specific geometry that the
   payload does not ship: sticky sidebar column, topbar/content alignment,
   the full-width sidebar footer divider and the help dialog open state. */
.luno-app-shell {
  --importer-page-inset: var(--space-6);
}

.luno-app-shell .luno-app-shell__topbar {
  padding: 0;
}

/* Height cancels the legacy .topbar-inner{height:100%} kept in app.css:
   the canonical flex header centres the inner row instead. */
.topbar-inner {
  height: auto;
  width: 100%;
  min-width: 0;
  max-width: var(--luno-shell-content-max);
  margin-inline: auto;
  padding-inline: var(--importer-page-inset);
}

/* The sidebar column sticks while the content scrolls; the payload ships no
   sticky-sidebar geometry. The body zone scrolls internally. */
.luno-app-shell > .luno-app-shell__sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.luno-app-shell__sidebar-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.luno-app-shell.is-collapsed .luno-app-shell__collapse svg {
  transform: rotate(180deg);
}

.luno-app-shell .luno-shell-nav__group {
  margin-inline: var(--space-3);
}

/* Anchors styled with the canonical button recipe keep their click target;
   the payload's button recipe assumes native button elements. */
a.luno-button {
  text-decoration: none;
}

/* Sidebar footer (item 7): the payload ships no footer recipe. The footer
   keeps no horizontal padding so the divider spans the full sidebar width;
   the session row carries its own inset. */
.importer-sidebar-foot {
  flex: none;
}

.importer-sidebar-foot .v-sidebar__divider {
  margin: 0;
}

.importer-sidebar-foot .session-row {
  padding: var(--space-3) var(--space-4);
}

.luno-app-shell.is-collapsed .importer-sidebar-foot .session-row {
  justify-content: center;
  padding-inline: 0;
}

/* Connection-form selects keep their narrow width while the wrap shrinks
   with them, so the canonical chevron sits at the select's own right edge. */
.connection-form .luno-select-wrap {
  width: fit-content;
}

/* ---------- Responsive shell layer ---------- */
@media (max-width: 768px) {
  .luno-app-shell {
    --importer-page-inset: var(--space-4);
    grid-template-columns: 1fr;
  }

  /* The collapse control is desktop-only: the drawer replaces it on mobile
     and the canonical payload neutralizes is-collapsed below this width. */
  .luno-app-shell__collapse {
    display: none;
  }

  .luno-app-shell > .luno-app-shell__sidebar {
    position: fixed;
    z-index: 60;
    top: 0;
    left: 0;
    display: flex;
    width: var(--shell-sidebar);
    max-width: calc(100vw - 44px);
    height: 100vh;
    transform: translateX(-100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform var(--motion-default) var(--motion-easing);
    box-shadow: var(--shadow-modal);
  }

  body.is-mobile-nav-open .luno-app-shell > .luno-app-shell__sidebar {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-connector-status {
    padding: 0 var(--space-4) var(--space-3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .luno-app-shell > .luno-app-shell__sidebar {
    transition: none;
    animation: none;
  }
}

/* ---------- Help dialog (item 8) ----------
   Visibility state only; the payload ships the backdrop, viewport and
   dialog recipes. */
.importer-help {
  display: none;
}

.importer-help.is-open {
  display: contents;
}

.importer-help__list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.importer-help__list strong {
  display: block;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-compact);
}

.importer-help__list span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-default);
}
