/* LC Features & Platforms drawer — class prefix lcn-
   Tokens: CTO + Sphere (navy / cream / gold) + Rigo purple tab chrome. */
:root {
  --lcn-ink: #0b1220;
  --lcn-navy: #1a2744;
  --lcn-navy-mid: #243556;
  --lcn-cream: #f7f1e8;
  --lcn-cream-2: #efe6d8;
  --lcn-cream-soft: #fbf7f1;
  --lcn-gold: #c9a227;
  --lcn-gold-soft: #e8d48a;
  --lcn-gold-deep: #a8841a;
  --lcn-muted: #8a93a6;
  --lcn-drawer-w: min(1120px, 94vw);
  --lcn-ease: cubic-bezier(.22, .61, .36, 1);
  --lcn-z-backdrop: 10000;
  --lcn-z-drawer: 10010;
  --lcn-z-edge: 10005;
  --lcn-tab-purple: #292477; /* exact closed-ref rgb(41,36,119) */
  --lcn-tab-purple-hover: #3230a0;
  --lcn-tab-purple-deep: #30288a;
  --lcn-edge-navy: #0a122a; /* exact closed-ref rgb(10,18,42) */
  --lcn-header-lav: #d1cde4;
  --lcn-label: #2a2a3a;
  --lcn-tab-w: 40px;
  --lcn-tab-radius: 20px; /* half width → true semicircular right edge */
  --lcn-strip-w: 40px;    /* navy edge strip (no white border line) */
  --lcn-font: "Inter", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.lcn-on .shell > .side {
  position: relative;
  z-index: 1;
}

.mi {
  font-family: "Material Icons Outlined", "Material Icons", sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
}

/* —— Closed chrome: EXACT match to Rigo closed ref (5abb2a…) ——
   40px purple pill, right-only radius 20px (smooth semicircle into navy),
   soft glow, white SHOW label bottom→top, > chevrons. */
.lcn-edge-strip {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--lcn-strip-w);
  background: var(--lcn-edge-navy);
  box-sizing: border-box;
  z-index: var(--lcn-z-edge);
  pointer-events: none;
}
.lcn-edge-tab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: calc(var(--lcn-z-edge) + 1);
  width: var(--lcn-tab-w);
  height: min(530px, 88vh);
  min-height: 400px;
  padding: 20px 0 22px;
  border: none;
  /* Right-only fully rounded — bubble curve into navy; left flush to viewport */
  border-radius: 0 var(--lcn-tab-radius) var(--lcn-tab-radius) 0;
  background: var(--lcn-tab-purple);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  /* Soft glow (closed ref) — not a hard drop shadow */
  box-shadow:
    0 0 18px rgba(41, 36, 119, .55),
    0 0 6px rgba(41, 36, 119, .4),
    2px 0 14px rgba(11, 18, 42, .35);
  transition: background .18s ease, box-shadow .18s ease, opacity .2s var(--lcn-ease), visibility .2s;
  font-family: var(--lcn-font);
}
.lcn-edge-tab:hover {
  background: var(--lcn-tab-purple-hover);
  box-shadow:
    0 0 22px rgba(50, 48, 160, .6),
    0 0 8px rgba(41, 36, 119, .45),
    2px 0 16px rgba(11, 18, 42, .4);
}
.lcn-edge-tab:focus-visible {
  outline: 2px solid var(--lcn-gold);
  outline-offset: 2px;
}
.lcn-edge-tab-chev {
  flex: none;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  font-family: var(--lcn-font);
  text-shadow: 0 0 6px rgba(255, 255, 255, .35);
}
.lcn-edge-tab-label {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.15;
  white-space: nowrap;
  color: #fff;
  font-family: var(--lcn-font);
  text-shadow: 0 0 6px rgba(255, 255, 255, .25);
}
body.lcn-drawer-open .lcn-edge-strip,
body.lcn-drawer-open .lcn-edge-tab {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Optional hamburger — hidden; SHOW tab is primary */
.lcn-trigger {
  display: none !important;
}

/* Backdrop */
.lcn-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--lcn-z-backdrop);
  background: rgba(11, 18, 32, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s var(--lcn-ease), visibility .22s;
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.lcn-backdrop.lcn-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* —— Drawer (open): white panel + LC header + grids + HIDE tab —— */
.lcn-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  bottom: 0;
  z-index: var(--lcn-z-drawer);
  width: var(--lcn-drawer-w);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--lcn-label);
  box-shadow: 12px 0 48px rgba(11, 18, 32, .35);
  transform: translateX(-105%);
  transition: transform .28s var(--lcn-ease);
  overflow: hidden;
  isolation: isolate;
  pointer-events: auto;
  font-family: var(--lcn-font);
}
.lcn-drawer.lcn-open { transform: translateX(0); }

