/**
 * Wishlist Sidebar v0.01 - Basic CSS
 * Minimal styling to avoid conflicts
 */


/* Empty wishlist heart icon */
.custom-empty-message .empty-heart-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
    display: block;
}

/* Basic Sidebar Structure */
#ts-wishlist-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100dvh;
    height: 100vh;
    z-index: 9999;
    transition: right 0.3s ease;
    font-family: inherit;
}

@media (max-width: 480px) {
    #ts-wishlist-sidebar {
        right: -100vw;
        width: 100vw;
    }
}

#ts-wishlist-sidebar.active {
    right: 0;
}

/* Overlay */
#ts-wishlist-sidebar .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: -1;
}

#ts-wishlist-sidebar.active .overlay {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Content */
#ts-wishlist-sidebar .ts-sidebar-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    direction: rtl;
}

/* Close Button */
#ts-wishlist-sidebar .close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
    transition: background 0.2s ease;
}

#ts-wishlist-sidebar .close:hover {
    background: #e0e0e0;
}

#ts-wishlist-sidebar .close:before {
    content: '×';
    font-size: 18px;
    font-weight: bold;
    color: #666;
}

/* Header */
#ts-wishlist-sidebar .wishlist-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

#ts-wishlist-sidebar .wishlist-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Content Area */
#ts-wishlist-sidebar .wishlist-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    text-align: center;
}

/* Footer */
#ts-wishlist-sidebar .wishlist-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

/* Body lock when sidebar open */
body.wishlist-sidebar-open {
    overflow: hidden;
}

/* RTL Support */
[dir="rtl"] #ts-wishlist-sidebar {
    right: auto;
    left: -400px;
}

[dir="rtl"] #ts-wishlist-sidebar.active {
    left: 0;
    right: auto;
}

[dir="rtl"] #ts-wishlist-sidebar .close {
    left: auto;
    right: 15px;
}

/* ========================================
   FLOATING SIDEBAR STYLES (from functions.php)
   ======================================== */

.ts-floating-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ts-floating-sidebar.active {
    opacity: 1;
    pointer-events: all;
}

