/* Community pattern cards and voting */

.pattern-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* This forces the card onto its own layer so it doesn't bother the rest of the page */
    will-change: transform, box-shadow;
}

.pattern-card:hover {
    /* Use transform to give the 'lift' effect without changing the box dimensions */
    transform: translateY(-4px);
    /* Keep the shadow subtle and ensure it doesn't trigger container overflow */
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.pattern-card .card-img-top {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* Vote controls */
.vote-controls .vote-btn {
    padding: 0.15rem 0.35rem;
    line-height: 1;
    border-color: var(--bs-border-color);
}

.vote-controls .vote-btn:hover {
    z-index: 1;
}

.vote-controls .vote-up.active {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
    color: #fff;
}

.vote-controls .vote-down.active {
    background-color: var(--bs-danger);
    border-color: var(--bs-danger);
    color: #fff;
}
