/* Fanned-out alternative cards — overlays only, same height as normal cards */
.resource-card-image {
    position: relative;
}

.typesense-alt-fanout-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    max-width: calc(100% - 72px);
    padding: 3px 8px;
    border-radius: 3px;
    background: rgba(20, 28, 36, 0.82);
    color: #fff;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.typesense-alt-fanout-overflow {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    padding: 3px 8px;
    border-radius: 3px;
    background: rgba(47, 111, 237, 0.92);
    color: #fff;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 600;
    cursor: pointer;
}

.typesense-alt-match-list-cue {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(47, 111, 237, 0.12);
    color: inherit;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.typesense-alt-match-list-cue:hover {
    text-decoration: underline;
}

/* Soft row tint; left accent only on first cell (shadow on every td draws column bars). */
.alt-files-container tr.typesense-alt-match-highlight > td {
    background: rgba(47, 111, 237, 0.06);
}

.alt-files-container tr.typesense-alt-match-highlight > td:first-child {
    box-shadow: inset 3px 0 0 #2f6fed;
}

.alt-files-container tr.typesense-alt-match-focus > td {
    background: rgba(46, 153, 230, 0.1);
}

.alt-files-container tr.typesense-alt-match-focus > td:first-child {
    box-shadow: inset 3px 0 0 #2E99E6;
}

.typesense-alt-handoff-chrome {
    margin-top: 10px;
    text-align: center;
}

.typesense-alt-handoff-cue {
    font-size: 12px;
    line-height: 1.45;
    color: #666;
}

.typesense-alt-handoff-cue-primary {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    overflow-wrap: anywhere;
    word-break: break-word;
    padding: 0 8px;
}

.typesense-alt-handoff-cue-meta {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    justify-content: center;
    align-items: center;
}

.typesense-alt-handoff-cue-meta a {
    color: #666;
    font-weight: 600;
    text-decoration: none;
}

.typesense-alt-handoff-cue-meta a:hover {
    color: #2E99E6;
    text-decoration: none;
}

.typesense-alt-handoff-actions {
    margin: 10px 0 0;
    padding: 0;
    font-size: 1em;
    font-weight: normal;
    text-align: center;
    color: #666;
}

.typesense-alt-handoff-actions a {
    color: #666;
    text-decoration: none;
    cursor: pointer;
}

.typesense-alt-handoff-actions a:hover {
    color: #2E99E6;
    text-decoration: none;
}

.typesense-alt-handoff-actions-sep {
    margin: 0 8px;
    color: #bbb;
}

.RecordView .RecordDownloadSpace#DownloadsTab tr.typesense-alt-handoff-original td,
.RecordView .RecordDownloadSpace#DownloadsTab tr.typesense-alt-handoff-size-row td {
    background: rgba(47, 111, 237, 0.04);
}

.RecordView .RecordDownloadSpace#DownloadsTab tr.typesense-alt-handoff-original .DownloadFileName h2 {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Collection bar: alternative-file membership tiles */
.typesense-collection-alt-card .collection-bar-resource-card-image {
    position: relative;
}

.typesense-collection-alt-badge {
    position: absolute;
    left: 4px;
    top: 4px;
    z-index: 2;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(20, 24, 32, 0.78);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    pointer-events: none;
}
