/* ============================================================
   Presentations — library page and presenting view.
   Loads on top of lrf-theme.css (shared brand chrome).
   ============================================================ */

/* ---------- Library ---------- */
.deck-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.deck-card {
  display: flex;
  flex-direction: column;
  background: var(--lrf-white);
  border: 1px solid var(--lrf-line);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.deck-card:hover {
  border-color: var(--lrf-ink);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.deck-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--lrf-ink);
  overflow: hidden;
  color: #fff;
}
.deck-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.deck-card:hover .deck-poster img { transform: scale(1.02); }
.deck-poster .placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding: 1.25rem;
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15;
  border-left: 6px solid var(--lrf-pink);
}
.deck-play {
  position: absolute; left: 1rem; bottom: 1rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--lrf-pink); color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 0.45rem 0.8rem; border-radius: var(--r);
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s;
}
.deck-play svg { width: 12px; height: 12px; }
.deck-poster:hover .deck-play,
.deck-poster:focus-visible .deck-play { opacity: 1; transform: none; }

.deck-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
}
.deck-tag {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 700; color: var(--lrf-pink-text); margin-bottom: 0.4rem;
}
.deck-body h3 {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.2; margin-bottom: 0.5rem;
}
.deck-body h3 a { color: inherit; }
.deck-body h3 a:hover { color: var(--lrf-pink-text); }
.deck-body p {
  font-size: 14px; line-height: 1.55; color: var(--lrf-ink-soft);
  margin-bottom: 1rem;
}
.deck-meta {
  margin-top: auto; margin-bottom: 1rem;
  font-size: 12px; color: var(--lrf-muted);
  font-variant-numeric: tabular-nums;
}
.deck-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.deck-actions .btn svg { width: 14px; height: 14px; }

.empty {
  padding: 3rem 1.5rem;
  border: 1px dashed var(--lrf-line);
  border-radius: var(--r);
  text-align: center;
  color: var(--lrf-muted);
}

/* How-to notes under the grid */
.howto {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--lrf-line);
}
.howto h3 { font-size: 15px; font-weight: 800; margin-bottom: 0.4rem; }
.howto p { font-size: 14px; line-height: 1.6; color: var(--lrf-ink-soft); }
kbd {
  font-family: inherit; font-size: 12px; font-weight: 700;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--lrf-line); border-bottom-width: 2px;
  border-radius: 3px; background: var(--lrf-white);
}

@media (max-width: 1080px) {
  .deck-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .howto { grid-template-columns: 1fr; gap: 1.25rem; }
}
@media (max-width: 640px) {
  .deck-grid { grid-template-columns: 1fr; }
}

/* ---------- Presenting view ---------- */
/* The deck fills the window; a toolbar slides down from the top edge when
   the pointer goes near it, and stays out of the way otherwise. */
body.viewer {
  height: 100vh;
  overflow: hidden;
  background: #000;
}
#deck {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  border: 0; display: block;
  background: #000;
}

.pv-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: rgba(10, 10, 20, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.pv-bar.show,
.pv-bar:focus-within { transform: none; opacity: 1; }

.pv-title {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.8);
  padding-left: 0.75rem; margin-left: 0.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Toolbar buttons on the compact scale (36px, like .btn-small); 44px on
   phones, where they are icon-only. */
.pv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: var(--control-h-sm);
  font: 700 13px/1.2 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #fff; background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--r);
  padding: 0.4rem 0.75rem;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pv-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.pv-btn:hover { background: #fff; color: var(--lrf-ink); border-color: #fff; }
.pv-btn.pv-plain { border-color: transparent; }
.pv-btn.pv-plain:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: transparent; }
.pv-btn.pv-primary { background: var(--lrf-pink); border-color: var(--lrf-pink); }
.pv-btn.pv-primary:hover { background: var(--lrf-pink-dark); border-color: var(--lrf-pink-dark); color: #fff; }
.pv-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pv-btn[hidden] { display: none; }

.pv-noscript {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem; text-align: center;
  background: var(--lrf-bg); color: var(--lrf-ink);
}

@media (max-width: 640px) {
  .pv-title { display: none; }
  .pv-bar { justify-content: space-between; }
  /* Icon only, but the label stays for screen readers. */
  .pv-btn .lbl {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .pv-btn { min-width: 44px; min-height: 44px; padding: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .deck-card, .deck-poster img, .deck-play, .pv-bar { transition: none; }
  .deck-card:hover { transform: none; }
  .deck-card:hover .deck-poster img { transform: none; }
}
