/* =========================================================
 * UE Nodes — Frontend CSS (Unified App)
 * File: assets/css/ue-nodes.css
 *
 * This stylesheet is organized around the active 0.3.6/0.3.7
 * map-first UI model:
 * - full-viewport map shell
 * - floating overlays on desktop
 * - bottom sheet on mobile
 * - compact registration strip with fixed zoom controls on top
 * - narrow side navigation (< | >) inside registration content
 *
 * Cleanup notes:
 * - old registration-specific collapsed heights have been removed
 *   because the current registration states use content-driven height
 *   with a mobile max-height and internal scroll.
 * - redundant registration overrides that duplicated the base panel
 *   colors and base search-field styling have been removed.
 * - legacy footer navigation styles are not included.
 * ========================================================= */


/* =========================================================
   1) App shell and top overlays
   ========================================================= */

.ue-nodes-app {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
}

.ue-nodes-app,
.ue-nodes-app * {
  box-sizing: border-box;
}

.ue-nodes-app__shell {
  position: relative;
  width: 100%;
  min-height: 100svh;
  height: 100svh;
  overflow: hidden;
  background: #0f1711;
}

@supports not (height: 100svh) {
  .ue-nodes-app__shell {
    min-height: 100vh;
    height: 100vh;
  }
}

.ue-nodes-app__map {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #dfe7df;
}

/* Overlay wrappers are click-through by default so they do not block
   map interaction except where actual controls are rendered. */
.ue-nodes-app__overlay {
  position: absolute;
  z-index: 400;
  pointer-events: none;
}

.ue-nodes-app__overlay>* {
  pointer-events: auto;
}

.ue-nodes-app__overlay--top {
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ue-nodes-app__top-left,
.ue-nodes-app__top-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ue-nodes-app__top-right {
  align-items: flex-end;
}

.ue-nodes-app__brand:empty,
.ue-nodes-app__search:empty,
.ue-nodes-app__node-count:empty,
.ue-nodes-app__attribution:empty {
  display: none;
}

.ue-nodes-app__brand,
.ue-nodes-app__attribution,
.ue-nodes-app__node-count,
.ue-nodes-app__search {
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ue-nodes-app__brand,
.ue-nodes-app__node-count,
.ue-nodes-app__search {
  background: rgba(17, 17, 17, 0.88);
  color: #ffffff;
}

.ue-nodes-app__attribution {
  background: rgba(255, 255, 255, 0.78);
  color: #111111;
}

.ue-nodes-app__brand {
  min-width: 40px;
  min-height: 40px;
  padding: 10px 12px;
}

.ue-nodes-app__node-count {
  min-height: 40px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

.ue-nodes-app__attribution {
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
}

.ue-nodes-app__overlay--search {
  top: 72px;
  left: 12px;
  z-index: 410;
}

.ue-nodes-app__search {
  width: min(420px, calc(100vw - 24px));
  min-height: 48px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.ue-nodes-app__horizon {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  z-index: 250;
  pointer-events: none;
  background-image: url("../moon-surface-horizon.webp");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% auto;
}


/* =========================================================
   2) Node panel shell
   ========================================================= */

.ue-nodes-app__node-panel {
  position: absolute;
  z-index: 500;
  overflow: hidden;
  background: rgba(17, 17, 17, 0.92);
  color: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.34);
}

.ue-nodes-app__node-panel[hidden] {
  display: none !important;
}


/* =========================================================
   3) Panel and drawer primitives
   ========================================================= */

.uen-panel,
.uen-drawer {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.uen-panel__head,
.uen-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.uen-panel__titleWrap,
.uen-drawer__titleWrap {
  min-width: 0;
}

.uen-panel__title,
.uen-drawer__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
}

.uen-panel__meta,
.uen-drawer__meta,
.uen-drawer-coords,
.uen-drawer__coords {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.88;
}

.uen-panel__close,
.uen-drawer__close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font-size: 24px;
  line-height: 40px;
  cursor: pointer;
}

.uen-panel__close:hover,
.uen-drawer__close:hover {
  opacity: 0.75;
}

.uen-panel__body,
.uen-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 14px;
}

.uen-panel__foot,
.uen-drawer__foot {
  flex: 0 0 auto;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}


/* =========================================================
   4) Search, buttons, fields and common content blocks
   ========================================================= */

.uen-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.uen-panel__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.uen-panel__search {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: #111111;
  color: #ffffff;
}

.uen-panel__search::placeholder,
.ue-nodes-app__node-panel .uen-field__input::placeholder,
.uen-strip__fieldrow .uen-field__input::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
}

