/* Path: assets/css/delivery-order.css */

/* Custom styling for delivery order page */
.delivery-order-container {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Order list styling */
.list-group-item {
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    border-left-color: #0d6efd;
}

.list-group-item.active {
    background-color: #e3f2fd;
    border-left-color: #1976d2;
    color: #1565c0;
}

.list-group-item.selected {
    background-color: #e8f5e8;
    border-left-color: #28a745;
}

/* Checkbox styling */
.form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

/* Card enhancements */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
    border-radius: 8px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0 !important;
}

/* Form styling */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Button enhancements */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Selected orders summary */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Order detail container */
#orderDetailContainer {
    background-color: #fff;
    border-radius: 6px;
}

/* Table styling */
.table-responsive {
    border-radius: 6px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table-sm th,
.table-sm td {
    padding: 0.5rem;
    vertical-align: middle;
}

/* Loading overlay */
#loadingOverlay {
    backdrop-filter: blur(2px);
}

/* Search input styling */
.input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

/* Order item rows */
.order-item {
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
}

/* Faktur input styling */
.border-top {
    border-color: #dee2e6 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .col-md-4 {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        font-size: 0.875rem;
    }
}

/* Animation for selected orders */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selected-order-item {
    animation: fadeIn 0.3s ease;
}

/* Custom scrollbar for order list */
#orderList::-webkit-scrollbar {
    width: 6px;
}

#orderList::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

#orderList::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 6px;
}

#orderList::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Status badges */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
}

/* Form labels */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Required field indicator */
.text-danger {
    font-weight: 600;
}

/* Modal enhancements */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

/* Success state styling */
.text-success {
    color: #28a745 !important;
}

.bg-success {
    background-color: #28a745 !important;
}

/* Warning state styling */
.text-warning {
    color: #ffc107 !important;
}

/* Error state styling */
.text-danger {
    color: #dc3545 !important;
}

/* Info state styling */
.text-info {
    color: #17a2b8 !important;
}

/* Utility classes */
.cursor-pointer {
    cursor: pointer;
}

.border-radius {
    border-radius: 6px;
}

/* Custom transitions */
.transition-all {
    transition: all 0.2s ease;
}

/* SweetAlert2 custom styling for delivery order summary */
.delivery-order-summary-popup {
    font-size: 0.9rem;
}

.delivery-order-summary-popup .swal2-html-container {
    max-height: 70vh;
    overflow-y: auto;
}

.delivery-order-summary-popup .table {
    font-size: 0.85rem;
}

.delivery-order-summary-popup .alert {
    margin-bottom: 1rem;
}

/* Button animation when updating text */
.btn-save-updating {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}