/* Scoped attachment cards inherit each existing page's brand and typography. */
.fx-documents {
  grid-column: 1 / -1;
  flex: 1 0 100%;
  min-width: 0;
  width: 100%;
  margin: 0 0 10px;
}
.fx-documents[hidden] { display: none !important; }
.fx-doc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.fx-doc-card {
  display: flex;
  align-items: center;
  position: relative;
  gap: 10px;
  box-sizing: border-box;
  width: 250px;
  max-width: 100%;
  min-width: 0;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line, #e6e7f4);
  border-radius: 12px;
  background: var(--card, #fff);
  color: var(--ink, #11172f);
  text-align: left;
  font-family: inherit;
  line-height: 1.45;
}
.fx-doc-icon {
  position: relative;
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 36px;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  color: var(--violet, var(--blue, #7147f7));
}
.fx-doc-icon b { font: 700 12px/1 sans-serif; }
.fx-doc-info { flex: 1 1 auto; min-width: 0; }
.fx-doc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.fx-doc-status { margin-top: 3px; color: var(--muted, #66708b); font-size: 11px; overflow-wrap: anywhere; }
.fx-doc-remove {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted, #66708b);
  font: 20px/1 sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
.fx-doc-remove:hover { background: var(--line, #e6e7f4); color: var(--ink, #11172f); }
.fx-doc-remove:focus-visible { outline: 2px solid var(--violet, var(--blue, #7147f7)); outline-offset: 2px; }
.fx-doc-card[data-document-status="loading"] .fx-doc-status::before {
  content: '';
  display: inline-block;
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border: 1.5px solid var(--line, #e6e7f4);
  border-top-color: var(--violet, var(--blue, #7147f7));
  border-radius: 50%;
  animation: fx-doc-spin .8s linear infinite;
  vertical-align: -1px;
}
.fx-doc-card[data-document-status="error"] { border-color: var(--danger, #b73d4b); }
.fx-doc-card[data-document-status="error"] .fx-doc-status,
.fx-doc-notice { color: var(--danger, #b73d4b); }
.fx-doc-notice { margin-top: 7px; font-size: 12px; line-height: 1.5; }
.fx-doc-list--sent { margin-bottom: 10px; }
.fx-doc-instruction { min-width: 0; overflow-wrap: anywhere; }
@keyframes fx-doc-spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  .fx-doc-card { width: 100%; }
  .fx-doc-list { width: 100%; }
  .fx-doc-remove { flex-basis: 36px; width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-doc-card[data-document-status="loading"] .fx-doc-status::before { animation: none; }
}
