/* ──────────────────────────────────────────────────────────────────────────
   video-select.css — fullscreen + footage-picker affordances on use-case
   videos. Minimal chrome: a ⛶ button that appears only on hover; a
   "⇄ Change video" button only in edit mode. No unmute button — viewers
   unmute via the player's own speaker icon. Picker = PMCR footage library.
   Visual tokens from base.css.
   ────────────────────────────────────────────────────────────────────────── */

/* ⛶ fullscreen — hover-reveal, top-right, unobtrusive */
.uc-fs {
  position: absolute; z-index: 4; top: 10px; right: 10px;
  width: 34px; height: 34px; border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(10, 20, 30, 0.55); color: #fff; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s ease;
}
.uc-video:hover .uc-fs { opacity: 1; }
.uc-fs:hover { background: rgba(10, 20, 30, 0.8); }

/* ⇄ Change video — edit mode only, top-left, hover-reveal */
.uc-change {
  position: absolute; z-index: 4; top: 10px; left: 10px; display: none;
  border: 0; border-radius: 8px; cursor: pointer; padding: 7px 11px;
  background: var(--sm-blue); color: #fff; font: 500 12px/1 'Roboto', sans-serif;
}
body.editing .uc-video:hover .uc-change { display: inline-flex; }
body:not(.editing) .uc-change { display: none !important; }

/* Fullscreen: the .uc-video box fills the screen, iframe fills the box */
.uc-video:fullscreen { width: 100vw; height: 100vh; border-radius: 0; }
.uc-video:-webkit-full-screen { width: 100vw; height: 100vh; border-radius: 0; }

/* ── Footage picker modal ─────────────────────────────────────────────────── */
.vid-picker {
  position: fixed; inset: 0; z-index: 120; display: none;
  align-items: center; justify-content: center;
  background: rgba(10, 37, 64, 0.45); backdrop-filter: blur(3px);
}
.vid-picker.open { display: flex; }
.vid-picker-panel {
  width: min(720px, 92vw); max-height: 86vh; overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: 0 24px 70px rgba(0, 49, 102, 0.25);
  padding: var(--space-3);
}
.vid-picker-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Sunflower', sans-serif; font-size: 18px; color: var(--sm-text);
  margin-bottom: var(--space-2);
}
.vid-picker-close { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--sm-text-body);
  width: 32px; height: 32px; border-radius: 8px; }
.vid-picker-close:hover { background: var(--sm-grey-1); color: var(--sm-text); }
.vid-paste { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--space-2); }
.vid-paste span { font-size: 13px; color: var(--sm-text-body); }
.vid-paste-input { font: inherit; font-size: 15px; padding: 8px 12px; border: 1px solid var(--sm-border); border-radius: 8px; }
.vid-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-1); }
.vid-picker-item {
  text-align: left; cursor: pointer; border: 1px solid var(--sm-border); border-radius: 10px;
  background: #fff; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px;
}
.vid-picker-item:hover { border-color: var(--sm-blue); box-shadow: 0 4px 14px rgba(0, 49, 102, 0.12); }
.vid-picker-item strong { font-size: 14px; color: var(--sm-text); }
.vid-picker-item span { font-size: 11px; color: var(--sm-text-body); }
.vid-picker-note { font-size: 12px; color: var(--sm-text-body); margin-top: var(--space-2); font-style: italic; }

/* Never show change/picker while presenting (⛶ stays — fullscreen is useful live) */
body.present .uc-change, body.present .vid-picker { display: none !important; }

@keyframes vid-spin { to { transform: rotate(360deg); } }

/* Single-line "Loading videos N / N" counter — sits down at the nav level so it
   never collides with the top-centre "Edit Master" button. */
.vid-loading {
  position: fixed; z-index: 60; top: 64px; left: 50%;
  transform: translateX(-50%) translateY(-8px); display: none;
  align-items: center; gap: 8px; padding: 8px 16px; border-radius: 20px;
  background: rgba(13, 22, 34, 0.92); color: #fff; font: 500 13px/1 'Roboto', sans-serif;
  box-shadow: 0 6px 20px rgba(0, 49, 102, 0.22); opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.vid-loading.show { display: flex; opacity: 1; transform: translateX(-50%) translateY(0); }
.vid-loading-spin { width: 13px; height: 13px; flex: none; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; animation: vid-spin 0.7s linear infinite; }
body.present .vid-loading { display: none !important; }

/* Per-video loading spinner (shown until that clip's player is up) */
.uc-video .uc-spin, .vimeo-container .uc-spin {
  position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center;
  background: #0e1116; transition: opacity 0.35s ease;
}
.uc-spin span {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: #fff;
  animation: vid-spin 0.7s linear infinite;
}
.vid-ready .uc-spin { opacity: 0; pointer-events: none; }
