/* Video card styles — adapted from weaver.sh cards-base.css */

.card-surface {
    background: var(--color-surface);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--color-text) 6%, transparent);
}

@media (prefers-color-scheme: dark) {
    .card-surface {
        box-shadow: none;
        border-block: 1px solid var(--color-border);
        border-inline-end: 1px solid var(--color-border);
    }
}

.card-title {
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
}

.card-title-long {
    font-size: 0.85rem;
}

.card-title-sub {
    display: block;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--color-subtle);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.card-meta {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.video-card {
    position: relative;
    display: flex;
    flex-direction: column;
    color: inherit;
    border-inline-start: 1px solid var(--color-border);
    transition: border-color 0.15s ease;
    overflow: hidden;
    min-width: 0;
}

.video-card:hover {
    border-inline-start: 3px solid var(--color-primary);
    margin-inline-start: -2px;
}

.video-card:hover .card-title {
    color: var(--color-tertiary);
}

.video-card-link {
    position: absolute;
    inset: 0;
    z-index: 0;
    text-decoration: none;
}

.video-card-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-card-thumbnail > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card-placeholder {
    color: var(--color-subtle);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--color-overlay);
}

.video-card-body {
    position: relative;
    z-index: 1;
    pointer-events: none;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.video-card-byline {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.video-card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.video-card-byline-time {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.video-card-displayname {
    color: var(--color-text);
}

.video-card-handle {
    color: var(--color-muted);
    font-size: 0.8rem;
}

/* Thumbnail overlays */

.video-card-tag {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    white-space: nowrap;
}

.video-card-duration-badge {
    position: absolute;
    bottom: 0.4rem;
    right: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
}

.video-card-thumb-author {
    position: absolute;
    bottom: 0.4rem;
    left: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 1;
}

.video-card-thumb-name {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.3rem 0.45rem;
    border-radius: 3px;
    max-width: 100%;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.video-card-thumb-name:hover {
    background: rgba(0, 0, 0, 0.95);
}

.video-card-thumb-author-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.video-card-thumb-displayname {
    font-weight: 600;
    font-size: 0.7rem;
    color: #fff;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-card-thumb-handle {
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-card-thumb-avatar {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    flex-shrink: 0;
}

.video-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.video-card-chip {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--color-subtle);
    border: 1px solid var(--color-border);
    padding: 0.1rem 0.4rem;
    white-space: nowrap;
    cursor: pointer;
    pointer-events: auto;
}

.video-card-chip:hover {
    color: var(--color-text);
    border-color: var(--color-subtle);
}

.video-card-datetime,
.video-card-duration {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-subtle);
    white-space: nowrap;
}