.uen-panel__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  z-index: 30;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #111111;
}

.uen-panel__status,
.uen-panel__mini {
  margin-top: 0;
  font-size: 13px;
  line-height: 1.4;
}

.uen-panel__status {
  opacity: 0.88;
}

.uen-panel__mini {
  opacity: 0.9;
}

/* Buttons are shared across search, drawer and registration strip.
   The disabled state is explicit because the create/next controls depend
   on access, zoom and placement validity. */
.uen-panel__btn,
.uen-btn,
button.uen-btn,
a.uen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  box-shadow: none;
  cursor: pointer;
  text-decoration: none;
}

.uen-panel__btn {
  background: #2a2a2a;
  color: #ffffff;
}

.uen-panel__btn--primary {
  background: #bddab1;
  color: #0b0b0b;
  font-weight: 700;
}

.ue-nodes-app__node-panel button:disabled,
.ue-nodes-app__node-panel button.is-disabled,
.uen-btn[aria-disabled="true"],
.uen-btn.is-disabled {
  background: #d6d6d6 !important;
  color: #666666 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
  pointer-events: none;
}

.ue-nodes-app__node-panel button:disabled:hover,
.ue-nodes-app__node-panel button:disabled:focus,
.ue-nodes-app__node-panel button:disabled:active {
  transform: none !important;
}

.uen-drawer .uen-btn,
.uen-panel .uen-btn,
.uen-drawer a.uen-btn,
.uen-panel a.uen-btn,
.uen-drawer button.uen-btn,
.uen-panel button.uen-btn {
  width: 100%;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.16);
  color: inherit !important;
}

.uen-drawer .uen-btn--primary,
.uen-drawer .uen-btn--cta,
.uen-panel .uen-btn--primary,
.uen-panel .uen-btn--cta {
  background: #2f5035;
  color: #ffffff !important;
}

.uen-drawer .uen-btn:hover,
.uen-panel .uen-btn:hover {
  opacity: 0.92;
}

.uen-drawer-intro {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  color: #000000;
  font-size: 13px;
  line-height: 1.35;
}

.uen-field__label--block {
  display: block;
  margin-top: 10px;
  margin-bottom: 4px;
  font-weight: 700;
}

.uen-drawer__detected,
.uen-drawer__coords,
.uen-drawer-preview {
  font-size: 13px;
  line-height: 1.35;
  color: inherit;
}

.uen-drawer-preview {
  margin-top: 8px;
  opacity: 0.85;
}

.ue-nodes-app__node-panel .uen-field__input,
.ue-nodes-app__node-panel input.uen-field__input,
.ue-nodes-app__node-panel select.uen-field__input,
.ue-nodes-app__node-panel textarea.uen-field__input,
.uen-strip__fieldrow .uen-field__input,
.uen-strip__fieldrow input.uen-field__input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 10px;
  background: #111111 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.ue-nodes-app__node-panel textarea.uen-field__input {
  min-height: 110px;
  resize: vertical;
}

.ue-nodes-app__node-panel select.uen-field__input option {
  background: #111111;
  color: #ffffff;
}

.ue-nodes-app__node-panel .uen-check span {
  color: #ffffff;
}

.uen-req {
  color: inherit;
  font-weight: 800;
}

.uen-drawer__excerpt {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
}

.uen-drawer__dl {
  margin: 0;
}

.uen-drawer__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.uen-drawer__row:first-child {
  border-top: 0;
}

.uen-drawer__row dt {
  font-size: 12px;
  font-weight: 800;
}

.uen-drawer__row dd {
  margin: 0;
  font-size: 12px;
}

