/* Andrews Forest Real-time Data Explorer. Served from www/ by Shiny. */
:root { --tile: 440px; }
body { font-size: 15px; }
.gallery-section { margin: 4px 0 22px; }
.gallery-section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 10px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.gallery-section h3 .count { color: #5C635E; font-weight: 400; font-size: .95rem; }
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--tile), 100%), 1fr));
  gap: 14px;
}
.tile { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; background: #fff;
        border: 1px solid #DADDD8; border-radius: 8px; overflow: hidden; transition: box-shadow .12s, border-color .12s; }
.tile:hover, .tile:focus-visible { border-color: #2A78D6; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.tile:focus-visible { outline: 2px solid #2A78D6; outline-offset: 2px; }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; background: #fff; }
.tile .missing { aspect-ratio: 4 / 3; display: grid; place-items: center; color: #5C635E; }
.tile-foot { padding: 6px 10px; color: #5C635E; font-size: .85rem; display: flex; justify-content: space-between;
             align-items: center; gap: 8px; border-top: 1px solid #ECEEEA; }
.tile-file { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tile-pills { display: flex; gap: 4px; flex-shrink: 0; }
.pill { font-size: .8rem; padding: 1px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid; }
.pill.ok { color: #1E6B3A; border-color: #9CCBAA; background: #EEF8F1; }
.pill.stale { color: #8A4B00; border-color: #E6BE85; background: #FFF6E8; }
.pill.error { color: #B42318; border-color: #F0A9A3; background: #FEF1F0; }
.pill.internal { color: #3E4A44; border-color: #C9CEC9; background: #F4F5F3; }
.summary { color: #3E4A44; font-size: .9rem; line-height: 1.5; }
.schedule-banner { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding: 8px 16px;
                   background: #EEF4FB; border-bottom: 1px solid #C9DCF1; color: #1F2421; font-size: .95rem; }
.schedule-banner strong { color: #1C5CAB; }
.schedule-banner .muted { color: #5C635E; }
.explore-meta { font-size: .9rem; color: #3E4A44; }
.explore-meta pre {
  font-size: .8rem;
  white-space: pre-wrap;
  background: #F6F7F5;
  padding: 6px 8px;
  border-radius: 4px;
}
.data-panel { border: 1px solid #DADDD8; border-radius: 6px; padding: 6px 10px; }
.data-panel > summary { font-weight: 600; }
.code-block { font-size: .82rem; background: #F6F7F5; border: 1px solid #E3E5E1; border-radius: 4px;
              padding: 10px 12px; white-space: pre; overflow-x: auto; max-height: 40vh; }
/* Opening another plot: hide the previous chart (the busy spinner stays) until the new one arrives. */
#explore_plot.rt-switching > * { visibility: hidden; }
.read-only-note { color: #5C635E; background: #F4F5F3; border: 1px solid #E3E5E1; border-radius: 4px; padding: 6px 8px; }
.pill.partial { color: #8A4B00; border-color: #E6BE85; background: #FFF6E8; }
.line-status ul { margin-bottom: .4rem; padding-left: 1.1rem; }
.usage-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.usage-tile { border: 1px solid #DADDD8; border-radius: 8px; padding: 8px 14px; min-width: 130px; background: #fff;
              color: #3E4A44; font-size: .85rem; }
.usage-tile .n { font-size: 1.5rem; font-weight: 600; color: #1F2421; }
.usage-table { font-size: .85rem; }
/* Single-choice pickers in the sidebars (e.g. Compare: Trace A / Trace B): long names end in an
   ellipsis instead of running under the dropdown arrow; the open list still shows them in full. */
.bslib-sidebar-layout .selectize-control.single .selectize-input { padding-right: 2rem; }
.bslib-sidebar-layout .selectize-control.single .selectize-input > .item {
  display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* "Live version" link in share copies, "← Andrews Forest" back to the website (rshared/R/live_link.R). */
.live-link, .home-link { font-weight: 600; white-space: nowrap; }

/* Public / tech view: the server sets html.rt-tech (www/app.js) and refuses tech actions itself. */
html:not(.rt-tech) .tech-only, html.rt-tech .public-only { display: none !important; }
html:not(.rt-tech) .tile-file { visibility: hidden; }
.tech-link { font-size: .85rem; white-space: nowrap; opacity: .75; }
.tech-badge { margin-left: .5rem; padding: .1rem .45rem; border-radius: .25rem; font-size: .7rem;
              font-weight: 600; vertical-align: middle; background: #fde68a; color: #78350f; }
