/* Packing Station - Styles v2.0 */
/* Gestione stati ordine: nuovo, parziale, completato */

body {
    background-color: #f5f5f5;
}

.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
}

/* Barcode Input */
#barcodeInput {
    font-size: 1.5rem;
    font-family: monospace;
    letter-spacing: 2px;
}

/* Step Icons */
.step-icon {
    font-size: 1.5rem;
    width: 2rem;
    text-align: center;
}

/* Tracking Number Display */
#trackingNumber,
#completedTracking {
    font-family: monospace;
    letter-spacing: 2px;
}

/* Alerts */
.alert {
    border-left: 4px solid;
}

.alert-success {
    border-left-color: #198754;
}

.alert-danger {
    border-left-color: #dc3545;
}

.alert-warning {
    border-left-color: #ffc107;
}

.alert-info {
    border-left-color: #0dcaf0;
}

/* Process Button */
#btnProcess {
    font-size: 1.2rem;
    padding: 1rem;
}

/* Print Button Animation */
#btnPrintLabel {
    animation: pulse 2s infinite;
}

#btnReprintLabel {
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

/* Step Status Colors */
.list-group-item-success {
    background-color: #d1e7dd !important;
}

.list-group-item-danger {
    background-color: #f8d7da !important;
}

.list-group-item-warning {
    background-color: #fff3cd !important;
}

/* Quick Mode Indicator */
#quickModeIndicator {
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Quick Mode Switch */
.form-check-input:checked {
    background-color: #ffc107;
    border-color: #ffc107;
}

/* Partial Shipment Styles */
.table-warning {
    --bs-table-bg: #fff3cd !important;
}

.table-success {
    --bs-table-bg: #d1e7dd !important;
}

.table-danger {
    --bs-table-bg: #f8d7da !important;
}

#partialShipmentAlert {
    border-left: 4px solid #ffc107;
    background-color: #fff3cd;
}

#pickingAlert {
    border-left: 4px solid #dc3545;
    background-color: #f8d7da;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

#partialBadge {
    animation: pulse-warning 1.5s infinite;
}

#pickingBadge {
    animation: pulse-danger 1s infinite;
}

@keyframes pulse-warning {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes pulse-danger {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Totals Display */
#shipTotal {
    color: #198754;
}

/* Items Table */
#itemsTableBody tr.table-warning td {
    font-weight: 500;
}

#itemsTableBody tr.table-danger td {
    font-weight: 600;
}

/* Completed Status Card */
#completedStatusCard {
    border: 2px solid #198754 !important;
}

#completedStatusCard .card-header {
    border-bottom: 1px solid rgba(25, 135, 84, 0.2);
}

/* Quick Actions - Disabled State */
#quickActionsCard .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#quickActionsCard .btn-outline-secondary:disabled {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #6c757d;
}

/* Quick Actions Hint */
#quickActionsHint {
    font-style: italic;
}

/* Disabled Process Button */
#btnProcess:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    animation: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #barcodeInput {
        font-size: 1.2rem;
    }

    #btnProcess {
        font-size: 1rem;
        padding: 0.75rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .form-check-label {
        font-size: 0.875rem;
    }

    #completedStatusCard .fs-2 {
        font-size: 1.5rem !important;
    }
}

/* Loading Modal */
#loadingModal .modal-content {
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 1rem;
}

/* Card Headers */
.card-header {
    font-weight: 600;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Status Badges */
.badge {
    font-weight: 500;
}

/* Form Controls */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Quick Actions */
#quickActionsCard .btn-group .btn {
    flex: 1;
}

/* Result Card */
#resultCard .display-6 {
    color: #0d6efd;
    font-weight: 700;
}

/* Print Success Animation */
.print-success {
    animation: print-pulse 0.5s ease-out;
}

@keyframes print-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Completed Order Status Icons */
#completedStatusCard .text-success {
    color: #198754 !important;
}

#completedStatusCard .text-warning {
    color: #ffc107 !important;
}

#completedStatusCard .text-muted {
    color: #6c757d !important;
}

/* Legenda colori nel footer items */
.card-footer .badge {
    width: 20px;
    height: 12px;
    vertical-align: middle;
}

/* Step picking check */
#stepPickingCheck .step-icon i.bi-check-circle-fill.text-success {
    color: #198754 !important;
}

#stepPickingCheck .step-icon i.bi-x-circle-fill.text-danger {
    color: #dc3545 !important;
}