/* RPG Media Library — Layout geometry only. No Bootstrap overrides. */

/* ─── App shell ──────────────────────────────────────────── */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-outlet {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1.25rem;
  /* Extra bottom padding so content is not obscured by the audio bar */
  padding-bottom: 5rem;
}

/* ─── Audio Queue Bar ────────────────────────────────────── */
.audio-queue-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

/* ─── Browse table ───────────────────────────────────────── */
.asset-row td {
  vertical-align: middle;
}

/* ─── Asset Tile (thumbnail grid) ───────────────────────── */
.asset-tile {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bs-secondary-bg);
  border-radius: var(--bs-border-radius);
}

.asset-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Scan progress modal ────────────────────────────────── */
.scan-stats {
  font-variant-numeric: tabular-nums;
}

/* ─── Adjacency editor grid ──────────────────────────────── */
.adjacency-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 0.25rem;
  max-width: 28rem;
}

.adj-n  { grid-column: 2; grid-row: 1; }
.adj-w  { grid-column: 1; grid-row: 2; }
.adj-c  { grid-column: 2; grid-row: 2; }
.adj-e  { grid-column: 3; grid-row: 2; }
.adj-s  { grid-column: 2; grid-row: 3; }

/* ─── Story detail scene thumbnail ──────────────────────── */
.scene-thumb {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border-radius: var(--bs-border-radius);
  background: var(--bs-secondary-bg);
}

/* ─── Display page (display.html fullscreen) ─────────────── */
.display-bg {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(120rem 80rem at 50% -10%, rgba(30, 66, 106, 0.55), rgba(4, 8, 18, 0.96)),
    linear-gradient(160deg, #091225 0%, #04070f 55%, #02040a 100%);
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.display-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.02) 0 2px,
      transparent 2px 22px
    );
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.display-bg > * {
  position: relative;
  z-index: 1;
}

.display-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.display-layer.is-visible {
  opacity: 1;
}

.display-bg img,
.display-bg video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.display-layer iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.display-hero {
  width: min(90vw, 42rem);
  padding: 2.25rem 2rem;
  border: 1px solid rgba(130, 176, 232, 0.24);
  border-radius: 1.1rem;
  background: rgba(5, 11, 24, 0.72);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.35);
  text-align: center;
  color: #dce7f8;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.display-hero-mark {
  width: 3.75rem;
  height: 3.75rem;
  margin: 0 auto 1rem;
  border-radius: 999px;
  border: 1px solid rgba(155, 205, 255, 0.45);
  background: radial-gradient(circle at 30% 25%, #5da2e2 0%, #23456f 70%, #183351 100%);
  color: #f2f8ff;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.display-hero-brand {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: #f4f8ff;
}

.display-hero-role {
  margin: 0.5rem 0 0;
  color: #9fc0e1;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.display-hero-status {
  margin: 1.25rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: #dde9fb;
}

.display-hero-hint {
  margin: 0.45rem auto 0;
  max-width: 32rem;
  color: #8ea2bd;
  font-size: 0.92rem;
}

body[data-display-type="map"] .display-hero-role {
  color: #8bd0bb;
}

body[data-display-type="bg"] .display-hero-role {
  color: #ddc28d;
}

/* ─── Misc ───────────────────────────────────────────────── */
.min-w-0 { min-width: 0; }

.form-range-sm {
  height: 0.5rem;
}

/* Tag editor autocomplete list */
.tag-suggestions {
  position: absolute;
  z-index: 1055;
  min-width: 12rem;
}
