/* Lochaber Astro - Sky Map page */

/* The home page's rotating photos, fixed behind the whole page and dimmed */
.hero-slides.page-bg { position: fixed; inset: 0; z-index: -1; }
.page-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,.62) 45%, rgba(0,0,0,.8) 100%);
}
.skymap { padding: 0 var(--gutter) 64px; }

.sm-tabs { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); margin-bottom: 18px; }
.sm-tab {
  font: 400 .8rem/1 var(--display); letter-spacing: .04em; color: var(--text);
  background: transparent; border: 0; padding: 12px 18px; cursor: pointer;
}
.sm-tab + .sm-tab { border-left: 1px solid var(--line-2); }
.sm-tab[aria-selected="true"] { background: var(--white); color: var(--black); }
.sm-tab:not([aria-selected="true"]):hover { color: var(--white); background: var(--panel-2); }

.sm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.sm-panel[hidden] { display: none; }

.sm-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 12px; }
.sm-field { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.sm-field input[type="date"] {
  font: inherit; color: var(--white); background: var(--panel); color-scheme: dark;
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 6px 8px;
}
.sm-field-time { flex: 1 1 220px; }
.sm-field-time input { flex: 1; accent-color: var(--white); min-width: 120px; }
.sm-time-out { flex-basis: 100%; margin: 0; color: var(--white); font-size: .95rem; }

.sm-btn {
  font: 500 .9rem/1 var(--body); color: var(--white); background: var(--panel-2);
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 8px 14px; cursor: pointer;
}
.sm-btn:hover { background: var(--line-2); }

.sm-chart { position: relative; }
.sm-chart canvas { display: block; margin: 0 auto; touch-action: none; border-radius: var(--radius); }
#sm-pulse { position: absolute; top: 0; left: 50%; transform: translateX(-50%); pointer-events: none; }
.sm-zoom { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
.sm-zoom .sm-btn { width: 38px; height: 38px; padding: 0; font-size: 1.15rem; background: rgba(32,32,32,.85); }

.sm-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 12px 0 4px; font-size: .9rem; }
.sm-options input { accent-color: var(--white); margin: 0 4px 0 0; vertical-align: -2px; }
.sm-key { color: var(--muted); }
.sm-key i { display: inline-block; width: 11px; height: 11px; border: 2px solid var(--kind); border-radius: 50%; margin: 0 5px 0 10px; vertical-align: -1px; }
.sm-key i:first-child { margin-left: 0; }
.sm-note { color: var(--white); font-size: .92rem; margin: 6px 0 0; min-height: 0; }
.sm-note:empty { display: none; }
.sm-help { color: var(--muted); font-size: .88rem; margin: 10px 0 0; max-width: 75ch; }

.sm-aladin { position: relative; width: 100%; height: min(78vh, 760px); min-height: 380px; background: #050505; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sm-aladin.is-ready .sm-loading { display: none; }
.sm-loading, .sm-error { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; color: var(--muted); }

/* Object list */
.sm-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; padding-right: 4px; }
.sm-side-head { font-family: var(--display); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text); margin: 0 0 8px; }
.sm-group + .sm-group { margin-top: 18px; }
.sm-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sm-group summary::-webkit-details-marker { display: none; }
.sm-group summary::before { content: ""; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .2s; }
.sm-group[open] summary::before { transform: rotate(45deg); }
.sm-group summary .sm-side-head { margin: 0; }
.sm-group summary:hover .sm-side-head { color: var(--white); }
.sm-count { color: var(--muted); }
.sm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sm-item {
  width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--kind);
  border-radius: var(--radius); padding: 8px 10px; display: grid; gap: 1px;
}
.sm-item:hover, .is-selected .sm-item { background: var(--panel-2); border-color: var(--line-2); border-left-color: var(--kind); }
.sm-item-label { color: var(--white); font-weight: 500; }
.sm-item-name { font-size: .86rem; }
.sm-item-where { font-size: .8rem; color: var(--muted); }
.sm-item-where:empty { display: none; }
#sm-down .sm-item { opacity: .7; }
.is-photo #sm-down .sm-item { opacity: 1; }

/* Information card */
.sm-info {
  position: fixed; z-index: 30; right: var(--gutter); top: 88px;
  width: min(340px, calc(100vw - 2 * var(--gutter))); max-height: calc(100vh - 108px); overflow: auto;
  background: rgba(16,16,16,.97); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 20px 20px 18px; box-shadow: 0 12px 40px rgba(0,0,0,.6);
}
.sm-info[hidden] { display: none; }
.sm-info-close {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; padding: 8px;
  background: transparent; border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer;
}
.sm-info-close svg { width: 100%; height: 100%; stroke: var(--white); stroke-width: 2; fill: none; }
.sm-info-title { font-size: 1.2rem; margin: 0 44px 6px 0; }
.sm-info-sub { margin: 0; font-size: .9rem; }
.sm-info-where { margin: 2px 0 0; font-size: .9rem; color: var(--white); }
.sm-info-where:empty { display: none; }
.sm-info-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; margin: 16px 0; }
.sm-thumb { text-decoration: none; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.sm-thumb img { width: 100%; height: auto; object-fit: cover; background: var(--panel-2); border-radius: var(--radius); margin-bottom: 5px; }
.sm-thumb:hover img { opacity: .85; }
.sm-thumb:only-child { grid-column: 1 / -1; }
.sm-info-switch { width: 100%; }

.sm-missing { color: var(--muted); font-size: .88rem; margin: 24px 0 0; }
.sm-missing[hidden] { display: none; }
.sm-credits { color: var(--muted); font-size: .82rem; margin: 28px 0 0; max-width: 90ch; }
.sm-credits a { color: var(--text); }

@media (max-width: 1000px) {
  .sm-layout { grid-template-columns: 1fr; }
  .sm-side { position: static; max-height: none; overflow: visible; }
  .sm-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-height: 70vh; overflow: auto; }
}
@media (max-width: 700px) {
  .sm-info { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 72vh; border-radius: 12px 12px 0 0; }
  .sm-tab { padding: 11px 13px; font-size: .72rem; }
  .sm-zoom .sm-btn { width: 34px; height: 34px; }
}