.uen-drawer__actions,
.uen-drawer__links,
.uen-panel__actions,
.uen-panel__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.uen-drawer a,
.uen-link,
.uen-panel a,
.uen-strip__body a,
.uen-popup-link {
  color: #bddab1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.uen-drawer a:hover,
.uen-link:hover,
.uen-panel a:hover {
  text-decoration-thickness: 2px;
}

.uen-drawer .uen-link--muted,
.uen-panel .uen-link--muted {
  opacity: 0.95;
}

/* =========================================================
   4.5) My Nodes surface
   ========================================================= */

.ue-nodes-app__node-panel[data-state="myNodes"] {
  overflow: auto;
}

.uen-my-nodes,
.ue-nodes-app__node-panel [data-uen-surface="myNodes"] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.uen-my-nodes__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.uen-my-nodes__intro {
  min-width: 0;
}

.uen-my-nodes__title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  color: #ffffff;
}

.uen-my-nodes__subtitle {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.45;
  color: #d8e2d8;
  opacity: 0.76;
}

.uen-my-nodes__headActions,
.uen-my-nodes__filters,
.uen-my-nodes__cardActions,
.uen-surface-shortcuts__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.uen-my-nodes__btn,
.uen-my-nodes__btn:link,
.uen-my-nodes__btn:visited,
.uen-surface-shortcuts__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.uen-my-nodes__btn:hover,
.uen-my-nodes__btn:focus,
.uen-surface-shortcuts__btn:hover,
.uen-surface-shortcuts__btn:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  text-decoration: none;
  outline: none;
}

.uen-my-nodes__btn:disabled,
.uen-my-nodes__btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.uen-my-nodes__filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.uen-my-nodes__filter:hover,
.uen-my-nodes__filter:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  outline: none;
}

.uen-my-nodes__filter.is-active,
.uen-my-nodes__filter[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
}

.uen-my-nodes__list {
  display: grid;
  gap: 10px;
}

.uen-my-nodes__card {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.uen-my-nodes__cardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.uen-my-nodes__cardIdentity {
  min-width: 0;
}

.uen-my-nodes__cardTitle {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  color: #ffffff;
}

.uen-my-nodes__cardGeo {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.74);
}

.uen-my-nodes__cardRelation {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.78);
}

.uen-my-nodes__chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.uen-my-nodes__chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.2;
}

.uen-my-nodes__followUp {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.uen-my-nodes__comms {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.76;
}

.uen-my-nodes__updated {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.62;
}

.uen-my-nodes__cardActions {
  margin-top: 10px;
}

.uen-surface-shortcuts {
  margin-top: 12px;
}

.ue-nodes-app__node-panel .uen-empty {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  opacity: 0.88;
}

@media (max-width: 860px) {

  .uen-my-nodes__head,
  .uen-my-nodes__cardHead {
    flex-direction: column;
    align-items: flex-start;
  }

  .uen-my-nodes__cardRelation {
    white-space: normal;
  }
}

/* =========================================================
   5) Search results, popups and map UI accents
   ========================================================= */

.uen-result {
  padding: 8px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.15s ease;
}

.uen-result:first-child {
  border-top: none;
}

.uen-result:hover {
  background: rgba(255, 255, 255, 0.06);
}

.uen-result-title {
  display: block;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
}

.uen-result-meta {
  color: #ffffff;
  font-size: 12px;
  line-height: 1.3;
  opacity: 0.72;
}

.uen-empty {
  padding: 8px 6px;
  opacity: 0.8;
}

.uen-panel__results {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 40vh;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #111111;
}

.uen-panel__results[hidden] {
  display: none !important;
}

.uen-result--button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  text-align: left;
}

.ue-nodes-app .leaflet-popup-content-wrapper {
  border-radius: 10px;
  background: #1a1a1a;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.ue-nodes-app .leaflet-popup-content {
  margin: 14px 16px;
}

.ue-nodes-app .leaflet-popup-tip {
  background: #1a1a1a;
}

.ue-nodes-app .leaflet-popup-close-button {
  color: #ffffff;
  opacity: 0.7;
}

.ue-nodes-app .leaflet-popup-close-button:hover {
  opacity: 1;
}

.uen-popup-title {
  margin-bottom: 6px;
  font-weight: 800;
}

.uen-popup-excerpt {
  margin: 6px 0 10px;
}

.uen-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.uen-popup-btn {
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: #bddab1;
  color: #0b0b0b;
  font-weight: 800;
  cursor: pointer;
}

