/* Starter CSS for Belco Calculator */
#belco-calculator {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
}

/* Transport Mode Container */
.transport-mode-container {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 24px;
    box-sizing: border-box;
}

.transport-mode-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.transport-mode-header h3 {
    margin: 0;
    font-size: 25px;
    font-weight: 600;
    color: #333;
}

.gear-icon {
    color: #666;
    flex-shrink: 0;
    font-size: 20px;
}

.transport-options {
    display: flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #f8f9fa;
    padding: 4px;
}

.transport-option {
    flex: 1;
    cursor: pointer;
    margin: 0;
    position: relative;
    transition: all 0.2s ease;
}

.transport-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: #e9ecef;
    border-right: 1px solid #ddd;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #666;
}

.transport-option:last-child .option-content {
    border-right: none;
}

.transport-option:hover .option-content {
    background: #dee2e6;
}

.transport-option.active .option-content,
.transport-option input[type="radio"]:checked + .option-content {
    background: #fff;
    color: #333;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.truck-icon,
.train-icon {
    flex-shrink: 0;
    font-size: 18px;
}

.transport-option.active .truck-icon,
.transport-option.active .train-icon,
.transport-option input[type="radio"]:checked ~ .option-content .truck-icon,
.transport-option input[type="radio"]:checked ~ .option-content .train-icon {
    color: #333;
}

/* Main Container */
.belco-middle-container {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Products Container */
.belco-products-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.belco-products-container h3 {
    margin: 0 0 20px 0;
    padding: 20px 20px 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.subtitle {
    padding: 0 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

/* Current Load Header */
.current-load-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    margin-bottom: 20px;
}

.current-load-header h3 {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.belco-calc-clear-load-btn {
    background: none !important;
    border: 1px solid #e9ecef !important;
    border-radius: 6px !important;
    color: #666 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
    padding: 6px 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    font-family: inherit !important;
    line-height: 1 !important;
}

.belco-calc-clear-load-btn:focus {
    outline: none !important;
    border: 1px solid #e9ecef !important;
}

.belco-calc-clear-load-btn:active {
    border: 1px solid #e9ecef !important;
}

.belco-calc-clear-load-btn i {
    color: #dc3545 !important;
}

.belco-calc-clear-load-btn:hover {
    color: #c82333 !important;
    background: #f8f9fa !important;
}

/* Filter Container */
.filter-container {
    padding: 0 20px;
    margin-bottom: 20px;
}

/* Search Container */
.search-container {
    margin-bottom: 16px !important;
}

.belco-calc-search-wrapper {
    position: relative !important;
}

.belco-calc-search-input {
    width: 100% !important;
    padding: 10px 44px 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: #f8f9fa !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

.belco-calc-search-input:focus {
    outline: none !important;
    border-color: #28a745 !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

.belco-calc-search-icon {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #666 !important;
    font-size: 16px !important;
    pointer-events: none !important;
    z-index: 2 !important;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.filter-buttons::-webkit-scrollbar {
    height: 6px;
}

.filter-buttons::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filter-buttons::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.filter-buttons::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.belco-filter-btn {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.belco-filter-btn:hover {
    border-color: #b0b7bc;
    color: #b0b7bc;
}

.belco-filter-btn.active {
    background: #02702d;
    color: white;
}

/* Product List */
.belco-product-list {
    max-height: 720px;
    overflow-y: auto;
    padding: 0 20px 20px 20px;
    box-sizing: border-box;
}

/* Ensure consistent padding even with scrollbar */
.belco-product-list::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.belco-product-list::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px;
}

.belco-product-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.belco-product-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.no-products {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Product Cards */
.product-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    background: white;
    transition: all 0.2s ease;
}

.product-card:hover {
    border-color: #28a745;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
}

.product-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-size {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.product-sku-small {
    font-weight: 400;
    color: #666;
    font-size: 12px;
}

.product-texture-badge {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.product-info {
    padding: 12px 16px;
}

.product-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
}

.product-specs {
    color: #28a745;
    font-size: 12px;
    font-weight: 500;
}

/* Add to Load */
.add-to-load {
    padding: 12px 16px !important;
    margin: 12px  !important;
}

.belco-calc-add-btn {
    width: 100% !important;
    padding: 8px 12px !important;
    background: #02702D !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-family: inherit !important;
    line-height: 1 !important;
    text-decoration: none !important;
}

.belco-calc-add-btn:hover {
    background: #025622 !important;
}

.belco-calc-add-btn i {
    font-size: 11px !important;
}

/* Selected Products */
.belco-right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.belco-right {
    flex: 1;
}

.belco-selected-list {
    overflow: visible;
    padding: 0 20px 20px 20px;
}

/* Empty Load State */
.empty-load {
    color: #666;
    background: #f8f9fa;
    border: 1px dashed #e9ecef;
    margin: 0 20px;
    min-height: 600px;
    height: calc(100vh - 300px);
    max-height: 800px;
    padding: 20px;
    border-radius: 8px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Empty state content when no products */
.empty-load.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

/* When products are present, use normal layout */
.empty-load.has-products {
    display: block;
    padding: 20px;
}

.empty-icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.empty-text h4 {
    margin: 0 0 8px 0;
    color: #666;
    font-weight: 500;
}

.empty-text p {
    margin: 0;
    font-size: 14px;
    color: #999;
}

/* Selected Product Items */
.selected-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.selected-product-info {
    flex: 1;
    margin-right: 16px;
}

.selected-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.selected-left-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-size {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.selected-sku {
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-spacer {
    width: 0;
}

.sku-code {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.selected-texture {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.selected-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
}

.selected-specs {
    font-size: 11px;
    color: #28a745;
    font-weight: 500;
}

/* Quantity Controls */
.belco-calc-quantity-controls {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-right: 8px !important;
}

.belco-calc-quantity-btn {
    width: 28px !important;
    height: 28px !important;
    border: 1px solid #ddd !important;
    background: white !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    color: #666 !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    line-height: 1 !important;
    padding: 0 !important;
}

.belco-calc-quantity-btn:hover {
    border-color: #28a745 !important;
    color: #28a745 !important;
    background: #f8fff9 !important;
}

.belco-calc-quantity-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.belco-calc-quantity-display {
    min-width: 40px !important;
    width: 40px !important;
    height: 28px !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #2c3e50 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 2px 4px !important;
    background: white !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    line-height: 1 !important;
}

.belco-calc-quantity-display:focus {
    outline: none !important;
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1) !important;
}

/* Hide number input spinner arrows */
.belco-calc-quantity-display::-webkit-outer-spin-button,
.belco-calc-quantity-display::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.belco-calc-quantity-display[type=number] {
    -moz-appearance: textfield !important;
}

/* Remove Button - Updated with specific class */
.belco-calc-remove-btn {
    background: none !important;
    border: none !important;
    color: #dc3545 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
    padding: 4px !important;
    text-decoration: none !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: inherit !important;
    line-height: 1 !important;
}

.belco-calc-remove-btn:hover {
    color: #c82333 !important;
    background: #fff5f5 !important;
    border-radius: 4px !important;
}

/* Truck Load Summary */
.truck-load-summary {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.truck-load-summary h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.truck-load-summary h4 i {
    color: #222;
}

.truck-load-summary h4 i.fas.fa-truck,
.truck-load-summary h4 i.fas.fa-train {
    color: #222 !important;
}

.load-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

/* Progress Container */
.progress-container {
    margin-top: 16px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #27ae60;
    border-radius: 4px;
    transition: all 0.3s ease;
    width: 0%;
}

/* Email Summary Container */
.email-summary-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.email-summary-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.email-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.email-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.email-input:focus {
    outline: none;
    border-color: #222;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.belco-calc-get-summary-btn {
    padding: 10px 16px !important;
    background: #02702D !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    font-family: inherit !important;
    line-height: 1 !important;
    text-decoration: none !important;
}

.belco-calc-get-summary-btn:hover {
    background: #025622 !important;
}

.belco-calc-get-summary-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.belco-calc-get-summary-btn i {
    margin-right: 4px !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .belco-middle-container {
        grid-template-columns: 1fr;
    }
    
    .belco-right-column {
        order: -1;
    }
    
    .load-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #belco-calculator {
        padding: 10px;
    }
    
    .transport-options {
        flex-direction: column;
    }
    
    .filter-buttons {
        gap: 6px;
    }
    
    .filter-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .load-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Scrollbar Styling for Selected List */
.belco-selected-list::-webkit-scrollbar {
    width: 6px;
}

.belco-selected-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.belco-selected-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.belco-selected-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

