/**
 * KiddoBear Wishlist
 *
 * Only the wishlist's own states — the page and cards reuse the theme's
 * markup and classes. Colours come from the theme's CSS variables, with fallbacks.
 */

/* Saved heart — the icon swaps to the filled heart (wishlist.js) */
[data-kbw-toggle].is-active,
.wishlist-btn.is-active,
.wishlist-mobile-btn.is-active {
    color: var(--theme-color, #DB937F);
}

[data-kbw-toggle].is-loading,
[data-kbw-remove].is-loading,
.wishlist-btn.is-loading,
.wishlist-mobile-btn.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Stock line: out of stock */
.box-stock.out .dot {
    background-color: var(--light-color, rgba(84, 65, 59, 0.6));
}

/* Share link box */
.kbw-share-box {
    max-width: 440px;
    margin-top: 16px;
}

.kbw-share-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--light-color, rgba(84, 65, 59, 0.6));
    margin-bottom: 8px;
}

.kbw-share-row {
    display: flex;
    gap: 6px;
}

.kbw-share-row .form-control {
    flex: 1;
    min-width: 0;
    border-radius: 30px;
}

.kbw-share-row .ot-btn {
    flex: none;
    /* border-radius: 10px; */
    padding: 13px 16px;
}

/* Messages and empty states */
.kbw-message {
    font-size: 14px;
    font-weight: 500;
    color: var(--title-color, #54413B);
    margin: 12px 0 0 0;
}

.kbw-notice,
.kbw-filter-empty {
    font-size: 15px;
    color: var(--light-color, rgba(84, 65, 59, 0.6));
    margin: 0 0 20px 0;
}

.kbw-filter-empty {
    margin: 20px 0 0 0;
    text-align: center;
}

.kbw-empty {
    padding: 40px 0 10px 0;
}

.kbw-empty p {
    color: var(--light-color, rgba(84, 65, 59, 0.6));
    margin-bottom: 16px;
}

@media (max-width: 991px) {
    .kbw-share-box {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Popup after saving / removing */
.kbw-popup {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 400px;
    max-width: calc(100% - 32px);
    padding: 14px 40px 14px 14px;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 14px 40px rgba(7, 5, 15, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: 0.3s ease-in-out;
}

.kbw-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.kbw-popup-icon {
    flex: none;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
}

.kbw-popup-icon svg {
    width: 30px;
    height: 30px;
}

.kbw-popup.is-added .kbw-popup-icon {
    color: var(--success-color, #1FC16B);
    background-color: rgba(31, 193, 107, 0.12);
}

.kbw-popup.is-removed .kbw-popup-icon {
    color: var(--error-color, #FF2B2B);
    background-color: rgba(255, 43, 43, 0.1);
}

.kbw-popup .kbw-icon-removed,
.kbw-popup.is-removed .kbw-icon-added {
    display: none;
}

.kbw-popup.is-removed .kbw-icon-removed {
    display: block;
}

.kbw-popup-body {
    flex: 1;
    min-width: 0;
}

.kbw-popup-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2px;
    color: var(--title-color, #54413B);
}

.kbw-popup-name {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    color: var(--light-color, rgba(84, 65, 59, 0.6));
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kbw-popup-link {
    flex: none;
}

.kbw-popup.is-removed .kbw-popup-link {
    display: none;
}

.kbw-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: var(--light-color, rgba(84, 65, 59, 0.6));
    cursor: pointer;
}

.kbw-popup-close:hover {
    color: var(--title-color, #54413B);
}

@media (max-width: 575px) {
    .kbw-popup {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        max-width: none;
    }
}
