/* Messages. Only what is particular to this page — its surfaces come from
   platform-kit.css.

   A stored body is the customer's own markup, but it is still markup that was
   written elsewhere, so it renders in a sandboxed frame and never as part of
   this page. */

.pm-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.pm-row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pm-err { display: block; color: #b32020; font-size: 11.5px; margin-top: 2px; }
.pm-dismiss { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 12px; opacity: .75; text-decoration: underline; }
.pm-why { font-size: 12.5px; color: var(--sd-mut); align-self: center; cursor: help; }

/* One row: search takes the slack, the two selects keep a fixed share. Giving
   the input a 320px basis made it claim the whole line and push both selects
   onto rows of their own. */
.pm-filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; align-items: stretch; }
.pm-filters input, .pm-filters select {
  padding: 9px 12px; border-radius: 10px; font: inherit; font-size: 13.5px;
  border: 1px solid var(--sd-line); background:var(--paper,#fff); color: var(--sd-ink);
}
.pm-filters input { flex: 1 1 260px; min-width: 0; }
/* The project's own dropdown swaps each <select> for a span wrapper, so a rule
   on `select` never reaches the thing that is actually laid out — which is why
   both filters sat on rows of their own at full width. */
.pm-filters select,
.pm-filters .app-select-shell { flex: 0 1 200px; min-width: 160px; }
.pm-filters .app-select-shell > * { width: 100%; }
.pm-filters input:focus, .pm-filters select:focus {
  outline: none; border-color: var(--sd-blue); box-shadow: 0 0 0 3px rgba(54,126,245,.15);
}

.pm-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.pm-detail-head h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.01em; }
.pm-detail-head p { margin: 0; color: var(--sd-mut); font-size: 12.5px; }
.pm-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 14px 0 0; }
.pm-facts > div { border: 1px solid var(--sd-line); border-radius: 10px; padding: 9px 11px; background:var(--sd-sunk,#fbfcfe); min-width: 0; }
.pm-facts span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--sd-mut); font-weight: 600; }
.pm-facts b { font-size: 13px; word-break: break-word; }

.pm-sub { margin: 20px 0 8px; font-size: 14px; }

/* the event trail: what actually happened, in order */
.pm-trail { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--sd-line); }
.pm-trail li { position: relative; padding: 0 0 12px 16px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.pm-trail li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--sd-line); }
.pm-trail li span:nth-child(2) { font-size: 12px; color: var(--sd-mut); }
.pm-trail small { font-size: 11.5px; color: var(--sd-mut); word-break: break-word; }

.pm-body { border: 1px solid var(--sd-line); border-radius: 12px; overflow: hidden; background:var(--paper,#fff); }
.pm-body iframe { width: 100%; height: 260px; border: 0; display: block; background:var(--paper,#fff); }
.pm-plain {
  margin: 0; padding: 14px 16px; border: 1px solid var(--sd-line); border-radius: 12px;
  background:var(--sd-sunk,#fbfcfe); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 340px; overflow: auto;
}

.pm-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; font-size: 13px; color: var(--sd-mut); }

@media (max-width: 760px) {
  .pm-row-actions { justify-content: flex-start; }
}
