/* The Practice Explorer's split pane (?view=3, NTC work #274): a full-height
   map on the right, the filter rail and the list of what the map shows on the
   left, a profile drawer over the list. Tokens come from view2.css (the pane
   sits inside .view2). The nav is the layout's sticky h-16. */
.pane {
  --pane-nav: 64px;
  display: grid; grid-template-columns: minmax(380px, 42%) minmax(0, 1fr);
  height: calc(100vh - var(--pane-nav)); min-height: 480px; background: var(--bg);
}
.pane-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; background: #fff; border-right: 1px solid var(--border); }
.pane-rail { flex: none; padding: 10px 14px 8px; border-bottom: 1px solid var(--border); }
.pane-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
.pane-title b { font-family: 'DM Sans', sans-serif; font-size: 16px; color: var(--navy); letter-spacing: -0.01em; }
.pane-link { font-size: 12.5px; color: var(--navy); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

/* Go-to box with its suggestion list. */
.pane-goto { position: relative; margin: 0 0 8px; }
.pane-goto input[type=search] { width: 100%; min-width: 0; box-sizing: border-box; font-family: 'DM Sans', sans-serif; font-size: 13px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); }
.pane-goto input[type=search]:focus { outline: 2px solid #2F6BFF; outline-offset: 1px; border-color: #2F6BFF; }
.pane-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 42, 74, 0.14); }
.pane-suggestion { display: block; width: 100%; text-align: left; font-family: 'DM Sans', sans-serif; font-size: 13px; padding: 7px 9px; border: none; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; }
.pane-suggestion:hover, .pane-suggestion:focus { background: #eef4fb; outline: none; }

/* Compact filter controls: the rail is 40 percent of the window. */
.pane .controls { gap: 6px; margin: 6px 0 0; }
.pane .controls input, .pane .controls select { font-size: 12.5px; padding: 6px 8px; max-width: 100%; }
.pane .controls input[type=search] { min-width: 0; flex: 1 1 140px; }
.pane .controls select { flex: 1 1 130px; min-width: 0; }
.pane .controls .chip { font-size: 12px; padding: 4px 9px; }
.pane .controls .btn { font-size: 12.5px; padding: 6px 12px; }
.pane-more { margin: 6px 0 0; }
.pane-more summary { font-size: 12.5px; color: var(--navy); cursor: pointer; user-select: none; list-style: none; display: inline-flex; align-items: center; gap: 5px; }
.pane-more summary::-webkit-details-marker { display: none; }
.pane-more summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--navy); border-bottom: 1.5px solid var(--navy); transform: rotate(-45deg); transition: transform .15s; }
.pane-more[open] summary::before { transform: rotate(45deg); }
.pane-follow { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--slate); margin-left: auto; }
.pane-follow input { margin: 0; }

/* The list of what the map shows. */
.pane-list { flex: 1 1 auto; min-height: 0; overflow: auto; }
.pane-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--cream); font-size: 12.5px; color: var(--muted); }
.pane-count { color: var(--navy); font-weight: 600; }
.pane-unmapped { color: var(--muted); }
.pane-list-head .btn { font-size: 12px; padding: 4px 10px; }
.pane-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.pane-row:hover, .pane-row.is-hover { background: #eef4fb; }
.pane-row.is-selected { background: #e5efff; box-shadow: inset 3px 0 0 #2F6BFF; }
.pane-row:focus-visible { outline: 2px solid #2F6BFF; outline-offset: -2px; }
.pane-row .nm { font-weight: 600; color: var(--navy); font-size: 13.5px; line-height: 1.3; }
.pane-row .meta { grid-column: 1; font-size: 12px; color: var(--slate); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.pane-row .right { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pane-row .prov { font-family: 'Space Mono', monospace; font-size: 12px; color: var(--slate); white-space: nowrap; }
.pane-empty { padding: 34px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.pane-empty .btn { margin-top: 10px; }
.pane .pager { padding: 10px 14px; }

/* Profile drawer over the list: the modal's template, flowing instead of
   capped at 90vh. */
.pane-drawer { position: absolute; inset: 0; z-index: 3; overflow: auto; background: #fff; }
.pane-drawer[hidden] { display: none; }
.pane-drawer-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #fff; border-bottom: 1px solid var(--border); }
.pane-drawer-bar .btn { font-size: 12.5px; padding: 5px 10px; }
.pane-drawer turbo-frame { display: block; }
.pane .modal-bd { max-height: none; overflow: visible; }

/* Map side. */
.pane-map { position: relative; min-width: 0; min-height: 0; }
/* MapLibre gives its container .maplibregl-map { position: relative }, which
   would beat a single-class absolute rule; size the canvas box outright. */
.pane .pane-map-canvas { width: 100%; height: 100%; }
.pane-map-bar { position: absolute; left: 10px; bottom: 28px; z-index: 2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pane-legend { display: flex; gap: 10px; align-items: center; padding: 5px 10px; background: rgba(255, 255, 255, 0.92); border: 1px solid #e3e7f0; border-radius: 999px; font-size: 11.5px; color: #334155; }
.pane-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.pane-search-area { font-family: 'DM Sans', sans-serif; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--navy); background: var(--navy); color: #fff; cursor: pointer; box-shadow: 0 2px 8px rgba(15, 42, 74, 0.2); }
.pane-search-area[hidden] { display: none; }

/* Phone: one side at a time, a Map | List switch, the drawer as a bottom sheet. */
.pane-switch { display: none; }
@media (max-width: 767px) {
  .pane { grid-template-columns: 1fr; grid-template-rows: 1fr; height: calc(100dvh - var(--pane-nav)); }
  .pane-side, .pane-map { grid-area: 1 / 1; }
  .pane.pane--map .pane-side { display: none; }
  .pane:not(.pane--map) .pane-map { display: none; }
  .pane-switch { display: flex; position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 20; background: var(--navy); border-radius: 999px; padding: 3px; box-shadow: 0 6px 20px rgba(15, 42, 74, 0.3); }
  .pane-switch button { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600; padding: 7px 16px; border: none; border-radius: 999px; background: transparent; color: #cfdae6; cursor: pointer; }
  .pane-switch button.on { background: #fff; color: var(--navy); }
  .pane-drawer { position: fixed; inset: auto 0 0 0; top: auto; height: 72dvh; border-radius: 14px 14px 0 0; box-shadow: 0 -8px 30px rgba(15, 42, 74, 0.25); }
  .pane .controls select { flex-basis: 100%; }
  .pane-map-bar { bottom: 68px; } /* above the List | Map switch */
}