.ue-nodes-app .leaflet-control-attribution {
  padding: 3px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #111111;
  font-size: 11px;
  line-height: 1.2;
  box-shadow: none;
}

.ue-nodes-app .leaflet-control-attribution a {
  color: inherit;
}

.ue-nodes-app .uen-marker {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.ue-nodes-app .uen-marker--pending {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.ue-nodes-app .uen-zone-hover {
  stroke-width: 4 !important;
  fill-opacity: 0.28 !important;
}

.uen-zone-tooltip {
  position: absolute;
  z-index: 600;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.3;
  white-space: pre-line;
  pointer-events: none;
}

.ue-nodes-app .uen-cluster-icon {
  background: transparent;
  border: 0;
}

.ue-nodes-app .uen-cluster-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 5px solid #1a1a1a;
  border-radius: 999px;
  background: #bddab1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.ue-nodes-app .uen-cluster-badge span {
  color: #0b0b0b;
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
}


/* =========================================================
   6) Page-level guards inside the theme layout
   ========================================================= */

/* The unified app is meant to own the viewport area. These rules prevent
   the surrounding theme from adding extra vertical space or overlapping
   footer elements. */
.site-footer,
footer {
  position: relative;
  z-index: 10;
}

/* Map surface still owns the viewport-style shell. */
body:has(.ue-nodes-app--surface-map) .site-footer,
body:has(.ue-nodes-app--surface-map) footer,
body:has(.ue-nodes-app--surface-map) .generate-back-to-top,
body:has(.ue-nodes-app--surface-map) .footer-bar {
  display: none !important;
}

body:has(.ue-nodes-app--surface-map) .ue-nodes-app__shell {
  min-height: calc(100svh - 80px);
  height: calc(100svh - 80px);
}

@supports not (height: 100svh) {
  body:has(.ue-nodes-app--surface-map) .ue-nodes-app__shell {
    min-height: calc(100vh - 80px);
    height: calc(100vh - 80px);
  }
}

body.admin-bar:has(.ue-nodes-app--surface-map) .ue-nodes-app__shell {
  min-height: calc(100svh - 112px);
  height: calc(100svh - 112px);
}

@supports not (height: 100svh) {
  body.admin-bar:has(.ue-nodes-app--surface-map) .ue-nodes-app__shell {
    min-height: calc(100vh - 112px);
    height: calc(100vh - 112px);
  }
}

body:has(.ue-nodes-app--surface-map) .inside-article,
body:has(.ue-nodes-app--surface-map) .entry-content,
body:has(.ue-nodes-app--surface-map) .site-main,
body:has(.ue-nodes-app--surface-map) .content-area,
body:has(.ue-nodes-app--surface-map) article,
body:has(.ue-nodes-app--surface-map) main {
  min-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body:has(.ue-nodes-app--surface-map) .entry-content>*:last-child,
body:has(.ue-nodes-app--surface-map) .inside-article>*:last-child {
  margin-bottom: 0 !important;
}

body:has(.ue-nodes-app--surface-map) .ue-nodes-app {
  margin: 0 !important;
}

html:has(.ue-nodes-app--surface-map),
body:has(.ue-nodes-app--surface-map) {
  overflow: hidden;
}

/* Standalone page surfaces keep normal document scroll,
   but the top spacing from the theme is removed so the map
   can sit directly under the secondary menu area. */
body:has(.ue-nodes-app--surface-directory) .inside-article,
body:has(.ue-nodes-app--surface-directory) .entry-content,
body:has(.ue-nodes-app--surface-directory) .site-main,
body:has(.ue-nodes-app--surface-directory) .content-area,
body:has(.ue-nodes-app--surface-directory) article,
body:has(.ue-nodes-app--surface-directory) main,
body:has(.ue-nodes-app--surface-my-nodes) .inside-article,
body:has(.ue-nodes-app--surface-my-nodes) .entry-content,
body:has(.ue-nodes-app--surface-my-nodes) .site-main,
body:has(.ue-nodes-app--surface-my-nodes) .content-area,
body:has(.ue-nodes-app--surface-my-nodes) article,
body:has(.ue-nodes-app--surface-my-nodes) main {
  min-height: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html:has(.ue-nodes-app--surface-directory),
body:has(.ue-nodes-app--surface-directory),
html:has(.ue-nodes-app--surface-my-nodes),
body:has(.ue-nodes-app--surface-my-nodes) {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Hide theme-level page title/header chrome on standalone node surfaces.
   render_page_shell() no longer outputs its own internal page header, so
   the visible title above the map is coming from the theme layer. */
body:has(.ue-nodes-app--surface-directory) .entry-header,
body:has(.ue-nodes-app--surface-directory) .page-header,
body:has(.ue-nodes-app--surface-directory) .site-content .entry-title,
body:has(.ue-nodes-app--surface-directory) .site-content .page-title,
body:has(.ue-nodes-app--surface-my-nodes) .entry-header,
body:has(.ue-nodes-app--surface-my-nodes) .page-header,
body:has(.ue-nodes-app--surface-my-nodes) .site-content .entry-title,
body:has(.ue-nodes-app--surface-my-nodes) .site-content .page-title {
  display: none !important;
}

body:has(.ue-nodes-app--surface-directory) .inside-article,
body:has(.ue-nodes-app--surface-my-nodes) .inside-article {
  padding-top: 0 !important;
}

/* Standalone surfaces should suppress the theme/page title area.
   Current render_page_shell() no longer outputs an internal plugin header,
   so the remaining title above the map is theme-side chrome. */
body:has(.ue-nodes-app--surface-directory) .entry-header,
body:has(.ue-nodes-app--surface-directory) .page-header,
body:has(.ue-nodes-app--surface-my-nodes) .entry-header,
body:has(.ue-nodes-app--surface-my-nodes) .page-header {
  display: none !important;
}

body:has(.ue-nodes-app--surface-directory) .entry-title,
body:has(.ue-nodes-app--surface-directory) .page-title,
body:has(.ue-nodes-app--surface-my-nodes) .entry-title,
body:has(.ue-nodes-app--surface-my-nodes) .page-title {
  display: none !important;
}


/* =========================================================
   7) Desktop panel placement
   ========================================================= */

@media (min-width: 781px) {
  .ue-nodes-app__node-panel {
    top: 12px;
    right: 12px;
    width: min(420px, calc(100vw - 24px));
    padding: 12px;
    overflow: hidden;
    border-radius: 18px;
  }

  .ue-nodes-app__node-panel {
    top: 12px;
    right: 12px;
    left: auto;
    bottom: auto;
    width: min(420px, calc(100vw - 24px));
    max-width: min(420px, calc(100vw - 24px));
    height: auto;
    max-height: calc(100% - 24px);
    padding: 12px;
    overflow: hidden;
    border-radius: 18px;
  }

  .ue-nodes-app__node-panel:is([data-state="search"],
    [data-state="nodeDetail"],
    [data-state="registerLearn"],
    [data-state="registerNavigate"],
    [data-state="registerPlace"],
    [data-state="registerContext"],
    [data-state="registerName"],
    [data-state="registerEmail"],
    [data-state="registerReady"],
    [data-state="success"]) {
    bottom: auto;
    display: block;
    max-height: calc(100% - 24px);
  }

  .uen-strip__stage {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 12px;
  }
}


/* =========================================================
   8) Compact registration strip
   ========================================================= */

/* The strip keeps the panel compact: instruction on the left, primary
   action in the middle, zoom controls on the right. The narrow step
   navigation (< | >) lives inside the content area, not in a footer. */
.uen-strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #ffffff;
}

.uen-strip__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 108px;
  align-items: center;
  gap: 12px;
}

.uen-strip__info {
  min-width: 0;
  font-size: 12px;
  line-height: 1.2;
  opacity: 0.92;
}

.uen-strip__title,
.uen-strip__status {
  color: #ffffff;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.uen-strip__primary {
  display: flex;
  justify-content: center;
}

.uen-strip__primary .uen-panel__btn--primary {
  min-width: 150px;
  white-space: nowrap;
}

.uen-strip__controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-width: 108px;
}

.uen-strip__controls .uen-panel__btn {
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  padding: 10px 0;
}

.uen-strip__controls--empty {
  visibility: hidden;
}

.uen-strip__body {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 13px;
  line-height: 1.35;
}

.uen-strip__searchrow,
.uen-strip__fieldrow {
  display: block;
}

.uen-strip__check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: #ffffff;
  font-size: 12px;
  line-height: 1.3;
}

