.oh-vcards {
    --oh-vc-accent: var(--oh-brand-accent, #d41a20);
    --oh-vc-accent-soft: rgba(212, 26, 32, .06);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 150px));
    gap: 10px;
    margin: 2px 0 6px;
}

.oh-vcards-select {
    display: none;
}

.oh-vcards .oh-vcard {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 10px 8px 9px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    outline: none !important;
    color: #1a1a1a;
    font: inherit;
    line-height: 1.25;
    text-align: center;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background-color .2s ease, opacity .2s ease;
}

.oh-vcards .oh-vcard:hover {
    transform: translateY(-2px);
    border-color: #d6d6d6;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.oh-vcards .oh-vcard:active {
    transform: translateY(0) scale(.97);
}

.oh-vcards .oh-vcard:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 26, 32, .18);
}

.oh-vcards .oh-vcard.is-selected {
    border-color: var(--oh-vc-accent);
    background: var(--oh-vc-accent-soft);
    box-shadow: inset 0 0 0 1px var(--oh-vc-accent), 0 6px 16px rgba(212, 26, 32, .12);
}

.oh-vcards .oh-vcard.is-disabled {
    opacity: .38;
    filter: grayscale(1);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.oh-vcard__check {
    position: absolute;
    z-index: 2;
    top: 7px;
    inset-inline-end: 7px;
    width: 18px;
    height: 18px;
    border: 1px solid #d0d0d0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    transition: background-color .2s ease, border-color .2s ease;
}

.oh-vcard.is-selected .oh-vcard__check {
    border-color: var(--oh-vc-accent);
    background: var(--oh-vc-accent);
    animation: oh-vc-pop .35s cubic-bezier(.34, 1.56, .64, 1);
}

.oh-vcard.is-selected .oh-vcard__check::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.oh-vcard__media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 64px;
    margin-bottom: 7px;
    overflow: hidden;
    border-radius: 8px;
}

.oh-vcard__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    transition: transform .35s ease;
}

.oh-vcards .oh-vcard:hover .oh-vcard__img,
.oh-vcards .oh-vcard.is-selected .oh-vcard__img {
    transform: scale(1.07);
}

.oh-vcard__title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    transition: color .2s ease;
}

.oh-vcard.is-selected .oh-vcard__title {
    color: var(--oh-vc-accent);
}

.oh-vcard__subtitle {
    display: block;
    font-size: 11.5px;
    font-weight: 400;
    color: #808080;
}

.variations td.value:has(.oh-vcards) .reset_variations {
    position: static !important;
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    opacity: 1;
}

@keyframes oh-vc-pop {
    0% {
        transform: scale(.4);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 549px) {
    .oh-vcards {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        gap: 8px;
    }

    .oh-vcard__media {
        height: 56px;
    }

    .oh-vcard__title {
        font-size: 12.5px;
    }

    .oh-vcards .oh-vcard:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oh-vcards .oh-vcard,
    .oh-vcard__img,
    .oh-vcard__check {
        transition: none;
        animation: none !important;
    }

    .oh-vcards .oh-vcard:hover,
    .oh-vcards .oh-vcard:active,
    .oh-vcards .oh-vcard:hover .oh-vcard__img,
    .oh-vcards .oh-vcard.is-selected .oh-vcard__img {
        transform: none;
    }
}
