/**
 * WooCommerce Wishlist Styles
 *
 * @package WooCommerce_Wishlist
 */

/* Wishlist Button */
.wcwl-wishlist-container {
    margin: 10px 0;
    display: inline-block;
    position: relative;
}

/* Icon-only button styling */
.wcwl-wishlist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #333;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1;
    position: relative;
}

.wcwl-wishlist-btn:hover {
    border-color: #d32f2f;
    color: #d32f2f;
    background: #fff5f5;
    transform: scale(1.1);
}

.wcwl-wishlist-btn.wcwl-in-wishlist {
    border-color: #d32f2f;
    background: #d32f2f;
    color: #fff;
}

.wcwl-wishlist-btn.wcwl-in-wishlist:hover {
    background: #b71c1c;
    border-color: #b71c1c;
    transform: scale(1.1);
}

.wcwl-wishlist-btn .wcwl-icon {
    font-size: 20px;
    line-height: 1;
    display: block;
}

.wcwl-wishlist-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Position options for different contexts */
.woocommerce-loop-product__link + .wcwl-wishlist-container,
.product-image + .wcwl-wishlist-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    margin: 0;
}

/* For product thumbnails */
.woocommerce ul.products li.product .wcwl-wishlist-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    margin: 0;
}

.woocommerce ul.products li.product {
    position: relative;
}

.fusion-woo-product,
.fusion-woo-product-wrapper,
.fusion-post-card,
.fusion-woo-product-grid .product {
    position: relative;
}

.fusion-woo-product .wcwl-wishlist-container,
.fusion-woo-product-wrapper .wcwl-wishlist-container,
.fusion-post-card .wcwl-wishlist-container,
.fusion-woo-product-grid .product .wcwl-wishlist-container,
.fusion-carousel .fusion-carousel-item .wcwl-wishlist-container,
.fusion-image-wrapper .wcwl-wishlist-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    margin: 0;
}

/* Single product page */
.woocommerce div.product .wcwl-wishlist-container {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

/* Wishlist Page */
.wcwl-wishlist-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.wcwl-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.wcwl-page-title {
    margin: 0;
    font-size: 32px;
    color: #333;
}

.wcwl-wishlists-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.wcwl-wishlists-sidebar h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.wcwl-wishlists-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wcwl-wishlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.wcwl-wishlist-item:hover {
    border-color: #d32f2f;
    background: #fff5f5;
}

.wcwl-wishlist-item.active {
    border-color: #d32f2f;
    background: #fff5f5;
}

.wcwl-wishlist-link {
    flex: 1;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcwl-wishlist-name {
    font-weight: 500;
}

.wcwl-default-badge {
    font-size: 11px;
    padding: 2px 6px;
    background: #d32f2f;
    color: #fff;
    border-radius: 3px;
    text-transform: uppercase;
}

.wcwl-delete-wishlist-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
    transition: color 0.3s ease;
}

.wcwl-delete-wishlist-btn:hover {
    color: #d32f2f;
}

.wcwl-wishlist-content {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wcwl-wishlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.wcwl-wishlist-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.wcwl-item-count {
    color: #666;
    font-size: 14px;
}

.wcwl-products-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.wcwl-product-item {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.wcwl-product-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.wcwl-product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.wcwl-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wcwl-product-details {
    padding: 15px;
}

.wcwl-product-title {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.wcwl-product-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.wcwl-product-title a:hover {
    color: #d32f2f;
}

.wcwl-product-price {
    font-size: 18px;
    font-weight: 600;
    color: #d32f2f;
    margin-bottom: 10px;
}

.wcwl-product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.wcwl-product-actions .button {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 14px;
}

.wcwl-empty-wishlist,
.wcwl-no-wishlist-selected,
.wcwl-no-wishlists {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.wcwl-login-required {
    text-align: center;
    padding: 40px 20px;
}

/* Modal */
.wcwl-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.wcwl-modal-content {
    background: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.3s ease;
}

.wcwl-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.wcwl-modal-close:hover {
    color: #333;
}

.wcwl-modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.wcwl-modal-content form p {
    margin-bottom: 15px;
}

.wcwl-modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.wcwl-modal-content input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

.wcwl-modal-content input[type="checkbox"] {
    margin-right: 8px;
}

.wcwl-modal-content .button {
    margin-right: 10px;
}

/* Toast Notification */
.wcwl-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #333;
    color: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 300px;
}

.wcwl-toast-show {
    opacity: 1;
    transform: translateX(0);
}

.wcwl-toast-success {
    background: #4caf50;
}

.wcwl-toast-error {
    background: #f44336;
}

/* Responsive */
@media (max-width: 768px) {
    .wcwl-wishlists-container {
        grid-template-columns: 1fr;
    }
    
    .wcwl-wishlists-sidebar {
        margin-bottom: 20px;
    }
    
    .wcwl-products-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .wcwl-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

