
/* DX WooCommerce Product Table - Shortlist Styles */

:root {
    --dx-wpt-primary-color: #5f6ef4;
    --dx-wpt-secondary-color: #626262;
    --dx-wpt-error-color: #ea4335;
    --dx-wpt-success-color: #14ab54;
    --dx-wpt-white-color: #ffffff;
    --dx-wpt-gray-color: #5f6368;
}

/* Counter Wrapper */
.dx-wpt-counter-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.dx-wpt-counter-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #fe8282;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    margin: 0;
    padding: 0;
}

/* Shortlist Button on Product Images - Icon Only */
.dx-wpt-shortlist-wrapper-icon {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    z-index: 100 !important;
}

.dx-wpt-shortlist-btn-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.dx-wpt-shortlist-btn-icon .dx-wpt-shortlist-icon {
    transition: all 0.3s ease !important;
}

.dx-wpt-shortlist-btn-icon:hover .dx-wpt-shortlist-icon {
    transform: scale(1.2) !important;
}

.dx-wpt-shortlist-btn-icon:hover {
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.dx-wpt-shortlist-btn-icon.shortlisted {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
}

.dx-wpt-shortlist-btn-icon.shortlisted:hover {
    background: #fff !important;
    border: none !important;
}

.dx-wpt-shortlist-btn-icon.loading {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    position: relative !important;
}

.dx-wpt-shortlist-btn-icon.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top: 2px solid var(--dx-wpt-primary-color);
    border-right: 2px solid var(--dx-wpt-primary-color);
    border-radius: 50%;
    animation: dx-pulse-spinner 1s ease-in-out infinite;
    z-index: 1;
}

.dx-wpt-shortlist-btn-icon.loading .dx-wpt-shortlist-icon {
    opacity: 0 !important;
}

@keyframes dx-pulse-spinner {
    0% { 
        transform: translate(-50%, -50%) rotate(0deg) scale(0.8);
        opacity: 0.7;
    }
    50% { 
        transform: translate(-50%, -50%) rotate(180deg) scale(1);
        opacity: 1;
    }
    100% { 
        transform: translate(-50%, -50%) rotate(360deg) scale(0.8);
        opacity: 0.7;
    }
}

/* Ensure action column has relative positioning */
.dx-wpt-action {
    position: relative !important;
}

/* Product Table Shortlist Icon Positioning */
.dx-wpt-shortlist-table-icon {
    position: absolute !important;
    top: 50% !important;
    right: -12px !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
}

/* Shortlist Table Specific Styles */
.dx-shortlist-table {
    margin-top: 20px;
}

/* Row-level Remove Button */
.dx-wpt-remove-shortlist-row {
    position: absolute;
    top: 50%;
    right: 2px;
    margin-top: -12px;
    background: var(--dx-wpt-white-color);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    color: var(--dx-wpt-gray-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.dx-wpt-remove-shortlist-row:hover {
    background: var(--dx-wpt-error-color);
    color: white;
    margin-top: -12px;
    transform: scale(1.2);
}

.dx-wpt-remove-shortlist-row:active {
    margin-top: -12px;
    transform: scale(0.9);
}

.dx-wpt-remove-shortlist-row.loading {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    position: relative !important;
}

.dx-wpt-remove-shortlist-row.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top: 2px solid var(--dx-wpt-error-color);
    border-right: 2px solid var(--dx-wpt-error-color);
    border-radius: 50%;
    animation: dx-pulse-spinner 1s ease-in-out infinite;
    z-index: 1;
}

.dx-wpt-remove-shortlist-row.loading svg {
    opacity: 0 !important;
}

/* Message Styles */
.dx-wpt-message {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: none;
    max-width: 400px;
    text-align: center;
}

.dx-wpt-message-success {
    background: #353535;
}

.dx-wpt-message-error {
    background: #ff4457;
}

.dx-wpt-message:hover {
    opacity: 0.9;
}

.dx-users-shortlist-container .products-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.dx-users-shortlist-container .products-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.dx-users-shortlist-container .products-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.dx-users-shortlist-container .remove-product:hover {
    text-decoration: underline !important;
}

