/* Designed by Kapil Pidhwani: Universal File Metadata Viewer & Remover layout rules.
 * Ceiling: uses @container queries on .tool-pane; shared .meta-* and .pdf-meta-form rules live in styles/main.css.
 * Upgrade path: promote .fmr-pdf-badge to styles/main.css if another multi-format inspector shares the file summary card.
 */
.tool-pane { container-type: inline-size; }

.fmr-mode-bar[hidden],
.fmr-pdf-badge[hidden],
.fmr-primary-wrap[hidden],
.fmr-settings-group[hidden],
.tool-settings-accordion[hidden] {
  display: none;
}

.fmr-mode-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.fmr-mode-bar .segmented-group { width: 100%; }
.fmr-mode-bar .seg-pill { flex: 1 1 0; }

.media-canvas-viewport.pdf-tall > .video-dropzone,
.media-canvas-viewport.pdf-tall > .aud-player,
.media-canvas-viewport.meta-tall > .media-empty-placeholder {
  flex: 1 1 auto;
}

.media-canvas-viewport.pdf-tall > .video-dropzone { width: calc(100% - 8px); }

.media-canvas-viewport.pdf-tall > .media-preview-img.is-shown,
.media-canvas-viewport.pdf-tall > .source-video-player.is-shown {
  margin: auto;
}

.fmr-pdf-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  width: 100%;
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.fmr-pdf-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.2rem;
}

.fmr-pdf-name { font-size: 0.92rem; font-weight: 600; color: var(--text-primary); max-width: 100%; overflow-wrap: anywhere; }
.fmr-pdf-meta { font-size: 0.78rem; font-family: var(--font-mono); color: var(--text-secondary); }
.fmr-pdf-sub { font-size: 0.76rem; color: var(--text-muted); }

.fmr-settings-group { display: flex; align-items: center; flex-wrap: wrap; gap: 0.85rem 1.5rem; width: 100%; }
.fmr-primary-wrap { width: 100%; }
.fmr-primary-wrap .btn-primary-action { margin-top: 0; }

@container (max-width: 420px) {
  .pdf-meta-form .form-row-2col { grid-template-columns: 1fr; }
}
