/* ============================================
   FILMPROCESSOR MODAL — shared chrome
   ============================================

   The canonical .fp-modal: `.fp-modal` is the fixed backdrop and
   `.fp-modal-content` is the panel. Extracted from dcp-studio.css so /dcp and
   /player render the same modal from one source instead of drifting copies.

   Chrome only — a page keeps the styles for whatever it puts inside the panel.

   Colour tokens (--background-black, --title-white, --heading-cyan,
   --film-purple, --field-gray) come from the including page's stylesheet.

   Note: the Vault SPA has its own .fp-modal in apps/vault/src/styles/layout.css
   that assigns the same class names to DIFFERENT elements
   (.fp-modal-backdrop is the backdrop there). Do not cross-copy markup.
   ============================================ */

.fp-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.9);
}

.fp-modal-content {
  width: min(540px, 100%);
  max-height: min(82vh, 680px);
  overflow-y: auto;
  background: var(--background-black);
  border: 1px solid var(--field-gray);
  border-radius: 0;
  padding: 1rem;
}

.fp-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--film-purple);
}

.fp-modal-title {
  color: var(--film-purple);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.25;
}

.fp-modal-close {
  flex: 0 0 auto;
  width: 1.25rem;
  min-width: 1.25rem;
  height: 1.25rem;
  min-height: 1.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--film-purple);
  line-height: 1;
}

.fp-modal-close:hover,
.fp-modal-close:disabled,
.fp-modal-close:disabled:hover {
  border: 0;
  background: transparent;
  color: var(--heading-cyan);
}

.fp-modal-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.fp-modal-actions button {
  width: 100%;
  margin: 0;
}

@media (max-width: 520px) {
  .fp-modal {
    padding: 1rem;
  }
}
