/* Container handling - Top Row Flex */
.gio-wishlist-container {
    position: relative;
    /* Context for tooltip */
    display: flex;
    justify-content: flex-end;
    /* Align to right */
    width: 100%;
    margin-bottom: 10px;
    /* Space before title */
}

/* Button Reset & Style */
.gio-wishlist-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--theme-palette-color-2, #e91e63);
    /* Always theme color */
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gio-wishlist-btn:hover {
    transform: scale(1.1);
}

.gio-wishlist-btn.active svg {
    fill: var(--theme-palette-color-2, #e91e63);
}

/* Tooltip for Guest */
.gio-wishlist-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    /* Below button */
    right: 0;
    margin-top: 10px;
    width: 200px;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 13px;
    z-index: 100;
}

.gio-wishlist-tooltip:after {
    content: '';
    position: absolute;
    top: -6px;
    right: 6px;
    width: 10px;
    height: 10px;
    background: white;
    border-top: 1px solid #ddd;
    border-left: 1px solid #ddd;
    transform: rotate(45deg);
}

.gio-wishlist-tooltip p {
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
}

.gio-wishlist-tooltip .button {
    padding: 5px 10px;
    font-size: 12px;
    width: auto;
    display: inline-block;
}

/* My Account Menu Icon - Replace default document icon */
.woocommerce-MyAccount-navigation-link--favoritos a::before {
    content: '' !important;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 21.35L10.55 20.03C5.4 15.36 2 12.28 2 8.5C2 5.42 4.42 3 7.5 3C9.24 3 10.91 3.81 12 5.09C13.09 3.81 14.76 3 16.5 3C19.58 3 22 5.42 22 8.5C22 12.28 18.6 15.36 13.45 20.04L12 21.35Z" /></svg>') no-repeat center;
    mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 21.35L10.55 20.03C5.4 15.36 2 12.28 2 8.5C2 5.42 4.42 3 7.5 3C9.24 3 10.91 3.81 12 5.09C13.09 3.81 14.76 3 16.5 3C19.58 3 22 5.42 22 8.5C22 12.28 18.6 15.36 13.45 20.04L12 21.35Z" /></svg>') no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
    margin-right: 10px;
    vertical-align: middle;
    /* Overwrite theme specific font icons */
    font-family: inherit !important;
}

.woocommerce-MyAccount-navigation-link--favoritos i,
.woocommerce-MyAccount-navigation-link--favoritos span.icon {
    display: none !important;
}

/* Empty State Suggestions */
.gio-wishlist-empty-suggestions {
    max-width: 650px;
    /* Limit width */
    margin-top: 20px;
}

.gio-wishlist-empty-suggestions ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

/* Loop Badge */
.gio-wishlist-loop-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    color: var(--theme-palette-color-2, #e91e63);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    /* Let clicks pass through to product link */
}

/* Ensure parent has relative positioning if needed */
.product .woocommerce-LoopProduct-link {
    position: relative;
    display: block;
}

/* Toast Notification */
.gio-wishlist-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    /* Start below screen */
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    color: #fff;
    opacity: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.gio-wishlist-toast.show {
    animation: gioSlideUpFade 0.5s forwards, gioSlideDownFade 0.5s forwards 4s;
}

.gio-wishlist-toast--added {
    background-color: var(--theme-palette-color-3, #2ecc71);
}

.gio-wishlist-toast--removed {
    background-color: #333;
    /* Dark/Neutral */
    color: #fff;
}

@keyframes gioSlideUpFade {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(50px);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes gioSlideDownFade {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(50px);
    }
}