/* Batch Cart Plugin Styles */

.batch-cart-sticky {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    max-width: 400px;
    transition: all 0.3s ease;
}

.batch-cart-sticky.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.batch-cart-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.batch-cart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.batch-selected-info {
    font-size: 0.9em;
    color: #666;
    margin-left: auto;
}

.batch-progress-container {
    padding: 0 15px 15px;
}

.progress {
    height: 6px;
    margin-bottom: 5px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    color: #666;
    font-size: 0.8em;
}

/* Checkbox Container */
.batch-cart-checkbox-container {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    transition: all 0.2s ease;
}

.batch-cart-checkbox-container:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Custom Checkbox Styling */
.batch-cart-checkbox {
    display: none;
}

.batch-cart-checkbox-label {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.batch-cart-checkbox-label::after {
    content: '✓';
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.batch-cart-checkbox:checked + .batch-cart-checkbox-label {
    background-color: #007bff;
    border-color: #007bff;
}

.batch-cart-checkbox:checked + .batch-cart-checkbox-label::after {
    opacity: 1;
}

.batch-cart-checkbox-label:hover {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

/* Quantity Input */
.batch-cart-quantity {
    width: 60px;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 12px;
    padding: 0 4px;
    transition: all 0.2s ease;
}

.batch-cart-quantity:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.batch-cart-quantity:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Toast Notifications */
.batch-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
    max-width: 350px;
}

.batch-toast {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.batch-toast.show {
    transform: translateX(0);
}

.batch-toast.success {
    border-left: 4px solid #28a745;
}

.batch-toast.error {
    border-left: 4px solid #dc3545;
}

.batch-toast.warning {
    border-left: 4px solid #ffc107;
}

.batch-toast-header {
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9em;
}

.batch-toast-body {
    padding: 10px 15px;
    font-size: 0.85em;
    color: #333;
}

.batch-toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.batch-toast-close:hover {
    color: #333;
}

.batch-toast-progress {
    height: 3px;
    background: #f0f0f0;
}

.batch-toast-progress-bar {
    height: 100%;
    background: #007bff;
    transition: width 0.1s ease;
}

.batch-toast-progress.success .batch-toast-progress-bar {
    background: #28a745;
}

.batch-toast-progress.error .batch-toast-progress-bar {
    background: #dc3545;
}

.batch-toast-progress.warning .batch-toast-progress-bar {
    background: #ffc107;
}

/* Responsive Design */
@media (max-width: 768px) {
    .batch-cart-sticky {
        right: 10px;
        left: 10px;
        max-width: none;
        bottom: 10px;
    }
    
    .batch-cart-controls {
        font-size: 0.9em;
    }
    
    .batch-cart-controls .btn {
        padding: 4px 8px;
        font-size: 0.8em;
    }
    
    .batch-selected-info {
        font-size: 0.8em;
        width: 100%;
        margin-left: 0;
        text-align: center;
    }
    
    .batch-toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .batch-cart-checkbox-container {
        top: 5px;
        left: 5px;
        padding: 6px;
        gap: 6px;
    }
    
    .batch-cart-quantity {
        width: 50px;
        height: 24px;
        font-size: 11px;
    }
}

/* Animation für das Ein-/Ausblenden */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.batch-cart-animate-in {
    animation: slideInRight 0.3s ease-out;
}

.batch-cart-animate-out {
    animation: slideOutRight 0.3s ease-in;
}

/* Spezielle Styles für JTL-Shop NOVA Template */
.product-wrapper {
    position: relative;
}

.card .batch-cart-checkbox-container {
    z-index: 15;
}

/* Hover-Effekte für bessere UX */
.batch-cart-checkbox-container .batch-cart-quantity:not(:focus) {
    opacity: 0.7;
}

.batch-cart-checkbox-container:hover .batch-cart-quantity {
    opacity: 1;
}

.batch-cart-checkbox:checked + .batch-cart-checkbox-label + .batch-cart-quantity {
    background-color: #fff;
    border-color: #007bff;
}

/* Loading State */
.batch-cart-loading {
    pointer-events: none;
    opacity: 0.7;
}

.batch-cart-loading .btn {
    position: relative;
}

.batch-cart-loading .btn::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