.uen-strip__check input {
  margin-top: 3px;
}

.uen-strip__statusLine {
  min-height: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.3;
}

.uen-strip__statusLine:empty {
  display: none;
}

.uen-strip__statusLine--warning {
  color: #ff7d7d;
  font-weight: 700;
}

/* Search-result height is slightly lower inside the registration strip
   so map visibility is preserved while navigating to the target area. */
.ue-nodes-app__node-panel:is([data-state="registerLearn"],
  [data-state="registerNavigate"]) .uen-panel__results {
  max-height: 26vh;
}

/* Side navigation is deliberately very narrow so the content area keeps
   most of the available width on both desktop and mobile. */
.uen-strip__stage {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 26px;
  align-items: stretch;
  gap: 10px;
}

.uen-strip__stageMain {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 10px;
}

.uen-strip__stageMain>* {
  min-width: 0;
}

.uen-strip__sideNav {
  width: 100%;
  min-width: 0;
  padding: 0;
  align-self: stretch;
  justify-self: stretch;
  border-radius: 10px;
  background: #bddab1;
  color: #0b0b0b;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
}

.uen-strip__sideNav:hover {
  opacity: 0.92;
}

/* =========================================================
   9) Mobile layout
   ========================================================= */

/* Mobile bottom-sheet behavior belongs only to the map surface. */
.ue-nodes-app--surface-map,
.ue-nodes-app--surface-map .ue-nodes-app__shell {
  height: calc(100svh - 80px);
  min-height: calc(100svh - 80px);
}

