/* modal.css — post form panel, briefing field, PDF viewer overlay. */

.modal__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }

.modal__section { margin-bottom: var(--space-5); }
.modal__section-title {
  font-size: var(--text-label); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted);
  padding-bottom: var(--space-2); margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
.modal__section-body { display: flex; flex-direction: column; gap: var(--space-3); }

/* Status-driven blocks (lost-deal reason, payment date). Tinted and rule-marked
   so it reads as "this appeared because of the status you just picked". */
.modal__conditional {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-3); border-radius: var(--radius-badge);
  border-left: 3px solid var(--border-strong); background: var(--surface-2);
}
.modal__conditional[hidden] { display: none; }

/* BTW block: the breakdown line is the point — it removes any doubt about
   what the number she just typed actually means. */
.modal__vat { display: flex; flex-direction: column; gap: var(--space-2); }
.modal__vat[hidden] { display: none; }
.modal__vat-breakdown {
  margin: 0; padding: 8px 12px; border-radius: var(--radius-badge);
  background: var(--surface-2); color: var(--text-muted);
  font-size: var(--text-label); font-variant-numeric: tabular-nums;
}
.field__input:disabled { opacity: 0.5; cursor: not-allowed; }
.modal__conditional--lost { border-left-color: var(--status-not-selected); }
.modal__conditional--paid { border-left-color: var(--status-paid); }
.modal__conditional--barter { border-left-color: var(--deal-barter); }
.modal__conditional--counter-invoice { border-left-color: var(--deal-counter-invoice); }

/* Explains what a tegenfactuur deal does to her figures, where she picks it. */
.modal__hint {
  margin: var(--space-2) 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ---- "Te doen": one block per to-do, date + state + tick-off ---- */
.modal__todo {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border);
}
.modal__todo:first-of-type { border-top: none; padding-top: var(--space-2); }
.modal__todo-actions { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
/* See `.btn[hidden]` in components.css — `display: flex` beats the UA rule. */
.modal__todo-actions[hidden] { display: none; }

.modal__error {
  margin: 0; padding: 9px 12px; background: var(--danger-bg); color: var(--danger);
  border-radius: var(--radius-badge); font-size: var(--text-label);
}

/* ---- Briefing field ---- */
.briefing__drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center; padding: var(--space-5);
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-card);
  background: var(--surface-2); cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}
.briefing__drop:hover, .briefing__drop.is-drag { border-color: var(--elke); background: var(--elke-light); }
.briefing__drop-icon { font-size: 22px; }

.briefing__file {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-card);
  background: var(--surface-2);
}
.briefing__icon { font-size: 20px; }
.briefing__name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.briefing__file-actions { display: flex; gap: var(--space-2); flex-shrink: 0; }

.briefing__progress { display: flex; flex-direction: column; gap: 8px; }
.briefing__progress-name { font-size: var(--text-label); color: var(--text-muted); }
.progressbar { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progressbar__fill { height: 100%; background: var(--elke); width: 30%; border-radius: 999px; }
.progressbar__fill.is-indeterminate { animation: indeterminate 1.1s ease-in-out infinite; }
@keyframes indeterminate {
  0% { margin-left: -30%; } 100% { margin-left: 100%; }
}

/* ---- PDF viewer overlay ---- */
.pdfviewer {
  position: fixed; inset: 0; z-index: 1400;
  background: rgba(20, 18, 16, 0.6);
  display: flex; flex-direction: column; align-items: center;
  padding: var(--space-4);
  opacity: 0; transition: opacity var(--duration-normal) var(--ease);
}
.pdfviewer.is-open { opacity: 1; }
.pdfviewer__bar {
  width: 100%; max-width: 1100px;
  display: flex; align-items: center; justify-content: space-between;
  color: #fff; padding: 4px 4px var(--space-2);
}
.pdfviewer__name { font-weight: 600; }
.pdfviewer__bar .panel__close { color: #fff; }
.pdfviewer__bar .panel__close:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.pdfviewer__frame {
  width: 100%; max-width: 1100px; height: 85vh;
  background: var(--surface); border-radius: var(--radius-card); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pdfviewer__iframe { width: 100%; height: 100%; border: none; }
