/* Extraer imágenes de HTML */
.hae-title { font-size: 19px; display: flex; align-items: center; gap: 10px; }
.hae-count { font: 700 13px var(--font-body); color: var(--violet); background: var(--violet-soft); border-radius: 999px; padding: 3px 9px; letter-spacing: 0; }
.hae-file-info { overflow-wrap: anywhere; min-width: 0; }
.hae-library { margin-top: 20px; }
.hae-progress { display: grid; gap: 8px; font-weight: 600; font-size: 14.5px; }
.hae-progress progress { width: 100%; height: 8px; accent-color: var(--violet); }
[data-message] { overflow-wrap: anywhere; }

.hae-filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; }
.hae-tabs { display: flex; gap: 4px; overflow-x: auto; max-width: 100%; }
.hae-tabs button { border: 0; background: transparent; padding: 12px 10px; font-weight: 650; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; border-radius: 0; }
.hae-tabs button:hover { color: var(--ink); }
.hae-tabs button[aria-selected="true"] { color: var(--violet); border-bottom-color: var(--violet); }
.hae-tabs button:disabled { opacity: .5; cursor: default; }
.hae-tabs span { font-size: 12px; background: var(--paper); border-radius: 6px; padding: 2px 6px; margin-left: 4px; }
.hae-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.hae-sort .select { width: auto; min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
.hae-selection { gap: 8px; }

.hae-empty { text-align: center; padding: 36px 16px; display: grid; gap: 8px; justify-items: center; }
.hae-empty h3 { font-size: 18px; }
.hae-empty .hint { max-width: 52ch; }
.hae-formats { font: 12px var(--font-mono); color: var(--muted); letter-spacing: .04em; margin-top: 8px; }

.hae-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.hae-grid:empty { display: none; }
.hae-card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; min-width: 0; background: var(--surface); content-visibility: auto; contain-intrinsic-size: auto 300px; }
.hae-card.is-selected { border-color: var(--violet); box-shadow: 0 0 0 2px var(--violet-soft); }
.hae-preview { position: relative; height: 150px; display: grid; place-items: center; background: #fff repeating-conic-gradient(#EEEAF6 0 25%, transparent 0 50%) 0 0 / 16px 16px; border-bottom: 1px solid var(--line); }
.hae-preview img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 14px; }
.hae-preview .hae-check { position: absolute; top: 8px; left: 8px; z-index: 1; width: 20px; height: 20px; accent-color: var(--violet); margin: 0; cursor: pointer; }
.hae-preview .hae-badge { position: absolute; top: 8px; right: 8px; font: 600 11px var(--font-mono); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
.hae-preview .hae-badge.is-dup { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.hae-unavailable { font-size: 13px; color: var(--muted); padding: 20px; text-align: center; }
.hae-info { padding: 10px 12px 12px; display: grid; gap: 4px; }
.hae-name { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.hae-name h3 { font: 650 14px var(--font-body); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hae-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; font: 12px var(--font-mono); color: var(--muted); }
.hae-loc { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
.hae-note { font-size: 12px; line-height: 1.45; color: var(--warn); }
.hae-pagination { justify-content: center; margin-top: 14px; font-size: 14px; color: var(--muted); }
.hae-download { border-top: 1px solid var(--line); padding-bottom: 0; }
.hae-download p { margin-top: 2px; }
@media (max-width: 560px) {
  .hae-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hae-preview { height: 120px; }
  .hae-download .btn { width: 100%; }
}