/* Lavender LC header */
.lcn-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--lcn-header-lav);
  border-bottom: 1px solid rgba(255, 255, 255, .85);
  min-height: 56px;
  box-sizing: border-box;
}
.lcn-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lcn-edge-navy); /* dark navy circle + white LC */
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .04em;
  flex: none;
  font-family: var(--lcn-font);
}
.lcn-brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1;
}
.lcn-brand-title {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  max-width: 100%;
}
.lcn-brand-title strong,
.lcn-brand strong {
  position: relative;
  display: inline-block;
  font-size: 17px;
  font-weight: 700;
  color: var(--lcn-navy); /* bold navy title on lavender header */
  letter-spacing: .01em;
  line-height: 1.2;
}
/* Header title: hover = underline ONLY; click = Directory MOS hub when href is live preview */
.lcn-brand-title:hover strong::after,
.lcn-brand-title:focus-visible strong::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--lcn-gold);
  border-radius: 1px;
}
.lcn-brand-title:focus-visible {
  outline: 2px solid var(--lcn-gold);
  outline-offset: 2px;
  border-radius: 4px;
}
.lcn-brand span { display: none; } /* screenshot: single title line */
.lcn-close {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #1f1f2e; /* Rigo ref charcoal glyph rgb(31,31,46) */
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.lcn-close:hover {
  background: rgba(31, 31, 46, .08);
}
.lcn-close .mi { font-size: 22px; }

/* Header collapse control — exact Rigo glyph: vertical bar + left arrow */
.lcn-collapse-ico {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
}


.lcn-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 28px 36px;
  scrollbar-width: thin;
  scrollbar-color: rgba(40, 36, 119, .35) transparent;
  background: #fff;
}

/* Section titles — centered, clear hierarchy */
.lcn-sec {
  margin-bottom: 36px;
}
.lcn-sec:last-child { margin-bottom: 12px; }
.lcn-sec-title {
  margin: 0 0 22px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--lcn-tab-purple-deep);
  letter-spacing: .01em;
  font-family: var(--lcn-font);
}
.lcn-sec-title::after { display: none; }

/* Hide old platforms toggle chrome */
.lcn-sec-toggle,
.lcn-sec-meta,
.lcn-collapse[hidden] { display: none !important; }
.lcn-collapse:not([hidden]) {
  display: block;
  margin: 0;
  padding: 0;
  border: none;
}

/* Grid of circular thumbs + labels — cells must fit full labels (e.g. Communications) */
.lcn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px 16px;
  align-items: start;
}
.lcn-grid-features {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.lcn-grid-platforms {
  /* Was 7×minmax(0,1fr) — cells shrank and clipped "Communications" */
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
@media (max-width: 640px) {
  .lcn-grid-features,
  .lcn-grid-platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.lcn-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  min-width: 0;
  padding: 6px 6px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--lcn-label);
  overflow: visible;
  transition: background .15s ease, box-shadow .15s ease;
}
/* Hover = gold underline on label only (no navigation). Click = follow href only if real preview URL. */
.lcn-tile:hover,
.lcn-tile:focus-visible {
  background: transparent;
  box-shadow: none;
}
.lcn-tile:focus-visible {
  outline: 2px solid var(--lcn-gold);
  outline-offset: 2px;
}
.lcn-thumb {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  box-shadow:
    inset 0 0 0 1px rgba(11, 18, 32, .12),
    0 2px 8px rgba(11, 18, 32, .18);
  position: relative;
  overflow: hidden;
}
.lcn-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, .42);
  border-radius: 50%;
}
.lcn-thumb .mi {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #fff;
  line-height: 1;
}
.lcn-tile-label {
  position: relative;
  display: inline-block;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--lcn-label);
  font-family: var(--lcn-font);
  white-space: normal;
  overflow: visible;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}

