/**
 * Woo Advanced Wishlist Frontend CSS
 */

/* Wishlist Container */
.waw-wishlist-container {
    max-width: 100%;
    margin-bottom: 30px;
}

/* Heart Icon (General) */
.waw-wishlist-btn {
    display: inline-block;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #ccc;
    transition: color 0.3s ease, transfrom 0.2s ease;
    margin-left: 10px;
    position: relative;
    top: 3px;
}

.waw-wishlist-btn:hover {
    color: #e24e4e;
    transform: scale(1.1);
}

.waw-wishlist-btn.active {
    color: #f3e5ba !important;
}

.waw-wishlist-btn .dashicons-heart {
    font-size: inherit;
    width: auto;
    height: auto;
}

/* Loop Button Position (Theme Integrated) */
/* Theme handles positioning via wc_btn_inline wrapper */
.wcwl_btn_wrapper .waw-wishlist-btn {
    position: relative;
    top: 0;
    right: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
    margin: 0;
    /* Theme likely handles margins on wrapper */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.wcwl_btn_wrapper .waw-wishlist-btn:hover {
    transform: none;
    /* Let theme handle hover effects if possible, or keep scale */
}

/* Ensure icon is centered and matched to theme */
.wcwl_btn_wrapper .waw-wishlist-btn i {
    font-size: inherit;
    /* Inherit from theme button font size */
    line-height: inherit;
}

/* Ensure icon is visible and integrated */
.wcwl_btn_wrapper .waw-wishlist-btn i {
    font-family: "Amiy Icons" !important;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    display: inline-block;
    color: inherit;
    /* Inherit from button color */
}

/* Default State (Outline) */
.wcwl_btn_wrapper .waw-wishlist-btn i::before {
    content: "\e805";
    /* wdticon-heart-o */
}

/* Active State (Solid) */
.waw-wishlist-btn.active i::before {
    content: "\e804";
    /* wdticon-heart */
}

/* Single Product Button */
.summary .waw-wishlist-btn {
    margin-left: 15px;
    font-size: 24px;
    top: 5px;
    display: inline-block;
    margin-top: 10px;
}

/* Wishlist Table */
.waw-wishlist-container table.shop_table {
    border-collapse: collapse;
    width: 100%;
}

.waw-wishlist-container table.shop_table th,
.waw-wishlist-container table.shop_table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.waw-wishlist-container table.shop_table img {
    max-width: 80px;
    height: auto;
    border-radius: 4px;
}

.waw-remove-from-wishlist {
    color: #e24e4e;
    font-weight: bold;
    font-size: 20px;
    text-decoration: none;
}

.waw-remove-from-wishlist:hover {
    color: #ff0000;
}

/* Stock Status */
.in-stock {
    color: #4AB262;
    font-weight: 600;
}

.out-of-stock {
    color: #e24e4e;
    font-weight: 600;
}

/* Social Share */
.waw-share-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.waw-share-links h4 {
    margin-bottom: 10px;
    font-size: 16px;
}

.waw-share-links a {
    display: inline-block;
    margin-right: 15px;
    text-decoration: none;
    font-weight: 600;
    color: #555;
    transition: color 0.2s;
}

.waw-share-links a:hover {
    color: #0073aa;
}

/* Loading State */
.waw-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.waw-loading:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #e24e4e;
    border-radius: 50%;
    animation: waw-spin 0.6s linear infinite;
}

.waw-loading .dashicons {
    opacity: 0;
}

@keyframes waw-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Notification */
.waw-toast-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.waw-toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

.waw-toast-message.success {
    background-color: #4AB262;
    /* Green */
}

.waw-toast-message.error {
    background-color: #e24e4e;
    /* Red */
}


/* Single Product Alignment Fix */
/* Single Product Alignment Fix (Reverted) */
/* Flexbox removed as requested */

/* Wishlist Icon in Cart Form */
.woocommerce div.product form.cart .waw-wishlist-btn {
    margin-left: 10px !important;
    margin-top: 0 !important;
    top: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: auto;
    text-decoration: none;
    /* Remove underline from link */
}

/* Icon Styling for wdticon */
.waw-wishlist-btn i {
    font-size: 24px;
    /* Adjust as needed to match button height */
    line-height: 1;
    color: inherit;
}

.waw-wishlist-btn:hover i {
    color: #e24e4e;
}

.waw-wishlist-btn.active i::before {
    content: "\e804";
    /* Filled Heart */
    color: #e24e4e;
}

/* Ensure no margin on button interferes */
.woocommerce div.product form.cart .button {
    margin-right: 0;
}

/* Remove Duplicate Icon from Theme/Other Plugins (Aggressive) */
.single-product .add_to_wishlist,
.single-product .yith-wcwl-add-to-wishlist+.add_to_wishlist,
.single-product .cart .add_to_wishlist:nth-of-type(2) {
    display: none !important;
}

/* Force Wishlist Icon Visibility (Disable Hover Effect) */
.product .wcwl_btn_wrapper,
.product-card .add_to_wishlist,
.wishlist-icon,
.yith-wcwl-add-to-wishlist,
.product .waw-wishlist-btn,
.product .yith-wcwl-add-to-wishlist,
.wcwl_btn_wrapper,
.waw-wishlist-btn {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    display: inline-flex !important;
    /* Ensure it keeps flex layout if set */
}

/* User Requested Override: Ensure duplicate is hidden on Single Product */
.single-product .add_to_wishlist {
    display: none !important;
}

/* Button Styling and Wrapper Hide Reverted */

/* Single Product Wishlist Icon Color */
.single-product .yith-wcwl-add-to-wishlist i,
.single-product .yith-wcwl-add-to-wishlist a,
.single-product .wishlist-icon,
.single-product .waw-wishlist-btn i {
    color: #a38383 !important;
    border-color: #a38383 !important;
}

.single-product .yith-wcwl-add-to-wishlist:hover i,
.single-product .waw-wishlist-btn:hover i {
    color: #a38383;
}

/* Header Wishlist Icon Styling */
.header-wishlist-icon {
    vertical-align: middle;
    margin-right: 5px;
    margin-bottom: 3px;
    display: inline-block;
    color: var(--wdtPrimaryColor, #a38383);
    /* Theme color with fallback */
    transition: color 0.3s ease;
}

color: var(--wdtPrimaryColor, #a38383);
opacity: 0.8;
}

/* Wishlist Table Styling */
.wishlist_table td {
    vertical-align: middle !important;
}

/* Hide Social Share */
.waw-share-links,
.yith-wcwl-share {
    display: none !important;
}

/* Hide Stock Status Column/Text */
.wishlist_table .product-stock-status {
    display: none !important;
}

/* Style Add to Cart Button */
.wishlist_table .add_to_cart_button {
    background-color: var(--wdtPrimaryColor, #a38383) !important;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.wishlist_table .add_to_cart_button:hover {
    background-color: #333 !important;
    /* Darker on hover */
    color: #fff !important;
}