/**
 * POS Store Wishlist Styles
 *
 * @package POS_Store
 * @since 4.1.0
 */

/* ==========================================
   Wishlist Button
   ========================================== */

.pos-wishlist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 14px;
    line-height: 1;
}

.pos-wishlist-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.pos-wishlist-btn.active {
    border-color: #e74c3c;
    color: #e74c3c;
}

.pos-wishlist-btn.active .heart-empty {
    display: none;
}

.pos-wishlist-btn.active .heart-filled {
    display: block;
}

.pos-wishlist-btn .heart-filled {
    display: none;
    color: #e74c3c;
}

.pos-wishlist-btn.active .text-add {
    display: none;
}

.pos-wishlist-btn.active .text-remove {
    display: inline;
}

.pos-wishlist-btn .text-remove {
    display: none;
}

/* Loading state */
.pos-wishlist-btn.loading .pos-wishlist-icon,
.pos-wishlist-btn.loading .pos-wishlist-text {
    opacity: 0;
}

.pos-wishlist-btn .pos-wishlist-loading {
    display: none;
}

.pos-wishlist-btn.loading .pos-wishlist-loading {
    display: block;
    position: absolute;
}

.pos-wishlist-btn.loading {
    position: relative;
    pointer-events: none;
}

.pos-wishlist-btn .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Icon-only variant */
.pos-wishlist-btn.icon-only {
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

/* Product loop position */
.woocommerce ul.products li.product .pos-wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.woocommerce ul.products li.product .pos-wishlist-btn:hover {
    background: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Single product page */
.single-product .pos-wishlist-btn {
    margin-top: 10px;
}

/* ==========================================
   Wishlist Page
   ========================================== */

.pos-wishlist-container {
    margin: 20px 0;
}

/* Empty wishlist */
.pos-wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.pos-wishlist-empty-icon {
    color: #ccc;
    margin-bottom: 20px;
}

.pos-wishlist-empty h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #333;
}

.pos-wishlist-empty p {
    margin: 0 0 20px;
    color: #666;
}

/* Stock alert notice */
.pos-wishlist-stock-alert-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #e8f4fd;
    border-left: 4px solid #2196f3;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.pos-wishlist-stock-alert-notice svg {
    flex-shrink: 0;
    color: #2196f3;
}

/* Wishlist table */
.pos-wishlist-table {
    width: 100%;
    border-collapse: collapse;
}

.pos-wishlist-table thead th {
    padding: 15px 10px;
    text-align: left;
    border-bottom: 2px solid #eee;
    font-weight: 600;
    color: #333;
}

.pos-wishlist-table tbody tr {
    border-bottom: 1px solid #eee;
}

.pos-wishlist-table tbody td {
    padding: 15px 10px;
    vertical-align: middle;
}

.pos-wishlist-table .product-remove {
    width: 40px;
    text-align: center;
}

.pos-wishlist-table .product-thumbnail {
    width: 80px;
}

.pos-wishlist-table .product-thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.pos-wishlist-table .product-name a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.pos-wishlist-table .product-name a:hover {
    color: #e74c3c;
}

.pos-wishlist-table .product-sku small {
    color: #999;
    font-size: 12px;
}

.pos-wishlist-table .product-stock .in-stock {
    color: #27ae60;
    font-weight: 500;
}

.pos-wishlist-table .product-stock .out-of-stock {
    color: #e74c3c;
    font-weight: 500;
}

.pos-wishlist-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #999;
    transition: color 0.2s;
}

.pos-wishlist-remove:hover {
    color: #e74c3c;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .pos-wishlist-table thead {
        display: none;
    }

    .pos-wishlist-table tbody tr {
        display: block;
        padding: 15px 0;
    }

    .pos-wishlist-table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 0;
        border: none;
    }

    .pos-wishlist-table tbody td::before {
        content: attr(data-title);
        font-weight: 600;
        color: #333;
    }

    .pos-wishlist-table .product-remove,
    .pos-wishlist-table .product-thumbnail {
        display: none;
    }
}

/* ==========================================
   Wishlist Counter (Header Widget)
   ========================================== */

.pos-wishlist-counter {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.pos-wishlist-counter .count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-wishlist-counter .count.empty {
    display: none;
}

/* Toast notification */
.pos-wishlist-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #333;
    color: #fff;
    border-radius: 4px;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pos-wishlist-toast.success {
    background: #27ae60;
}

.pos-wishlist-toast.error {
    background: #e74c3c;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

