/* Sticky Footer */
.bom-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f8f9fa;
    border-top: 2px solid #dee2e6;
    padding: 12px 0;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.bom-sticky-footer.has-selection {
    background: #e7f3ff;
    border-top-color: #007bff;
}

.bom-footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

.bom-selection-info {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.bom-selection-info #selectedItemsCount {
    font-size: 18px;
    font-weight: 700;
    color: #007bff;
    margin-right: 4px;
}

.bom-footer-actions {
    display: flex;
    gap: 10px;
}

.bom-footer-actions .btn {
    min-width: 160px;
}

/* Table Enhancements */
#bomMaterialResult {
    margin-bottom: 80px; /* Space for sticky footer */
}

#bomMaterialResult thead th:first-child {
    width: 40px;
    text-align: center;
}

#bomMaterialResult tbody td:first-child {
    text-align: center;
}

.bom-select-all-checkbox,
.bom-select-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Row Highlight on Selection */
.bom-row:has(.bom-select-checkbox:checked) {
    background-color: #e7f3ff !important;
}

.bom-row:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* Loading Spinner */
.glyphicon-spin {
    animation: spin 1s infinite linear;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .bom-footer-content {
        flex-direction: column;
        gap: 10px;
    }

    .bom-selection-info {
        order: 1;
        text-align: center;
        width: 100%;
    }

    .bom-footer-actions {
        order: 2;
        flex-direction: column;
        width: 100%;
    }

    .bom-footer-actions .btn {
        width: 100%;
    }
}

/* Adjust main content padding to account for footer */
@media (min-width: 769px) {
    body {
        padding-bottom: 80px;
    }
}
