/* Truckload Form — Allure Theme Styles */

.truckload-form-page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Category header (like SALSAS, FRITOS, etc.) */
.category-header {
    background-color: #af212b;
    color: #fff;
    padding: 10px 16px;
    margin: 20px 0 0 0;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px 4px 0 0;
}

.truckload-grid {
    font-size: 12px;
    margin-bottom: 0;
}

.truckload-grid thead th {
    background-color: #fef3f3;
    color: #333;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}

.truckload-grid tbody td {
    padding: 6px 4px;
    vertical-align: middle;
    font-size: 12px;
}

.truckload-grid .col-num {
    text-align: right;
    white-space: nowrap;
}

.truckload-grid .col-qty {
    width: 80px;
    text-align: center;
}

.truckload-grid .col-name {
    min-width: 200px;
}

.truckload-grid .col-upc, .truckload-grid .col-sku {
    white-space: nowrap;
}

.truckload-grid tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.truckload-grid tbody tr:hover {
    background-color: #fef3f3;
}

.table-responsive {
    border: 1px solid #eee;
    border-radius: 0 0 4px 4px;
    margin-bottom: 10px;
}

/* Hero Banner */
.truckload-hero {
    background-color: #af212b;
    color: #fff;
    padding: 30px 40px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
}

.truckload-hero h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #fff;
}

.truckload-hero p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

/* Truck Capacity Gauge */
.truckload-gauge-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.gauge-label {
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

.gauge-stats {
    font-weight: 600;
    color: #555;
}

.gauge-bar-wrapper {
    background: #e9ecef;
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
    position: relative;
}

.gauge-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease, background-color 0.3s ease;
    min-width: 0;
}

.gauge-green {
    background: linear-gradient(90deg, #28a745, #34ce57);
}

.gauge-yellow {
    background: linear-gradient(90deg, #ffc107, #ffca2c);
}

.gauge-red {
    background: linear-gradient(90deg, #dc3545, #e4606d);
}

.gauge-over {
    background: linear-gradient(90deg, #721c24, #dc3545);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.gauge-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

/* Search Bar */
.truckload-search {
    margin-bottom: 20px;
}

.truckload-search input {
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 100%;
    max-width: 400px;
}

/* Product Table */
.truckload-products {
    margin-bottom: 25px;
    overflow-x: auto;
}

.truckload-products .table {
    width: 100%;
    border-collapse: collapse;
}

.truckload-products .table thead th {
    background-color: #af212b;
    color: #fff;
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    border: none;
}

.truckload-products .table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.15s;
}

.truckload-products .table tbody tr:hover {
    background-color: #fef3f3;
}

.truckload-products .table td {
    padding: 10px;
    vertical-align: middle;
    font-size: 14px;
}

.product-thumb {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
}

.col-image { width: 65px; min-width: 65px; text-align: center; padding: 4px !important; }
.truckload-grid .col-image img.product-thumb { width: 50px !important; height: 50px !important; object-fit: contain; display: inline-block; }
.col-sku { white-space: nowrap; }
.col-weight, .col-price, .col-line-weight, .col-line-price { text-align: right; white-space: nowrap; }
.col-qty { width: 80px; text-align: center; }

.qty-input {
    width: 70px;
    padding: 6px 8px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.qty-input:focus {
    border-color: #af212b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(175, 33, 43, 0.15);
}

/* Totals Bar */
.truckload-totals {
    background: #333;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.totals-row {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.total-item {
    text-align: center;
}

.total-item label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 4px;
    color: #fff;
}

.total-item span {
    font-size: 20px;
    font-weight: 700;
}

/* Notes & Delivery */
.truckload-details {
    margin-bottom: 25px;
}

.truckload-details .form-group {
    margin-bottom: 15px;
}

.truckload-details label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: #333;
}

.truckload-details .form-control {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    max-width: 500px;
}

/* Submit */
.truckload-submit {
    text-align: center;
    margin-bottom: 40px;
}

.truckload-submit .btn-primary {
    background-color: #af212b;
    border-color: #af212b;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.truckload-submit .btn-primary:hover:not(:disabled) {
    background-color: #8e1a22;
    border-color: #8e1a22;
}

.truckload-submit .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.submit-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
}

.submit-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.submit-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .truckload-hero {
        padding: 20px;
    }

    .truckload-hero h1 {
        font-size: 22px;
    }

    .gauge-footer {
        flex-direction: column;
        gap: 4px;
    }

    .totals-row {
        flex-direction: column;
        align-items: center;
    }

    .col-image, .col-sku {
        display: none;
    }

    .truckload-products .table td,
    .truckload-products .table th {
        padding: 8px 6px;
        font-size: 12px;
    }

    .qty-input {
        width: 55px;
    }
}
