/* General body styling */
body {
    background-color: #f8f9fa;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Container styling */
.container-fluid {
    height: 100vh;
    display: flex;
    flex-direction: column;
    max-height: 100vh;
}

/* Table styling - Override Bootstrap with more specific selectors */
.table-responsive-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
    height: calc(100vh);
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    background-color: #ffffff;
}

.table-responsive-wrapper .table {
    background-color: #ffffff;
    margin-bottom: 0 !important;
    table-layout: auto;
    width: auto !important;
    font-size: 13px;
}

.table-responsive-wrapper .table th {
    background-color: #007bff !important;
    color: #ffffff !important;
    text-align: center !important;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
    padding: 6px 8px !important;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.table-responsive-wrapper .table td {
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap;
    padding: 4px 6px !important;
    font-size: 12px;
    border: 1px solid #dee2e6 !important;
}

/* Make first column sticky for better navigation */
.table-responsive-wrapper .table th:first-child, .table-responsive-wrapper .table td:first-child {
    position: sticky;
    left: 0;
    background-color: #ffffff;
    z-index: 11;
    box-shadow: 2px 0 2px -1px rgba(0, 0, 0, 0.1);
}

.table-responsive-wrapper .table th:first-child {
    background-color: #007bff !important;
    z-index: 12;
}

/* Hover effects for better readability */
.table-responsive-wrapper .table tbody tr:hover {
    background-color: #f1f3f5;
}

.table-responsive-wrapper .table tbody tr:hover td:first-child {
    background-color: #f1f3f5;
}

/* Compact input fields in table */
.table-responsive-wrapper .table input[type="text"], .table-responsive-wrapper .table input[type="number"], .table-responsive-wrapper .table select {
    padding: 2px 4px;
    font-size: 12px;
    height: auto;
    min-height: 24px;
}

.table-responsive-wrapper .table .btn {
    padding: 2px 6px;
    font-size: 11px;
}

/* Buttons */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

/* Highlight selected image */
.image-selected {
    border: 3px solid #28a745;
    border-radius: 5px;
}

.image-rejected {
    opacity: 0.4;
    filter: grayscale(100%);
}

/* File Upload Form */
#uploadForm {
    border: 1px solid #dddddd;
    padding: 15px;
    border-radius: 5px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Table Actions */
#reviewSection {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#reviewSection .mb-3 {
    flex-shrink: 0;
}

#reviewSection .table-responsive-wrapper {
    flex: 1;
    min-height: 0;
}

/* Responsive Design */

@media (max-width: 768px) {
    .table-responsive-wrapper .table th, .table-responsive-wrapper .table td {
        font-size: 11px !important;
        padding: 4px 4px !important;
    }
    .btn {
        font-size: 12px;
        padding: 4px 8px;
    }
    .table-responsive-wrapper {
        border-radius: 0;
    }
}

@media (max-width: 576px) {
    .table-responsive-wrapper .table th, .table-responsive-wrapper .table td {
        font-size: 10px !important;
        padding: 3px 3px !important;
    }
}

/* Scrollbar styling for better UX */
.table-responsive-wrapper::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

.table-responsive-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.table-responsive-wrapper::-webkit-scrollbar-corner {
    background: #f1f1f1;
}