@supports not (height: 100svh) {

  .ue-nodes-app--surface-map,
  .ue-nodes-app--surface-map .ue-nodes-app__shell {
    height: calc(100vh - 80px);
    min-height: calc(100vh - 80px);
  }
}

.ue-nodes-app--surface-map .ue-nodes-app__overlay--top {
  top: 10px;
  left: 10px;
  right: 10px;
}

.ue-nodes-app--surface-map .ue-nodes-app__overlay--search {
  top: 62px;
  left: 10px;
  right: 10px;
}

@media (max-width: 780px) {
  .ue-nodes-app--surface-map .ue-nodes-app__search {
    width: calc(100vw - 20px);
    min-height: 44px;
    padding: 6px;
  }

  .ue-nodes-app--surface-map .ue-nodes-app__horizon {
    display: none;
  }

  .ue-nodes-app--surface-map .ue-nodes-app__node-panel {
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    padding: 10px;
    border-radius: 18px 18px 0 0;
  }

  .ue-nodes-app--surface-map .ue-nodes-app__node-panel::before {
    content: none !important;
    display: none !important;
  }

  /* Default sheet heights still apply only to map/search/detail flows. */
  .ue-nodes-app--surface-map .ue-nodes-app__node-panel[data-sheet="collapsed"] {
    height: 140px;
    max-height: 140px;
  }

  .ue-nodes-app--surface-map .ue-nodes-app__node-panel[data-sheet="half"] {
    height: 50svh;
  }

  @supports not (height: 50svh) {
    .ue-nodes-app--surface-map .ue-nodes-app__node-panel[data-sheet="half"] {
      height: 50vh;
    }
  }

  .ue-nodes-app--surface-map .ue-nodes-app__node-panel[data-sheet="full"] {
    height: 90svh;
    max-height: 90svh;
  }

  @supports not (height: 90svh) {
    .ue-nodes-app--surface-map .ue-nodes-app__node-panel[data-sheet="full"] {
      height: 90vh;
      max-height: 90vh;
    }
  }

  .ue-nodes-app--surface-map .ue-nodes-app__node-panel>.uen-drawer,
  .ue-nodes-app--surface-map .ue-nodes-app__node-panel>.uen-panel,
  .ue-nodes-app--surface-map .ue-nodes-app__node-panel>.uen-strip {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
  }

  .ue-nodes-app--surface-map .uen-drawer__body,
  .ue-nodes-app--surface-map .uen-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .ue-nodes-app--surface-map .leaflet-control-attribution {
    top: auto;
    right: auto;
    bottom: 120px;
    left: 8px;
    background: transparent;
    color: #ffffff;
    font-size: 11px;
  }

  .ue-nodes-app--surface-map .uen-panel__results {
    max-height: 28vh;
  }
}

