/* AiB Platform — the modal and what lives inside it: the comment thread,
   attachment rows and the progress bar. */

.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 20px;
  background: rgba(13, 14, 19, 0.44);
  overflow-y: auto;
}
.modal {
  width: min(920px, 100%);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(13, 14, 19, 0.28);
  overflow: hidden;
}
.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
}
.modal-close {
  border: 0;
  background: none;
  color: var(--grey);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-close:hover { color: var(--ink); background: var(--paper); }
.modal-grid { display: grid; grid-template-columns: 1.5fr 1fr; }
.modal-main { padding: 22px 24px; }
.modal-rail { padding: 22px 24px; border-left: 1px solid var(--hairline); background: var(--paper); }
@media (max-width: 860px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal-rail { border-left: 0; border-top: 1px solid var(--hairline); }
}
/* phones: the sheet takes the screen edge-to-edge, panels breathe less */
@media (max-width: 719px) {
  .modal-wrap { padding: 12px; }
  .modal-main, .modal-rail { padding: 18px 16px; }
}

/* comments / activity thread */
.thread { margin-top: 8px; }
.msg { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.msg:last-child { border-bottom: 0; }
.msg-body { min-width: 0; }
.msg-meta { display: flex; align-items: baseline; gap: 10px; }
.msg-meta .name { font-weight: 500; font-size: 13.5px; }
.msg-meta .when { font-family: var(--font-mono); font-size: 10px; color: var(--grey-dark); }
.msg-text { margin: 3px 0 0; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }

/* attachment rows */
.attach {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--white);
  font-size: 13.5px;
}
.attach .meta { color: var(--grey); font-size: 11.5px; margin-left: auto; white-space: nowrap; }

/* progress bar */
.progress { display: flex; align-items: center; gap: 12px; }
.progress-track { flex: 1; height: 4px; border-radius: 999px; background: var(--hairline); }
.progress-fill { height: 100%; border-radius: 999px; background: var(--ink); }
.progress .pct { font-family: var(--font-mono); font-size: 11px; color: var(--grey); }