/* Hover = underline ONLY on Feature / Platform labels (no nav on hover; click follows real preview href) */
.lcn-tile:hover .lcn-tile-label::after,
.lcn-tile:focus-visible .lcn-tile-label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--lcn-gold);
  border-radius: 1px;
}


/* Unconnected / reserved tiles — hover underline stays; click blocked in JS when href is # */
.lcn-tile.lcn-tile--nobot,
.lcn-tile[data-status="no-bot"] {
  opacity: 0.42;
  cursor: default;
  pointer-events: none;
}
.lcn-tile.lcn-tile--nobot:hover,
.lcn-tile.lcn-tile--nobot:focus-visible,
.lcn-tile[data-status="no-bot"]:hover,
.lcn-tile[data-status="no-bot"]:focus-visible {
  background: transparent;
  box-shadow: none;
}
.lcn-tile[data-status="awaiting-preview"] {
  opacity: 0.85;
  cursor: default;
}
.lcn-tile[data-status="excluded"] {
  opacity: 0.45;
  cursor: not-allowed;
}
.lcn-tile[data-status="connected"] {
  opacity: 1;
  cursor: pointer;
}

/* Row dividers between grid visual rows (subtle) */
.lcn-sec-features .lcn-grid,
.lcn-sec-platforms .lcn-grid {
  padding-bottom: 4px;
}

/* Footer strip (minimal — screenshot has no logout; keep compact note optional) */
.lcn-foot {
  display: none;
}

/* HIDE tab — on right edge of open drawer; same bubble curve into navy */
.lcn-hide-rail {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--lcn-tab-w);
  background: var(--lcn-edge-navy);
  box-sizing: border-box;
  pointer-events: none;
  z-index: 2;
}
.lcn-hide-tab {
  position: absolute;
  top: 50%;
  /* Sit on the right edge of the drawer; curve bubbles into navy gutter */
  right: 0;
  transform: translateY(-50%);
  width: var(--lcn-tab-w);
  height: min(530px, 88vh);
  min-height: 400px;
  padding: 20px 0 22px;
  border: none;
  border-radius: 0 var(--lcn-tab-radius) var(--lcn-tab-radius) 0;
  background: var(--lcn-tab-purple);
  color: #fff;
  cursor: pointer;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: auto;
  z-index: 3;
  font-family: var(--lcn-font);
  box-shadow:
    0 0 18px rgba(41, 36, 119, .55),
    0 0 6px rgba(41, 36, 119, .4);
  transition: background .18s ease, box-shadow .18s ease;
}
.lcn-drawer.lcn-open .lcn-hide-tab { display: flex; }
.lcn-hide-tab:hover {
  background: var(--lcn-tab-purple-hover);
  box-shadow:
    0 0 22px rgba(50, 48, 160, .6),
    0 0 8px rgba(41, 36, 119, .45);
}
.lcn-hide-tab:focus-visible {
  outline: 2px solid var(--lcn-gold);
  outline-offset: 2px;
}

/* Pad drawer content so it doesn't sit under HIDE rail */
.lcn-drawer.lcn-open .lcn-scroll,
.lcn-drawer.lcn-open .lcn-head {
  padding-right: calc(28px + var(--lcn-tab-w));
}
.lcn-drawer.lcn-open .lcn-head {
  padding-right: calc(16px + var(--lcn-tab-w));
}

body.lcn-drawer-open { /* overflow unchanged */ }

body.lcn-drawer-open .leaflet-container,
body.lcn-drawer-open .leaflet-pane,
body.lcn-drawer-open .leaflet-top,
body.lcn-drawer-open .leaflet-bottom,
body.lcn-drawer-open .leaflet-control-container {
  z-index: 0 !important;
}
body.lcn-drawer-open header.top {
  z-index: 0;
  position: relative;
}