/* Standalone mobile surfaces must remain ordinary page flow.
   This block must be mobile-only. If it is global, it overrides the
   desktop page-panel presentation for Directory / My Nodes. */
@media (max-width: 780px) {

  .ue-nodes-app--surface-directory,
  .ue-nodes-app--surface-my-nodes {
    height: auto;
    min-height: 0;
  }

  .ue-nodes-app--surface-directory .ue-nodes-page-shell,
  .ue-nodes-app--surface-my-nodes .ue-nodes-page-shell {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 28px;
  }

  .ue-nodes-app--surface-directory .ue-nodes-page-shell__mapSection,
  .ue-nodes-app--surface-my-nodes .ue-nodes-page-shell__mapSection,
  .ue-nodes-app--surface-directory .ue-nodes-page-shell__map,
  .ue-nodes-app--surface-my-nodes .ue-nodes-page-shell__map {
    margin-top: 0 !important;
  }

  .ue-nodes-app--surface-directory .ue-nodes-page-shell__surface,
  .ue-nodes-app--surface-my-nodes .ue-nodes-page-shell__surface {
    max-width: none;
    margin: 0;
    padding: 0 27px 28px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body:has(.ue-nodes-app--surface-directory) .entry-content> :first-child,
  body:has(.ue-nodes-app--surface-my-nodes) .entry-content> :first-child,
  body:has(.ue-nodes-app--surface-directory) .inside-article> :first-child,
  body:has(.ue-nodes-app--surface-my-nodes) .inside-article> :first-child {
    margin-top: 0 !important;
  }

  .ue-nodes-app--surface-directory .ue-nodes-app__node-panel,
  .ue-nodes-app--surface-my-nodes .ue-nodes-app__node-panel {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    display: block;
    width: 100%;
    max-width: none;
    height: auto !important;
    max-height: none !important;
    padding: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
  }

  .uen-strip__row {
    grid-template-columns: minmax(0, 1fr) auto 96px;
    gap: 10px;
  }

  .uen-strip__controls {
    min-width: 96px;
    gap: 8px;
  }

  .uen-strip__controls .uen-panel__btn {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    min-height: 40px;
  }

  .uen-strip__primary .uen-panel__btn--primary {
    min-width: 132px;
    max-width: 164px;
  }

  .uen-strip__title,
  .uen-strip__status,
  .uen-strip__info {
    font-size: 11px;
    line-height: 1.15;
  }

  .uen-strip__body {
    font-size: 12px;
    line-height: 1.32;
  }

  .uen-strip__stage {
    grid-template-columns: 22px minmax(0, 1fr) 22px;
    gap: 8px;
  }

  .uen-strip__sideNav {
    border-radius: 8px;
    font-size: 20px;
  }
}

/* Registration states ignore the generic fixed sheet heights.
     They grow with content up to a capped height, and the content column
     becomes the scroll container so the bottom of a step is never clipped. */
.ue-nodes-app__node-panel:is([data-state="registerLearn"],
  [data-state="registerNavigate"],
  [data-state="registerPlace"],
  [data-state="registerContext"],
  [data-state="registerName"],
  [data-state="registerEmail"],
  [data-state="registerReady"],
  [data-state="success"]) {
  height: auto;
  max-height: 60svh;
  overflow: hidden;
}

@supports not (height: 60svh) {

  .ue-nodes-app__node-panel:is([data-state="registerLearn"],
    [data-state="registerNavigate"],
    [data-state="registerPlace"],
    [data-state="registerContext"],
    [data-state="registerName"],
    [data-state="registerEmail"],
    [data-state="registerReady"],
    [data-state="success"]) {
    max-height: 60vh;
  }
}

.ue-nodes-app__node-panel:is([data-state="registerLearn"],
  [data-state="registerNavigate"],
  [data-state="registerPlace"],
  [data-state="registerContext"],
  [data-state="registerName"],
  [data-state="registerEmail"],
  [data-state="registerReady"],
  [data-state="success"])>.uen-strip {
  min-height: 0;
  overflow: hidden;
}

.uen-strip__stageMain {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
}
}

