/* Algenib Wishlist CSS */

/* Button Base */
.alg-add-to-wishlist {
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    padding: 5px;
    color: var(--alg-btn-color, inherit);
}

.alg-add-to-wishlist:hover {
    color: var(--alg-btn-hover-color, #ff4d4d);
}

.alg-add-to-wishlist.active {
    color: var(--alg-btn-active-color, #ff4d4d);
}

/* Icon Styling */
.alg-add-to-wishlist svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    width: 24px;
    height: 24px;
    transition: all 0.2s ease;
}

/* Active State (Added) */
.alg-add-to-wishlist.active svg {
    fill: currentColor;
    stroke: currentColor;
}

/* Counter Link */
.alg-wishlist-counter-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 8px;
}

/* Icon wrapper — badge positions relative to this */
.ffla-count-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Counter Badge */
.alg-wishlist-count {
    align-items: center;
    background-color: #ff4d4d;
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 10px;
    font-weight: 700;
    height: 18px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: 0;
    top: 0;
    transform: translate(50%, -50%);
    width: 18px;
    pointer-events: none;
}

.alg-wishlist-count.hidden {
    display: none;
}
/* A badge that is not inside an icon wrapper (no icon shown) sits inline
   next to the label instead of floating over a random ancestor. */
.alg-wishlist-counter-link > .alg-wishlist-count {
    position: static;
    transform: none;
    display: inline-flex;
}

.alg-wishlist-counter-link > .alg-wishlist-count.hidden {
    display: none;
}

/* Toast message. Styled here (not inline) so the Custom CSS setting can
   override it with #alg-wishlist-toast { ... }. */
#alg-wishlist-toast {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4343;
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 8px;
    z-index: 9999999;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(255, 67, 67, 0.4);
    transition: opacity 0.4s ease, top 0.4s ease;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 250px;
}

#alg-wishlist-toast.is-visible {
    display: flex;
}

#alg-wishlist-toast.is-shown {
    opacity: 1;
    top: 60px;
}
