.rs-favorite-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(22, 163, 74, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: #166534;
    font-size: 13px;
    font-weight: 750;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.rs-favorite-toggle svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.9;
    transition: fill 0.18s ease, stroke 0.18s ease, transform 0.18s ease;
}

.rs-favorite-toggle:hover,
.rs-favorite-toggle:focus-visible {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #15803d;
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.18);
}

.rs-favorite-toggle.is-active {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.rs-favorite-toggle.is-active svg {
    fill: currentColor;
}

.rs-favorite-toggle.is-loading {
    opacity: 0.68;
    pointer-events: none;
}

.rs-favorite-card {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 8;
    width: 36px;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.rsa-card:hover .rs-favorite-card,
.rsa-card:focus-within .rs-favorite-card,
.rscn-template-card:hover .rs-favorite-card,
.rscn-template-card:focus-within .rs-favorite-card,
.rs-home-template-thumb:hover .rs-favorite-card,
.rs-home-template-thumb:focus-within .rs-favorite-card {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.rs-favorite-toggle.rs-favorite-card {
    margin: 0;
    color: #166534;
    font-size: 13px;
}

.rs-favorite-toggle.rs-favorite-card.is-active {
    color: #fff;
}

.rs-favorite-card .rs-favorite-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rs-home-template-thumb {
    position: relative;
    overflow: hidden;
}

.rs-home-template-thumb .rs-favorite-card {
    right: 10px;
}

.single-favorite-panel {
    margin-bottom: 14px;
}

.rs-favorite-single {
    width: 100%;
    height: 42px;
    justify-content: center;
    background: #fff;
    box-shadow: none;
}

.rs-favorite-single.is-active {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.rs-favorite-single.is-active svg {
    fill: currentColor;
}

@media (max-width: 640px) {
    .rs-favorite-card {
        top: 8px;
        right: 8px;
    }
}
