/* =====================================
   Shot List — Lina Style (clean)
   ===================================== */

.shotlist-page .screenplay-canvas {
  background: var(--bg-main);
  padding: 24px 32px;
}

.shot-scene-block {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
}

.shot-scene-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shot-scene-header strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.shot-scene-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2px;
}

.shot-table {
  padding: 8px 10px 10px;
}

/* Header row */
.shot-row-head {
  display: grid;
  grid-template-columns:
    64px    /* Shot */
    56px    /* Setup */
    80px    /* Type */
    80px    /* Angle */
    80px    /* Lens */
    110px   /* Movement */
    1.2fr   /* Subject */
    1.6fr   /* Notes */
    84px;   /* Actions */
  gap: 8px;
  align-items: center;

  font-size: 11px;
  text-align: center;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.shot-row-head > div {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Data rows */
.shot-row {
  display: grid;
  grid-template-columns:
    64px
    56px
    80px
    80px
    80px
    110px
    1.2fr
    1.6fr
    84px;
  gap: 8px;
  align-items: center;

  padding: 6px 0;
}

.shot-row:hover {
  background: rgba(255,255,255,0.03);
}

.shot-row input,
.shot-row textarea {
  width: 100%;
  font-size: 13px;
}

/* Notes should match input height in the grid */
.shot-row textarea {
  min-height: var(--control-height);
  height: var(--control-height);
  resize: none;
  overflow: hidden;
}

/* Locked state */
.shot-locked input,
.shot-locked textarea {
  background: transparent;
  border: 1px solid transparent;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  cursor: pointer;
}

/* Shot number label when locked */
.shot-number-label {
  font-family: "Unbounded", sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  line-height: var(--control-height);
  padding: 0 8px;
  border: 1px solid transparent;
  text-align: center;
}

/* Setup field emphasis when locked */
.shot-setup-label {
  font-weight: 700;
  color: var(--accent);
}

/* Actions column */
.shot-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.shot-action {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);

  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 15px;
  line-height: 1;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.shot-action:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.shot-action.is-commit {
  color: #2ecc71;
}

.shot-action.is-commit:hover {
  border-color: #2ecc71;
  background: rgba(46, 204, 113, 0.12);
}

.shot-action.is-edit {
  color: #6aa9ff;
}

.shot-action.is-edit:hover {
  border-color: #6aa9ff;
  background: rgba(106, 169, 255, 0.12);
}

.shot-action.is-delete {
  color: #f2bcbc;
}

.shot-action.is-delete:hover {
  border-color: #f2bcbc;
  background: rgba(242, 188, 188, 0.12);
}

/* Add shot inline */
.add-shot-inline {
  margin-top: 6px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-secondary);
}

.add-shot-inline:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Generic modal used by shot creation/deletion */
#linaGenericModal.hidden {
  display: none;
}

.lina-modal-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.lina-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* =====================================
   Shot Creation Modal – Row Style
   ===================================== */

.shot-create-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Match shot list grid exactly */
.shot-create-grid .shot-row {
  grid-template-columns:
    64px    /* Shot */
    56px    /* Setup */
    80px    /* Type */
    80px    /* Angle */
    80px    /* Lens */
    110px   /* Movement */
    1.2fr   /* Subject */
    1.6fr;  /* Notes */
}

/* Emphasize required shot number */
.shot-number-input {
  font-weight: 700;
  color: var(--accent);
}

/* Small helper text */
.shot-create-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.shot-create-hint .required {
  color: var(--accent);
  font-weight: 700;
}

.line-jump-highlight {
  outline: 2px solid var(--accent, #4aaad0);
  outline-offset: 4px;
  background: rgba(74, 170, 208, 0.08);
  transition: background 0.4s ease;
}

.shot-hover-preview {
  max-width: 320px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  z-index: 1000;
  pointer-events: none;
}

.shot-number-label[data-preview-line] {
  cursor: help;
}


/* =====================================
   Screenplay Preview (FINAL)
   ===================================== */

.screenplay-preview-modal {
  background: #ffffff;
  color: #000;
  font-family: "Courier Prime", "Courier Final Draft", Courier, monospace;
  font-size: 15px;
  line-height: 1.6;

  max-height: 60vh;
  max-width: 50vw;
  overflow-y: auto;

  padding: 24px 32px;
  border-radius: 4px;
}

.screenplay-preview-block {
  display: block;
  white-space: pre-wrap;
}


.screenplay-preview-block.screenplay-slug {
  font-weight: 700;
  margin-bottom: 1.4em;
}

.screenplay-preview-block.screenplay-action {
  margin-bottom: 1.4em;
}

.screenplay-preview-block.screenplay-character {
  margin-left: 140px;
  margin-top: 1.2em;
  margin-bottom: 0.2em;
  font-weight: 700;
}

.screenplay-preview-block.screenplay-parenthetical {
  margin-left: 120px;
  margin-bottom: 0.2em;
}

.screenplay-preview-block.screenplay-dialogue {
  margin-left: 100px;
  margin-right: 120px;
  margin-bottom: 1.2em;
}

.screenplay-preview-block.screenplay-transition {
  text-align: right;
  margin-bottom: 1.4em;
}

/* =====================================
   Screenplay Preview – Final Formatting Fix
   ===================================== */

/* Force CHARACTER to behave as its own line */
.screenplay-preview-block.screenplay-character {
  display: block;
  white-space: pre;
  margin-left: 120px;
  margin-top: 1.4em;
  margin-bottom: 0.2em;
  font-weight: 700;
}

/* Insert a hard line break after character name */
.screenplay-preview-block.screenplay-character::after {
  content: "\n";
}

/* Dialogue must always start on a new line */
.screenplay-preview-block.screenplay-dialogue {
  display: block;
  white-space: pre-wrap;
  margin-left: 80px;
  margin-right: 120px;
  margin-bottom: 1.4em;
}

/* Prevent text selection on shot numbers */
.shot-number-label {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  cursor: pointer;
}
