.koopo-favorite-heart-wrap {
    margin: 0 0 16px;
}

.koopo-favorite-heart {
    --koopo-favorite-color: currentColor;
    --koopo-favorite-background: transparent;
    --koopo-favorite-padding: 0;
    --koopo-favorite-size: 1.35rem;
    --koopo-favorite-active-color: #ffba12;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--koopo-favorite-background);
    color: var(--koopo-favorite-color);
    border-radius: 999px;
    padding: var(--koopo-favorite-padding);
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transform-origin: center;
    will-change: transform, box-shadow, color;
    -webkit-tap-highlight-color: transparent;
    transition: color .2s ease, background-color .2s ease, transform .18s cubic-bezier(.2, .9, .3, 1.2), box-shadow .22s ease, filter .22s ease;
}

.koopo-favorite-heart:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.koopo-favorite-heart.is-active {
    color: var(--koopo-favorite-active-color);
    box-shadow: 0 10px 26px rgba(224, 36, 94, 0.18);
}

.koopo-favorite-heart.is-animating {
    animation: koopoFavoriteActivate .42s cubic-bezier(.2, .9, .3, 1.2);
}

.koopo-favorite-heart__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--koopo-favorite-size);
    height: var(--koopo-favorite-size);
    transition: transform .18s cubic-bezier(.2, .9, .3, 1.2);
}

.koopo-favorite-heart__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.koopo-favorite-heart__icon svg path {
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: fill .2s ease, stroke .2s ease, stroke-width .2s ease;
}

.koopo-favorite-heart.is-active .koopo-favorite-heart__icon svg path {
    fill: currentColor;
    stroke: currentColor;
}

.koopo-favorite-heart:active {
    transform: scale(0.92);
}

.koopo-favorite-heart:active .koopo-favorite-heart__icon {
    transform: scale(0.92);
}

.koopo-favorite-heart.is-pending {
    cursor: progress;
}

.koopo-favorite-heart[data-busy="1"] {
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .koopo-favorite-heart:hover {
        transform: translateY(-1px) scale(1.05);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    }

    .koopo-favorite-heart:hover .koopo-favorite-heart__icon {
        transform: scale(1.08);
    }

    .koopo-favorite-heart.is-active:hover {
        box-shadow: 0 14px 30px rgba(224, 36, 94, 0.24);
    }
}

.koopo-favorite-heart .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

@keyframes koopoFavoriteActivate {
    0% {
        transform: scale(1);
    }

    28% {
        transform: scale(0.9);
    }

    58% {
        transform: scale(1.18);
        color: var(--koopo-favorite-active-color);
    }

    78% {
        transform: scale(0.98);
    }

    100% {
        transform: scale(1);
        color: var(--koopo-favorite-active-color);
    }
}

@media (prefers-reduced-motion: reduce) {
    .koopo-favorite-heart,
    .koopo-favorite-heart__icon,
    .koopo-favorite-heart__icon svg path {
        transition: none;
    }

    .koopo-favorite-heart.is-animating {
        animation: none;
    }
}

.koopo-favorites-app {
    --kfav-bg: #f5f8ff;
    --kfav-border: #d8deea;
    --kfav-text: #1a2436;
    --kfav-muted: #586274;
    --kfav-blue: #1666d8;
    background: linear-gradient(180deg, #fff 0%, var(--kfav-bg) 100%);
    border: 1px solid var(--kfav-border);
    border-radius: 14px;
    padding: 16px;
    color: var(--kfav-text);
}

.koopo-favorites-app .button,
.koopo-favorites-picker .button {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
    padding:5px 8px;
}

.koopo-favorites-app .button:hover,
.koopo-favorites-picker .button:hover {
    background: #ffba12 !important;
    color: #000000 !important;
    border-color: #ffba12 !important;
}

.koopo-favorites-header h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.koopo-favorites-header p {
    margin: 0;
    color: var(--kfav-muted);
}

.koopo-favorites-create-list {
    margin-top: 14px;
    display: flex;
    gap: 10px;
}

.koopo-favorites-create-list input {
    flex: 1;
    min-width: 180px;
}

.koopo-favorites-lists {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.koopo-favorites-list {
    border: 1px solid var(--kfav-border);
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}

.koopo-favorites-list__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.koopo-favorites-list__header h3 {
    margin: 0;
    font-size: 16px;
}

.koopo-favorites-default-tag {
    display: inline-block;
    font-size: 11px;
    line-height: 1;
    border-radius: 999px;
    padding: 3px 7px;
    margin-left: 6px;
    background: #edf4ff;
    color: #275da8;
    vertical-align: middle;
}

.koopo-favorites-list__header small {
    color: var(--kfav-muted);
}

.koopo-favorites-list__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.koopo-favorites-items {
    margin-top: 14px;
}

.koopo-favorites-group + .koopo-favorites-group {
    margin-top: 14px;
}

.koopo-favorites-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.koopo-favorites-group__header h4 {
    margin: 0;
    font-size: 14px;
}

.koopo-favorites-group__header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: #edf4ff;
    color: #275da8;
    font-size: 12px;
    font-weight: 600;
}

.koopo-favorites-group__items {
    display: grid;
    gap: 10px;
}

.koopo-favorites-item-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid #edf1f8;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.koopo-favorites-item__thumb {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    background: #eef3fb;
}

