/*
 * Full-screen and floating overlays: the loading screen, the guided tour caption, the landmark
 * diorama view. Colours come from the tokens in map.css.
 */
/* Loading screen (js/loading-screen.js): the map blurred behind a card until the opening view is built. */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
  background: color-mix(in srgb, var(--paper) 45%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: opacity 450ms ease;
}
.loading-screen.is-done { opacity: 0; pointer-events: none; }
.loading-card { width: min(300px, 100%); padding: 18px 20px 20px; text-align: center; }
.loading-title { margin: 0; font: 700 34px/1 var(--font-display); }
.loading-card .telugu { margin: 6px 0 14px; font: 500 17px/1.4 var(--font-telugu); color: var(--muted); }
.loading-label { margin: 0 0 8px; font: 500 12px/1.4 var(--font-mono); color: var(--accent); }
.loading-track { height: 10px; border: 2px solid var(--line); background: var(--paper); }
.loading-bar { width: 0; height: 100%; background: var(--accent); transition: width 200ms linear; }

/* "Link copied" note above the toolbar (js/view-link.js); shows the link itself when it can't be copied. */
.share-toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 7;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 8px 14px;
  font: 600 13px/1.3 var(--font-display);
  overflow-wrap: anywhere;
  user-select: all;
}

/* Guided tour caption: a card along the top centre (top of the screen on phones). */
.tour-caption {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, calc(100vw - 32px));
  padding: 12px 16px;
  z-index: 5;
}
.tour-caption h2 { margin: 0 0 4px; font: 700 22px/1.1 var(--font-display); }
.tour-caption p { margin: 0 0 8px; font-size: 14px; }
.tour-progress { font: 500 11px/1.4 var(--font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.tour-actions, .diorama-times { display: flex; gap: 8px; flex-wrap: wrap; }
.tour-actions button, .diorama-times button {
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 7px 12px;
  font: 600 13px/1 var(--font-display);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--line);
}
.diorama-times button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* Diorama view: full screen over the map, the sky set by data-time. */
.diorama { position: fixed; inset: 0; z-index: 10; background: linear-gradient(180deg, var(--sky-day-top), var(--sky-day-bottom)); }
.diorama[data-time="dusk"] { background: linear-gradient(180deg, var(--sky-dusk-top), var(--sky-dusk-middle) 55%, var(--sky-dusk-bottom)); }
.diorama[data-time="night"] { background: linear-gradient(180deg, var(--sky-night-top), var(--sky-night-bottom)); }
.diorama-night { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.diorama:not([data-time="night"]) .diorama-night { display: none; }
.diorama-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.diorama-bar {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 8px 12px;
  max-width: calc(100vw - 32px);
}
.diorama-bar h2 { margin: 0; font: 700 18px/1.1 var(--font-display); }
.diorama-close {
  width: 30px;
  height: 30px;
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: 700 16px/1 var(--font-display);
  cursor: pointer;
}