.ts-floating-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.ts-floating-sidebar-content {
    position: absolute;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: #fff;
    z-index: 2;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ts-floating-sidebar.active .ts-floating-sidebar-content {
    right: 0;
}

.ts-floating-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.ts-sidebar-header-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.ts-sidebar-count {
    font-size: 14px;
    color: #666;
}

.ts-sidebar-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.ts-sidebar-close:hover {
    background: #f5f5f5;
    color: #333;
}

.ts-floating-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.wishlist-item {
    padding: 18px 15px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    margin-bottom: 15px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.wishlist-item:hover {
    background-color: #fafafa;
}

.wishlist-item-checkbox {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wishlist-item-remove {
    position: absolute;
    top: 8px;
    left: 8px;
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
    z-index: 2;
    transition: all 0.2s ease;
    padding: 4px;
    width: auto;
    height: auto;
    border-radius: 0;
}

.wishlist-item-remove:hover {
    color: #c82333;
    transform: scale(1.2);
}

.wishlist-item-content {
    display: flex;
    align-items: flex-start;
    margin-right: 35px;
    margin-left: 35px;
    gap: 15px;
}

.wishlist-item-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.wishlist-item-details {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.wishlist-item-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 5px 0;
    line-height: 1.3;
    color: #333;
}

.wishlist-item-price-row {
    margin: 5px 0;
}

.wishlist-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #1b8058;
    margin: 0;
    display: inline;
}

.wishlist-item-weighable-price {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    margin-left: 8px;
    display: inline;
}

.wishlist-item-weighable-price .weighable-price-calc {
    display: inline !important;
    margin-left: 5px !important;
    color: #1b8058 !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

.wishlist-item-price .price-unit {
    font-size: 12px;
    color: #666;
    font-weight: normal;
    margin-left: 3px;
}

.wishlist-item-controls {
    margin-top: 10px;
}

.wishlist-item-controls .add-to-cart-row {
    text-align: center;
    margin-top: 10px;
}

.wishlist-item-controls .add-to-cart-btn,
.wishlist-item-controls .single_add_to_cart_button,
.wishlist-item-controls button[data-add-to-cart],
.wishlist-item-controls .button,
.wishlist-item-controls a.add_to_cart_button,
.wishlist-item-controls a.ajax_add_to_cart,
.wishlist-item-controls a.weighable_add_to_cart {
    display: block !important;
    width: 100% !important;
    background: #1b8058 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 30px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    min-height: auto !important;
    line-height: normal !important;
    text-align: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.wishlist-item-controls .add-to-cart-btn:hover,
.wishlist-item-controls .single_add_to_cart_button:hover,
.wishlist-item-controls button[data-add-to-cart]:hover,
.wishlist-item-controls .button:hover,
.wishlist-item-controls a.add_to_cart_button:hover,
.wishlist-item-controls a.ajax_add_to_cart:hover,
.wishlist-item-controls a.weighable_add_to_cart:hover {
    background: #0f5a3a !important;
    transform: translateY(-1px) !important;
}

.wishlist-item-controls .quantity-controls,
.wishlist-item-controls .weight-controls {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    flex-wrap: wrap !important;
}

.wishlist-item-controls .quantity-controls label,
.wishlist-item-controls .weight-controls label {
    font-size: 12px !important;
    color: #666 !important;
    font-weight: 500 !important;
    margin: 0 !important;
}

.wishlist-item-controls .quantity-input,
.wishlist-item-controls .weight-input,
.wishlist-item-controls input[type="number"] {
    padding: 4px 6px !important;
    border: none !important;
    border-radius: 3px !important;
    font-size: 13px !important;
    text-align: center !important;
    margin: 0 !important;
    background: transparent !important;
}

.wishlist-item-controls .weight-unit,
.wishlist-item-controls .price-display {
    font-size: 12px !important;
    color: #666 !important;
    margin: 0 2px !important;
}

.wishlist-item-controls .shortcode-debug,
.wishlist-item-controls .wc-notice,
.wishlist-item-controls .added-text,
.wishlist-item-controls .added_to_cart,
.wishlist-item-controls a.added_to_cart,
.wishlist-item-controls .wc-forward {
    display: none !important;
}

.wishlist-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.ts-btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.ts-btn-primary-small {
    background: #1b8058;
    color: white;
}

.ts-btn-primary-small:hover {
    background: #0f5a3a;
}

.ts-btn-danger-small {
    background: #dc3545;
    color: white;
}

.ts-btn-danger-small:hover {
    background: #c82333;
}

.ts-floating-sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    flex-shrink: 0;
}

.ts-sidebar-bulk-actions {
    margin-bottom: 15px;
}

.ts-select-all-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.ts-select-all-container input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.ts-sidebar-footer-buttons {
    display: flex;
    gap: 10px;
}

.ts-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.ts-btn-primary {
    background: #1b8058;
    color: white;
}

.ts-btn-primary:hover:not(:disabled) {
    background: #0f5a3a;
}

.ts-btn-secondary {
    background: #6c757d;
    color: white;
}

.ts-btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.ts-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Out of stock wishlist items */
.wishlist-item-out-of-stock {
    opacity: 0.7;
}

.wishlist-item-out-of-stock .wishlist-item-image {
    filter: grayscale(40%);
}

.wishlist-item-stock-status.out-of-stock {
    color: #dc3545;
    font-size: 12px;
    font-weight: bold;
    margin: 2px 0 0;
}

.wishlist-item-add-btn:disabled,
.disabled-out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc !important;
    color: #666 !important;
    pointer-events: none;
}

.wishlist-bulk-blocking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.bulk-loading-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.bulk-spinner {
    font-size: 36px;
    color: #1b8058;
    margin-bottom: 20px;
}

.bulk-loading-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.bulk-loading-content p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.bulk-progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 15px 0;
}

.bulk-progress-bar #bulk-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1b8058, #28a745);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Empty wishlist message */
.custom-empty-message {
    text-align: center;
    padding: 40px 20px;
}

.custom-empty-message h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.custom-empty-message p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.custom-empty-message .button {
    background: #1b8058;
    color: #fff;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.custom-empty-message .button:hover {
    background: #f8c519;
    transform: translateY(-2px);
}

/* Mobile responsiveness - Full screen */
@media (max-width: 768px) {
    .ts-floating-sidebar-content {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        border-radius: 0 !important;
        z-index: 99999 !important;
    }

    .ts-floating-sidebar.active .ts-floating-sidebar-content {
        right: 0 !important;
        transform: translateX(0) !important;
    }

    .ts-floating-sidebar-header {
        padding: 15px !important;
        border-bottom: 1px solid #eee;
    }

    .ts-sidebar-footer {
        padding: 15px !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: #fff !important;
        border-top: 1px solid #eee !important;
    }

    .wishlist-item {
        margin-bottom: 15px !important;
    }

    .wishlist-item-content {
        flex-direction: column;
        gap: 10px;
    }

    .wishlist-item-image {
        width: 80px !important;
        height: 80px !important;
        align-self: center !important;
    }

    .wishlist-item-details {
        text-align: center !important;
    }

    .ts-sidebar-footer-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .ts-sidebar-footer-buttons .ts-btn {
        width: 100% !important;
        padding: 12px !important;
        font-size: 16px !important;
    }
}

@media only screen and (max-width: 767px) {
    .woocommerce .quantity input.qty, .quantity input.qty {
        width: 345px;
    }
}