/* App overrides for the ported MapLibre layer panel. Loaded LAST so it beats
   both places.css and the app's global form styles (input{width:100%}, etc.). */

.ssc-map-panel {
  background: rgba(18, 20, 42, .94);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(2, 6, 16, .45);
  color: var(--text);
}

/* Collapsed by default: only the toggle icon shows. */
.ssc-map-panel__toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: transparent; border: 0;
  color: var(--text); cursor: pointer;
}
.ssc-map-panel__toggle:hover { color: var(--accent-strong); }
.ssc-map-panel.is-open .ssc-map-panel__toggle {
  width: 100%; justify-content: flex-end; padding-right: 10px;
  border-bottom: 1px solid var(--border);
}
.ssc-map-panel__body { display: none; padding: 12px; width: 216px; }
.ssc-map-panel.is-open .ssc-map-panel__body { display: block; }

.ssc-map-panel .ssc-map-basemap {
  width: 100%; margin: 0 0 10px; padding: 7px 10px; font-size: 13px;
  background: var(--field-bg); color: var(--text); border: 1px solid var(--field-border); border-radius: 8px;
}
.ssc-map-panel .ssc-map-layers { display: flex; flex-direction: column; gap: 1px; }
.ssc-map-panel .ssc-map-layer {
  display: flex; align-items: center; gap: 9px; width: auto; margin: 0;
  padding: 6px 4px; font-family: var(--font-body); font-weight: 400; font-size: 13px;
  color: var(--text); cursor: pointer; line-height: 1.2;
}
.ssc-map-panel .ssc-map-layer input[type="checkbox"] {
  width: 16px; height: 16px; min-width: 16px; flex: none; margin: 0; padding: 0;
  accent-color: var(--accent);
}
.ssc-map-panel .ssc-map-aurora-status {
  font-size: 11.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.45;
  border-top: 1px solid var(--border); padding-top: 8px;
}
.ssc-map-panel .ssc-map-lp-legend {
  display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--text-muted); margin: 4px 2px 2px;
}
.ssc-map-panel .ssc-map-lp-legend i { flex: 1; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #0b1e13, #f2e9a0); }

/* Flush alignment: drop the engine panels' card chrome so every section header
   and content block shares the same left/right edge as the page container. */
.ssc-outlook, .ssc-panel { background: transparent; border: 0; padding: 0; margin: var(--space-6) 0; }
.ssc-plan { margin: var(--space-6) 0; }
.sky-section { margin-top: var(--space-6); }

/* Hidden by request: the "Tonight's best smart-telescope targets" block
   (the targets list + its heading), leaving the stat cards and outlook intact. */
.ssc-targets, .ssc-panel__heading:has(+ .ssc-targets) { display: none; }

/* Consistent section headers across the sky page (location, imaging plan, events) */
.sky-active__name, .ssc-plan__head h2, .ssc-hub__h {
  font-family: var(--font-display); font-weight: var(--weight-bold);
  font-size: var(--text-2xl); line-height: 1.1; margin: 0;
}
.sky-active { margin: var(--space-5) 0 var(--space-4); }
.sky-active .eyebrow { margin-bottom: 3px; }
.ssc-plan__head, .ssc-hub__h { margin-bottom: var(--space-4); }

/* Events lowered from a tab into its own section */
.sky-section { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--border); }

/* Saved-place popup coordinates */
.ssc-pop__coords { color: var(--text-faint); font-size: 11.5px; font-variant-numeric: tabular-nums; margin: 2px 0 0; }

/* Branded "Save this place" modal */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4, 6, 16, .72); backdrop-filter: blur(3px); }
.modal__card { position: relative; z-index: 1; width: min(440px, 100%); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: 0 18px 50px rgba(2, 6, 16, .6);
  animation: sscModalIn .18s cubic-bezier(.22,.8,.36,1); }
@keyframes sscModalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.modal__head h3 { margin: 0; font-family: var(--font-display); font-size: 1.25rem; }
.modal__sub { margin: 0 0 18px; }
.modal__coords { margin: 8px 0 22px; font-variant-numeric: tabular-nums; }
.modal__actions { display: flex; justify-content: flex-end; gap: 12px; }

/* Toast */
.ssc-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 18px; font-size: .875rem; box-shadow: 0 10px 30px rgba(2, 6, 16, .5); opacity: 0;
  transition: opacity .3s, transform .3s; z-index: 120; }
.ssc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