.koopo-favorites-item__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.koopo-favorites-item__thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #111111 0%, #474747 100%);
    color: #ffffff;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
}

.koopo-favorites-item__content {
    min-width: 0;
}

.koopo-favorites-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.koopo-favorites-item__title {
    display: inline-block;
    margin-top: 6px;
    color: var(--kfav-blue);
    text-decoration: none;
    font-weight: 600;
}

.koopo-favorites-item__title:hover {
    text-decoration: underline;
}

.koopo-favorites-item__meta {
    color: var(--kfav-muted);
    font-size: 13px;
}

.koopo-favorites-item__select {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--kfav-muted);
    font-size: 12px;
    white-space: nowrap;
}

.koopo-favorites-item__select input {
    accent-color: #000000;
}

.koopo-favorites-item__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-end;
}

.koopo-favorites-bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #edf1f8;
    border-radius: 12px;
    background: #f9fbff;
}

.koopo-favorites-bulk__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--kfav-text);
}

.koopo-favorites-bulk__toggle input {
    accent-color: #000000;
}

.koopo-favorites-bulk__count {
    color: var(--kfav-muted);
    font-size: 13px;
}

.koopo-favorites-bulk__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.koopo-favorites-empty {
    color: var(--kfav-muted);
}

.koopo-favorites-share-url {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    word-break: break-all;
}

.koopo-favorites-share-url a {
    color: var(--kfav-blue);
}

.koopo-favorites-share-url span {
    color: var(--kfav-muted);
    font-size: 13px;
}

.koopo-favorites-picker[hidden] {
    display: none;
}

.koopo-favorites-picker {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.koopo-favorites-picker__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
}

.koopo-favorites-picker__panel {
    position: relative;
    margin: 8vh auto 0;
    width: min(92vw, 440px);
    background: linear-gradient(180deg, #ffffff 0%, #fff7e6 100%);
    border: 2px solid #ffba12;
    border-radius: 14px;
    padding: 16px 16px 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

.koopo-favorites-picker__panel h3 {
    margin: 0 0 10px;
}

.koopo-favorites-picker__close {
    position: absolute;
    top: 8px;
    right: 8px;
    border: 0;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #101010;
    cursor: pointer;
}

.koopo-favorites-picker__list {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 8px 10px;
    border: 1px solid #e7dfcc;
    border-radius: 10px;
    background: #ffffff;
}

.koopo-favorites-picker__list:hover {
    border-color: #ffba12;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.koopo-favorites-picker__list input {
    accent-color: #000000;
}

.koopo-favorites-picker__create {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.koopo-favorites-picker__create input {
    flex: 1;
}

.koopo-favorites-transfer[hidden] {
    display: none;
}

.koopo-favorites-transfer {
    position: fixed;
    inset: 0;
    z-index: 100000;
}

.koopo-favorites-transfer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .62);
}

.koopo-favorites-transfer__panel {
    position: relative;
    width: min(92vw, 460px);
    margin: 10vh auto 0;
    padding: 18px;
    border: 2px solid #ffba12;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fff7e6 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.koopo-favorites-transfer__close {
    position: absolute;
    top: 8px;
    right: 8px;
    border: 0;
    background: transparent;
    color: #111111;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.koopo-favorites-transfer__form h3 {
    margin: 0 0 6px;
}

.koopo-favorites-transfer__summary,
.koopo-favorites-transfer__hint {
    margin: 0;
    color: var(--kfav-muted);
}

.koopo-favorites-transfer__field {
    display: block;
    margin-top: 14px;
}

.koopo-favorites-transfer__field span {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}

.koopo-favorites-transfer__field select,
.koopo-favorites-transfer__field input {
    width: 100%;
}

.koopo-favorites-transfer__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.koopo-favorites-shared-page {
    padding: 32px 16px;
}

.koopo-favorites-shared-page__inner {
    width: min(100%, 920px);
    margin: 0 auto;
}

@media (max-width: 640px) {
    .koopo-favorites-item-card {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .koopo-favorites-item__thumb {
        width: 56px;
        height: 56px;
    }
}

.koopo-favorites-shared-card {
    border: 1px solid var(--kfav-border);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.koopo-favorites-shared-card h3 {
    margin-top: 0;
}

.koopo-favorites-shared-owner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    color: var(--kfav-muted);
}

.koopo-favorites-shared-owner__avatar {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #ffba12;
}

.koopo-favorites-shared-owner__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.koopo-favorites-shared-owner__content span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.koopo-favorites-shared-owner__content strong {
    color: var(--kfav-text);
}

.koopo-favorites-shared-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.koopo-favorites-shared-actions__status {
    margin: 0;
    color: var(--kfav-muted);
    font-size: 13px;
}

@media (max-width: 640px) {
    .koopo-favorites-create-list {
        flex-direction: column;
    }

    .koopo-favorites-lists {
        grid-template-columns: 1fr;
    }

    .koopo-favorites-picker__panel {
        margin-top: 12vh;
    }

    .koopo-favorites-bulk {
        align-items: flex-start;
    }

    .koopo-favorites-bulk__actions {
        width: 100%;
    }

    .koopo-favorites-transfer__panel {
        margin-top: 12vh;
    }
}
