/* The heart control on product cards: /inc/wishlist.js paints it; the placements are set by the card's modifier class. */

.cce-wish--overlay,
.cce-wish--overlay-start {
    position: absolute;
    top: 8px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.cce-wish--overlay {
    right: 8px;
}

.cce-wish--overlay-start {
    left: 8px;
    right: auto;
}

.cce-wish--inline {
    display: inline-flex;
    align-items: stretch;
    vertical-align: middle;
}

/* On a phone a clipart bundle card is narrow: the pill moves into the corner so it clears the card's savings badge. */
@media (max-width: 575.98px) {
    .clipart-bundle-card > .cce-wish--overlay {
        top: 4px;
        right: 4px;
    }
}

.cce-wish-heart,
.cce-wish-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 18px;
    line-height: 1;
}

/* The overlay pill holds a 32 px heart and an 18 px arrow; the arrow's click area reaches 32 px past the pill. */
.cce-wish--overlay .cce-wish-caret,
.cce-wish--overlay-start .cce-wish-caret {
    position: relative;
    min-width: 18px;
    width: 18px;
    font-size: 14px;
}

.cce-wish--overlay .cce-wish-caret::before,
.cce-wish--overlay-start .cce-wish-caret::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: -14px;
}

.cce-wish.is-wished .cce-wish-heart {
    color: #dc2626;
}

/* Inline, the pair is a Bootstrap 5.1 .btn-outline-primary button group, so it matches the buy buttons beside it. */
.cce-wish--inline .cce-wish-heart,
.cce-wish--inline .cce-wish-caret {
    min-width: 0;
    min-height: 0;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--bs-primary, #0d6efd);
    border-radius: 0.25rem;
    background: transparent;
    color: var(--bs-primary, #0d6efd);
    font-size: 1rem;
    line-height: 1.5;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.cce-wish--inline .cce-wish-heart {
    border-radius: 0.25rem 0 0 0.25rem;
}

/* Font Awesome sets line-height 1 on the icon; inheriting the button's keeps the pair as tall as a .btn. */
.cce-wish--inline .cce-wish-heart > i,
.cce-wish--inline .cce-wish-caret > i {
    line-height: inherit;
}

.cce-wish--inline .cce-wish-heart + .cce-wish-caret {
    margin-left: -1px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 0 0.25rem 0.25rem 0;
}

.cce-wish--inline .cce-wish-heart:hover,
.cce-wish--inline .cce-wish-caret:hover,
.cce-wish--inline .cce-wish-caret[aria-expanded="true"] {
    background: var(--bs-primary, #0d6efd);
    color: #fff;
}

.cce-wish--inline .cce-wish-heart:focus-visible,
.cce-wish--inline .cce-wish-caret:focus-visible {
    position: relative;
    z-index: 1;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.5);
}

.cce-wish--inline.is-wished .cce-wish-heart {
    color: #dc2626;
}

.cce-wish--inline.is-wished .cce-wish-heart:hover {
    color: #fff;
}

/* Right after a button, the pair keeps a space's gap; after a large one (the resource buy box) it takes .btn-lg's size. */
.btn + .cce-wish--inline {
    margin-left: 0.25rem;
}

.btn-lg + .cce-wish--inline .cce-wish-heart {
    padding: 0.5rem 1rem;
    border-radius: 0.3rem 0 0 0.3rem;
    font-size: 1.25rem;
}

.btn-lg + .cce-wish--inline .cce-wish-heart + .cce-wish-caret {
    padding: 0.5rem 0.75rem;
    border-radius: 0 0.3rem 0.3rem 0;
    font-size: 1.25rem;
}

.cce-wish-heart:disabled,
.cce-wish-caret:disabled {
    opacity: 0.6;
}

.cce-wish-menu {
    min-width: 240px;
    max-height: 320px;
    overflow-y: auto;
}

.cce-wish-menu-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.cce-wish-menu-new {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cce-wish-menu-new .form-control {
    flex: 1 1 auto;
    min-width: 0;
}
