/* The parent-phone attach view (phone-attach.js). Mobile-first for a 360 px phone, logical
   properties only (right-to-left ready), 44 px touch targets, no motion. */
.pa { display: grid; gap: 0.75rem; padding: 1rem; max-inline-size: 36rem; margin-inline: auto; }
.pa-preview[hidden], .pa-file { display: none; }
/* RC8C recovery (F2/F3): a hidden part stays hidden even where its class sets display (.pa-bar). */
.pa [hidden] { display: none; }
.pa-title { margin: 0; font-size: 1.25rem; color: #2a2170; }
.pa-help, .pa-note { margin: 0; font-size: 0.9rem; color: #4a4566; }
.pa-status { margin: 0; min-block-size: 1.5em; font-weight: 600; color: #2a2170; }
.pa-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pa-btn {
  min-block-size: 44px; min-inline-size: 44px; padding-inline: 1rem;
  border: 2px solid #5b4bdb; border-radius: 999px; background: #fff; color: #2a2170;
  font: inherit; font-weight: 600; cursor: pointer;
}
.pa-btn:focus-visible { outline: 3px solid #ffb020; outline-offset: 2px; }
.pa-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pa-send { background: #5b4bdb; color: #fff; }
.pa-preview { margin: 0; display: grid; gap: 0.5rem; }
.pa-img {
  inline-size: 100%; max-block-size: 50vh; object-fit: contain;
  border: 1px solid #d8d4f5; border-radius: 12px; background: #fff;
}

/* RC8C recovery 2 (ws-p2, F3 screenshots F3-phone-staged / F3-phone-done): the attach-only view
   mounts the shared staging strip and grouped message (attach-stage.js .lv-att-*), whose classroom
   styles are all scoped to .ws-v4, so on the phone the photos showed full width as a bulleted list
   with empty icon buttons. The same compact strip here, scoped to .pa (never the classroom). */
.pa .lv-vh { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pa .lv-icon { inline-size: 18px; block-size: 18px; fill: currentColor; flex: none; }
.pa .lv-att { display: grid; gap: 0.5rem; }
.pa .lv-att-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.125rem 0.75rem; font-size: 0.9rem; }
.pa .lv-att-title, .pa .lv-att-dest, .pa .lv-att-hint, .pa .lv-att-note { margin: 0; }
.pa .lv-att-title { font-weight: 700; color: #2a2170; }
.pa .lv-att-dest, .pa .lv-att-hint { color: #4a4566; font-size: 0.85rem; overflow-wrap: anywhere; }
.pa .lv-att-note { color: #8a3b00; font-size: 0.85rem; }
.pa .lv-att-strip { display: flex; align-items: flex-start; gap: 0.5rem; min-inline-size: 0; }
/* RC8C recovery 3 (F3, run 20261129T083111Z screenshot F3-phone-staged): with 20 photos staged the
   row's min-content width (20 x 72 px) widened every enclosing grid column (.lv-att, .pa, .st-panel,
   .st-screen), so the whole view became wider than a 360 px phone and the message box and Send were
   off screen. The row takes the width it is given (a zero preferred width, then grows) and scrolls
   its photos sideways inside it (the strip above may shrink too); the classroom's own strip (.ws-v4)
   is not affected. */
.pa .lv-att-row { flex: 1 1 0; inline-size: 0; min-inline-size: 0; overflow-x: auto; padding-block: 0.5rem 0.125rem; }
.pa .lv-att-list, .pa .lv-att-grid { list-style: none; margin: 0; padding: 0; }
.pa .lv-att-list { display: flex; gap: 0.5rem; }
.pa .lv-att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 0.375rem; }
.pa .lv-att-item { position: relative; flex: none; inline-size: 72px; }
.pa .lv-att-msg .lv-att-item { inline-size: auto; }
.pa .lv-att-open {
  display: block; inline-size: 72px; block-size: 72px; padding: 0; overflow: hidden;
  border: 1px solid #d8d4f5; border-radius: 8px; background: #fff;
}
.pa .lv-att-msg .lv-att-open { inline-size: 100%; block-size: auto; aspect-ratio: 1; }
.pa .lv-att-img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.pa .lv-att-ph { display: grid; place-items: center; inline-size: 100%; aspect-ratio: 1; color: #6b6785; }
.pa .lv-att-rm {
  position: absolute; inset-block-start: -6px; inset-inline-end: -6px; display: grid; place-items: center;
  inline-size: 30px; block-size: 30px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #2a2170; color: #fff;
}
.pa .lv-att-rm::after { content: ""; position: absolute; inset: -7px; } /* a 44 px touch target */
.pa .lv-att-rm .lv-icon { inline-size: 16px; block-size: 16px; transform: rotate(45deg); }
.pa .lv-att-moves { display: flex; justify-content: space-between; margin-block-start: 2px; }
.pa .lv-att-msg .lv-att-moves { display: none; } /* reordering is before sending only */
.pa .lv-att-move {
  display: grid; place-items: center; inline-size: 34px; block-size: 36px; padding: 0;
  border: 1px solid #d8d4f5; border-radius: 8px; background: #fff; color: #4a4566;
}
.pa .lv-att-move .lv-icon { inline-size: 14px; block-size: 14px; transform: rotate(180deg); }
.pa .lv-att-move-later .lv-icon { transform: none; }
[dir="rtl"] .pa .lv-att-move .lv-icon { transform: none; }
[dir="rtl"] .pa .lv-att-move-later .lv-icon { transform: rotate(180deg); }
.pa .lv-att-move:disabled, .pa .lv-att-rm:disabled { opacity: 0.4; }
.pa .lv-att-status { display: block; margin-block-start: 2px; font-size: 0.75rem; line-height: 1.2; text-align: center; color: #4a4566; overflow-wrap: anywhere; }
.pa .lv-att-status:empty { display: none; }
.pa .lv-att-status[data-status="failed"] { color: #8a3b00; font-weight: 700; }
.pa .lv-att-item[data-status="failed"] .lv-att-open { border: 2px dashed #b06d00; }
.pa .lv-att-add {
  flex: none; display: grid; place-items: center; inline-size: 72px; block-size: 72px; margin-block-start: 0.5rem;
  border: 1px dashed #5b4bdb; border-radius: 8px; background: transparent; color: #2a2170;
}
.pa .lv-att-confirm { display: flex; flex-wrap: wrap; gap: 0.375rem; font-size: 0.9rem; }
.pa .lv-att-preview {
  position: fixed; z-index: 70; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.75rem; padding: 1rem; background: rgba(12, 16, 40, 0.86); color: #fff;
}
.pa .lv-att-pv-title { margin: 0; font-weight: 700; }
.pa .lv-att-pv-img { max-inline-size: 100%; max-block-size: 72dvh; object-fit: contain; border-radius: 12px; background: #fff; }
.pa .lv-att-pv-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.pa .lv-att-msg { display: grid; gap: 0.375rem; }
.pa .lv-att-store, .pa .lv-att-progress { margin: 0; font-size: 0.85rem; color: #4a4566; }
.pa .lv-att-progress { font-weight: 600; color: #2a2170; }
.pa .lv-att-failed { color: #8a3b00; }
.pa .lv-att-batches, .pa .lv-att-wait { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.pa .lv-att-msg .lv-chip, .pa .lv-att-batches .lv-chip {
  min-block-size: 44px; padding-inline: 1rem; border: 2px solid #5b4bdb; border-radius: 999px; background: #fff; color: #2a2170; font: inherit; font-weight: 600;
}
.pa .lv-att-msg .lv-att-item .lv-chip { inline-size: 100%; min-block-size: 36px; padding-inline: 0.25rem; }
/* A hidden part stays hidden (above the rules just above, which set display on the same classes:
   the empty stage, the closed preview dialog, the progress, Try again and waiting rows). */
.pa .lv-att[hidden], .pa .lv-att [hidden], .pa .lv-att-msg [hidden], .pa .lv-att-msg[hidden] { display: none; }