/* =========================================================
   6) Page-level surfaces (v0.4.3 transitional split)
   - Nodes Directory
   - My Nodes
   ========================================================= */

.ue-nodes-page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 24px;
}

.ue-nodes-page-shell__mapSection {
  width: 100%;
  margin: 0 0 14px;
}

.ue-nodes-page-shell__map {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: 360px;
  border-radius: 0;
  overflow: hidden;
  background: #dfe7df;
  box-shadow: none;
}

.ue-nodes-page-shell__surface {
  min-height: 0;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 33px;
  border-radius: 0 0 18px 18px;
  background: rgba(17, 17, 17, 0.92);
  color: #ffffff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.ue-nodes-app--surface-directory,
.ue-nodes-app--surface-my-nodes {
  width: 100%;
}

/* ---------------------------------------------------------
   Shared surface primitives
   --------------------------------------------------------- */

.uen-directory,
.uen-my-nodes {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.uen-directory__head,
.uen-my-nodes__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.uen-directory__intro,
.uen-my-nodes__intro {
  min-width: 0;
}

.uen-directory__title,
.uen-my-nodes__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  color: #ffffff;
}

.uen-directory__subtitle,
.uen-my-nodes__subtitle {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.74);
}

.uen-directory__headActions,
.uen-my-nodes__headActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.uen-directory__btn,
.uen-my-nodes__btn,
button.uen-directory__btn,
button.uen-my-nodes__btn,
a.uen-directory__btn,
a.uen-my-nodes__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.uen-directory__btn:hover,
.uen-my-nodes__btn:hover {
  opacity: 0.92;
}

.uen-directory__btn:disabled,
.uen-my-nodes__btn:disabled {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.46) !important;
  cursor: not-allowed;
  opacity: 1;
}

.uen-directory__list,
.uen-my-nodes__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 861px) {

  .uen-directory__list,
  .uen-my-nodes__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (min-width: 1320px) {

  .uen-directory__list,
  .uen-my-nodes__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.uen-directory__card,
.uen-my-nodes__card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.uen-directory__cardHead,
.uen-my-nodes__cardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.uen-directory__cardIdentity,
.uen-my-nodes__cardIdentity {
  min-width: 0;
}

.uen-directory__cardTitle,
.uen-my-nodes__cardTitle {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 800;
  color: #ffffff;
}

.uen-directory__cardGeo,
.uen-my-nodes__cardGeo {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.74);
}

.uen-directory__cardStage,
.uen-my-nodes__cardRelation {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.78);
}

.uen-directory__cardActions,
.uen-my-nodes__cardActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.uen-directory .uen-empty,
.uen-my-nodes .uen-empty {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  opacity: 0.88;
}

/* ---------------------------------------------------------
   Directory-specific additions
   --------------------------------------------------------- */

.uen-directory__cardStage {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

/* ---------------------------------------------------------
   My Nodes-specific additions
   --------------------------------------------------------- */

.uen-my-nodes__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.uen-my-nodes__filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
}

.uen-my-nodes__filter:hover {
  background: rgba(255, 255, 255, 0.08);
}

.uen-my-nodes__filter.is-active {
  background: #bddab1;
  color: #0b0b0b;
  border-color: transparent;
}

.uen-my-nodes__chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.uen-my-nodes__chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.2;
}

.uen-my-nodes__followUp {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.uen-my-nodes__comms {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.76;
}

.uen-my-nodes__updated {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.62;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 860px) {
  .ue-nodes-page-shell {
    padding: 14px 12px 22px;
  }

  .ue-nodes-page-shell__map {
    height: min(280px, 33svh);
  }

  .ue-nodes-page-shell__title {
    font-size: 24px;
  }

  .uen-directory__head,
  .uen-my-nodes__head,
  .uen-directory__cardHead,
  .uen-my-nodes__cardHead {
    flex-direction: column;
    align-items: flex-start;
  }

  .uen-directory__cardStage,
  .uen-my-nodes__cardRelation {
    white-space: normal;
  }
}
