/* Custom styles for ZBK Warehouse Receiving */

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.card {
    border: none;
    border-radius: 10px;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border-bottom: none;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

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

.input-group .btn {
    border-radius: 0;
}

.input-group .btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.input-group .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.badge {
    font-size: 0.9em;
    padding: 0.5em 0.75em;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 10px 10px 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 10px 10px;
}

.alert {
    border-radius: 8px;
    border: none;
}

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Button hover effects */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Loading state for generate button */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Print styles for labels */
@media print {
    body * {
        visibility: hidden;
    }
    
    .label-content, .label-content * {
        visibility: visible;
    }
    
    .label-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 2.5in;
        height: 1.0in;
    }
}

/* --- Receiving: Number of Pallets UI --- */
.quick-btn {
    --qb-border: #0d6efd;
    --qb-bg: #eef5ff;
    --qb-text: #0b5ed7;
    border-color: var(--qb-border) !important;
    background-color: var(--qb-bg);
    color: var(--qb-text);
    font-weight: 600;
    padding: 0.45rem 0.8rem;
    border-radius: 9999px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(13, 110, 253, 0.15);
    transition: all 0.15s ease-in-out;
}
.quick-btn:hover,
.quick-btn:focus {
    background-color: #dbe9ff;
    color: #0a58ca;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(13, 110, 253, 0.25);
}
.quick-btn.active {
    background-color: #0d6efd;
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(13,110,253,.35);
}

/* +/- buttons on the quantity input */
#decreaseBtn, #increaseBtn {
    border-color: #adb5bd;
    color: #495057;
    background-color: #f8f9fa;
}
#decreaseBtn:hover, #increaseBtn:hover {
    background-color: #e9ecef;
    color: #212529;
}

/* Make the numeric input text a bit larger for readability */
#quantity.form-control {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Compact list for Available Sources */
#sourceList .list-group-item { 
    padding: .5rem .75rem; 
}
#sourceList .badge { 
    font-size: .85rem; 
}
