/* File: public/css/media.css */

/* === MEDIA PREVIEW WRAPPER (audio / video / pdf) ===
   Shared top margin so a preview never collates with the block above it
   (e.g. an image row, which carries no bottom margin of its own). Bottom
   spacing comes from the `space-after` utility already on each wrapper. */
.media-preview {
  margin-top: 1rem;
  display: block;
}

.media-box {
  display: block;
  padding: 1rem;
  background: var(--main-text-color);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* === AUDIO TAG === */
.media-box audio {
  width: 100%;
  height: 3rem;
  background-color: var(--body-bg);
  color: var(--main-text-color);
  border: none;
  outline: none;
  border-radius: 6px;
}

/* === TRACK COLOR OVERRIDES FOR WEBKIT (Chrome/Safari) === */
.media-box audio::-webkit-media-controls-panel {
  background-color: var(--body-bg);
  color: var(--main-text-color);
  border-radius: 6px;
}

.media-box audio::-webkit-media-controls-play-button,
.media-box audio::-webkit-media-controls-mute-button,
.media-box audio::-webkit-media-controls-volume-slider,
.media-box audio::-webkit-media-controls-current-time-display,
.media-box audio::-webkit-media-controls-time-remaining-display {
  filter: brightness(1.2);
}

/* === OPTIONAL: filename display === */
.media-filename {
  margin-top: 0.5rem;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  text-align: center;
}

/* === PDF document row (sia Phase 3.6 / H1) ===
   A self-contained "open document" chip on the shared accent palette
   (token-composed → readable in day + night). NOT the dark `.media-box`
   player chrome the audio/video previews use. */
.pdf-document-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 100%;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--accent-border-soft);
  border-radius: 8px;
  background: var(--accent-bg-subtle);
  color: var(--link-color);
  font-weight: var(--font-weight-semibold);
  transition: background-color var(--transition-medium) var(--easing-standard),
              border-color var(--transition-medium) var(--easing-standard);
}

.pdf-document-row:hover {
  background: var(--accent-bg-soft);
  border-color: var(--brand-accent);
}

.pdf-document-badge {
  flex-shrink: 0;
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
  background: var(--brand-accent-deep);
  color: var(--brand-bg);
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* The author's optional document-name field on a pdf block (create + edit);
   shown in the chip. Rides the shared input chrome — just sized here. */
.pdf-name-input {
  display: block;
  width: 100%;
  max-width: 28rem;
}