/**
 * Stili per modulo Carrelli Multipli
 * @author DeSantis Team
 */

/* ===== Widget Carrello ===== */
.multicart-widget {
    border: 2px solid #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.multicart-widget .card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #007bff;
    font-weight: 600;
    margin-bottom: 15px;
}

.multicart-widget .material-icons {
    vertical-align: middle;
    font-size: 20px;
}

.multicart-widget .cart-status {
    margin-bottom: 15px;
    color: #333;
}

.multicart-widget .btn-block {
    margin-bottom: 10px;
}

.multicart-widget .alert {
    margin-bottom: 10px;
    padding: 8px 12px;
}

/* ===== Pagina Gestione Carrelli ===== */
.multicart-manager {
    padding: 20px 0;
}

.current-cart-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.current-cart-box .card-title {
    color: white;
    font-weight: bold;
}

.current-cart-box .btn-primary {
    background: white;
    color: #667eea;
    border: none;
    font-weight: 600;
}

.current-cart-box .btn-primary:hover {
    background: #f0f0f0;
    color: #764ba2;
}

/* ===== Card Carrello Salvato ===== */
.cart-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 100%;
}

.cart-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.cart-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.cart-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.cart-name .edit-name-icon {
    font-size: 16px;
    color: #999;
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-name:hover .edit-name-icon {
    opacity: 1;
}

.cart-info .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cart-total {
    font-size: 1.2rem;
    font-weight: bold;
    color: #28a745;
}

.cart-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.cart-actions .btn {
    flex: 1;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 10px;
}

.cart-actions .material-icons {
    font-size: 16px;
}

.form-check {
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* ===== Sezione Unione ===== */
.merge-section {
    text-align: center;
    padding: 20px;
    border-top: 2px solid #eee;
}

#merge-selected-carts {
    min-width: 200px;
}

#merge-selected-carts .material-icons {
    margin-right: 8px;
}

#merge-selected-carts:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Modali ===== */
.modal-header {
    background: #007bff;
    color: white;
}

.modal-header .close {
    color: white;
    opacity: 1;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 15px;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 300px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
}

.toast.success {
    background: #28a745;
    color: white;
}

.toast.error {
    background: #dc3545;
    color: white;
}

.toast.info {
    background: #17a2b8;
    color: white;
}

.toast-body {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-body .material-icons {
    font-size: 24px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== Badge ===== */
.badge {
    font-size: 0.85rem;
    padding: 5px 10px;
}

.badge-primary {
    background: #007bff;
}

/* ===== Alert ===== */
.alert {
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 20px;
}

.alert .material-icons {
    vertical-align: middle;
    margin-right: 8px;
}

.alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* ===== Loading Spinner ===== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .cart-actions {
        flex-direction: column;
    }

    .cart-actions .btn {
        width: 100%;
        min-width: auto;
    }

    .multicart-widget {
        margin-top: 15px;
    }

    .toast-container {
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
    }
}

/* ===== Utility Classes ===== */
.text-muted {
    color: #6c757d !important;
}

.small {
    font-size: 0.875rem;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

