/* Antes iba incrustado en templates/_ubi_att.html. */
  /* ── Imágenes adjuntas en los chats de soporte (ubiAtt) ────────────── */
  .ubi-att-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
  .ubi-att-thumb {
    display: block; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in;
    background: rgba(15,23,42,.06); line-height: 0;
  }
  /* Caja fija: si la miniatura tomara su tamaño al cargar, el chat dejaría de
     quedar pegado abajo (crece después de hacer scroll al final). */
  .ubi-att-thumb img { display: block; width: 160px; height: 120px; max-width: 100%; object-fit: cover; }
  .ubi-att-video { display: block; width: 240px; height: 160px; max-width: 100%; border-radius: 10px; background: #0f172a; object-fit: contain; }
  .ubi-att-thumb:hover img { opacity: .9; }
  .ubi-att-gone {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px;
    font-size: 11px; font-style: italic; color: #64748b; background: rgba(100,116,139,.12);
  }
  .ubi-att-btn {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff;
    color: #64748b; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    transition: color .15s, border-color .15s, background-color .15s;
  }
  .ubi-att-btn:hover { color: #0072cb; border-color: #93c5fd; background: #f0f7ff; }
  .ubi-att-btn svg { width: 18px; height: 18px; }
  .ubi-att-previews { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 12px 0; }
  .ubi-att-previews[hidden] { display: none; }
  .ubi-att-prev { position: relative; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; }
  .ubi-att-prev img, .ubi-att-prev video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0f172a; }
  .ubi-att-prev .ubi-att-play { position: absolute; left: 4px; bottom: 4px; width: 16px; height: 16px; border-radius: 999px;
    background: rgba(15,23,42,.75); color: #fff; display: flex; align-items: center; justify-content: center; pointer-events: none; }
  .ubi-att-prev button {
    position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 999px; border: 0;
    background: rgba(15,23,42,.75); color: #fff; font-size: 13px; line-height: 20px; cursor: pointer; padding: 0;
  }
  /* Hilo de soporte: miniatura con nombre y tamaño debajo */
  .ubi-att-grid--detalle { gap: 8px; }
  .ubi-att-fig { margin: 0; width: 160px; max-width: 100%; min-width: 0; }
  .ubi-att-fig .ubi-att-video { width: 160px; height: 120px; }
  .ubi-att-cap { display: flex; gap: 6px; align-items: baseline; margin-top: 4px; font-size: 11px; line-height: 1.3; min-width: 0; opacity: .82; }
  .ubi-att-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ubi-att-tam { flex-shrink: 0; font-variant-numeric: tabular-nums; }
  html.dark .ubi-att-btn { background: #1e2533; border-color: #2c3340; color: #8590a1; }
  html.dark .ubi-att-btn:hover { color: #7cc5fd; border-color: #37a9fb; background: #1c2941; }
  html.dark .ubi-att-prev { border-color: #2c3340; }
  html.dark .ubi-att-gone { color: #8590a1; background: rgba(148,163,184,.12); }
