/* Fortex generated-file cards + preview drawer */
.fx-file-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  margin: 6px 0;
  padding: 10px 12px;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 12px;
  background: rgba(127, 127, 127, 0.08);
  font-size: 0.9rem;
  line-height: 1.25;
}
.fx-file-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  border-radius: 9px;
  background: rgba(127, 127, 127, 0.14);
}
.fx-file-meta { min-width: 0; }
.fx-file-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}
.fx-file-kind { opacity: 0.65; font-size: 0.76rem; margin-top: 1px; }
.fx-file-actions { display: flex; gap: 6px; margin-left: auto; flex: none; }
.fx-file-btn {
  border: 1px solid rgba(128, 128, 128, 0.4);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  background: transparent;
  color: inherit;
  text-decoration: none;
}
.fx-file-btn:hover { background: rgba(127, 127, 127, 0.18); }
.fx-file-btn.fx-primary { background: #4ca97f; border-color: #4ca97f; color: #fff; }
.fx-file-btn.fx-primary:hover { background: #3d8767; }

.fx-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(46vw, 640px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  background: var(--surface-primary, #1d1d1f);
  border-left: 1px solid rgba(128, 128, 128, 0.35);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.22s ease;
}
.fx-drawer.fx-open { transform: translateX(0); }
.fx-drawer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.3);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary, #eee);
}
.fx-drawer-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.fx-drawer-head .fx-file-btn { flex: none; }
.fx-drawer-spacer { margin-left: auto; }
.fx-drawer iframe { flex: 1; border: 0; width: 100%; background: #fff; }
@media (max-width: 860px) { .fx-drawer { width: 100vw; } }
