/* Lolo Signalement Report Styles */

.lolo-signalement-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 100%;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Error Messages */
.lolo-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
    font-weight: 500;
}

/* Controls Section */
.lolo-controls-section {
    background: white;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #e1e5e9;
}

.lolo-search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.lolo-search-input {
    flex: 1;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.lolo-search-input:focus {
    outline: none;
    border-color: #0a4b79;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Buttons */
.lolo-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.lolo-btn-primary {
    background: #0a4b79;
    color: white;
}

.lolo-btn-primary:hover {
    background: #083d64;
    transform: translateY(-1px);
}

.lolo-btn-secondary {
    background: #627a91;
    color: white;
}

.lolo-btn-secondary:hover {
    background: #4d607a;
    transform: translateY(-1px);
}

.lolo-btn-view {
    background: #0a4b79;
    color: white;
    font-size: 12px;
    padding: 6px 10px;
    white-space: wrap;
}

.lolo-btn-view:hover {
    background: #083d64;
    transform: translateY(-1px);
}

.lolo-expand-btn {
    background: #0a4b79;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 5px;
    transition: all 0.2s ease;
}

.lolo-expand-btn:hover {
    background: #083d64;
    transform: scale(1.1);
}

/* Advanced Filters Row */
.lolo-advanced-filters-row {
    margin-top: 20px;
    padding: 15px;
    background: #f0f4f8;
    border-radius: 6px;
    border: 1px solid #d1d9e0;
}

/* Dynamic Filters Grid - Two Column Layout */
.lolo-dynamic-filters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 20px;
}

.lolo-filter-group {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.lolo-filter-group > label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

/* Filter Checkboxes */
.lolo-filter-checkboxes {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
}

.lolo-filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    padding: 3px 0;
}

.lolo-filter-checkboxes label:hover {
    background-color: #f8f9fa;
    padding-left: 3px;
    padding-right: 3px;
}

/* Filter Buttons Container */
.lolo-filter-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Filter Section */
.lolo-filter-container {
    margin-top: 20px;
    margin-bottom: 0;
}

.lolo-filter-container h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
}

.lolo-filter-checkboxes input[type="checkbox"] {
    margin: 0;
    accent-color: #0a4b79;
}

/* Date Filters */
.lolo-date-filters-container {
    background: #f0f4f8;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #d1d9e0;
    margin-top: 20px;
    margin-bottom: 20px;
}

.lolo-date-filter-group {
    margin-bottom: 15px;
}

.lolo-date-filter-group > label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.lolo-date-inputs {
    display: flex;
    gap: 20px;
    align-items: center;
}

.lolo-date-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lolo-date-input-wrapper label {
    font-size: 14px;
    color: #495057;
    font-weight: normal;
}

.lolo-date-input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    min-width: 150px;
}

.lolo-date-input:focus {
    outline: none;
    border-color: #0a4b79;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.lolo-date-filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Pagination Controls */
.lolo-pagination-top-controls {
    margin-bottom: 10px;
}

.lolo-per-page-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lolo-per-page-controls label {
    font-size: 14px;
    color: #495057;
}

.lolo-select {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

/* Per-page dropdown hover and focus states */
.lolo-per-page {
    cursor: pointer;
    transition: all 0.2s ease;
}

.lolo-per-page:hover {
    border-color: #0a4b79;
}

.lolo-per-page:focus {
    outline: none;
    border-color: #0a4b79;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Loading state for per-page change */
.lolo-per-page:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading Indicator */
.lolo-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.lolo-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0a4b79;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Table Container */
.lolo-table-container {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
    margin-bottom: 20px;
}

/* Main Table */
.lolo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.lolo-table thead {
    background: linear-gradient(135deg, #0a4b79, #083d64);
    color: white;
}

.lolo-table thead th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #2574a9;
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.lolo-table thead th:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lolo-table thead th.sortable {
    padding-right: 25px;
}

.lolo-table thead th .sort-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.lolo-table thead th .sort-arrow:before {
    content: '';
    position: absolute;
    top: -8px;
    left: -4px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid rgba(255, 255, 255, 0.4);
}

.lolo-table thead th .sort-arrow:after {
    content: '';
    position: absolute;
    top: 4px;
    left: -4px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(255, 255, 255, 0.4);
}

.lolo-table thead th.sorted-asc .sort-arrow:before {
    border-bottom-color: white;
}

.lolo-table thead th.sorted-desc .sort-arrow:after {
    border-top-color: white;
}

/* Table Body */
.lolo-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.lolo-table tbody tr:hover {
    background-color: #f8f9fa;
}

.lolo-table tbody tr:nth-child(even) {
    background-color: #fdfdfe;
}

.lolo-table tbody tr:nth-child(even):hover {
    background-color: #f1f3f4;
}

.lolo-table tbody td {
    padding: 12px 10px;
    vertical-align: top;
    border-right: 1px solid #e9ecef;
    word-wrap: break-word;
    max-width: 200px;
}

.lolo-table tbody td:last-child {
    border-right: none;
}

/* Situation Cell */
.situation-cell {
    position: relative;
    max-width: 300px;
}

.situation-short, .situation-full {
    line-height: 1.4;
}

.situation-full {
    white-space: pre-wrap;
}

/* Dynamic Filter Columns */
.filter-column {
    min-width: 150px;
}

.lolo-filter-select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    transition: filter 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1.2em 1.2em;
    padding-right: 2.5rem;
}

.lolo-filter-select:focus {
    outline: none;
    border-color: #0a4b79;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Dynamic status coloring based on index for status selects */
/* First status option (default) - Yellow */
.lolo-status-select option:nth-child(1) { 
    background-color: #fff3cd; 
    color: #856404; 
}

/* Second status option - Blue */
.lolo-status-select option:nth-child(2) { 
    background-color: #cfe2ff; 
    color: #004085; 
}

/* Third status option - Light Blue */
.lolo-status-select option:nth-child(3) { 
    background-color: #d1ecf1; 
    color: #0c5460; 
}

/* Fourth status option - Green */
.lolo-status-select option:nth-child(4) { 
    background-color: #d4edda; 
    color: #155724; 
}

/* Fifth status option and beyond - Gray */
.lolo-status-select option:nth-child(5),
.lolo-status-select option:nth-child(6),
.lolo-status-select option:nth-child(7),
.lolo-status-select option:nth-child(8),
.lolo-status-select option:nth-child(9),
.lolo-status-select option:nth-child(10) { 
    background-color: #e9ecef; 
    color: #495057; 
}

/* Status select background colors based on selected index */
/* First option selected */
.lolo-status-select:has(option:nth-child(1):checked) {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
    font-weight: 500;
}

/* Second option selected */
.lolo-status-select:has(option:nth-child(2):checked) {
    background-color: #cfe2ff;
    border-color: #b8daff;
    color: #004085;
    font-weight: 500;
}

/* Third option selected */
.lolo-status-select:has(option:nth-child(3):checked) {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
    font-weight: 500;
}

/* Fourth option selected */
.lolo-status-select:has(option:nth-child(4):checked) {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    font-weight: 500;
}

/* Fifth option and beyond selected */
.lolo-status-select:has(option:nth-child(5):checked),
.lolo-status-select:has(option:nth-child(6):checked),
.lolo-status-select:has(option:nth-child(7):checked),
.lolo-status-select:has(option:nth-child(8):checked),
.lolo-status-select:has(option:nth-child(9):checked),
.lolo-status-select:has(option:nth-child(10):checked) {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #495057;
    font-weight: 500;
}

/* Fallback for browsers that don't support :has() - use JavaScript to add classes */
.lolo-status-select.status-1 {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
    font-weight: 500;
}

.lolo-status-select.status-2 {
    background-color: #cfe2ff;
    border-color: #b8daff;
    color: #004085;
    font-weight: 500;
}

.lolo-status-select.status-3 {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
    font-weight: 500;
}

.lolo-status-select.status-4 {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    font-weight: 500;
}

.lolo-status-select.status-5,
.lolo-status-select.status-6,
.lolo-status-select.status-7,
.lolo-status-select.status-8,
.lolo-status-select.status-9,
.lolo-status-select.status-10 {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #495057;
    font-weight: 500;
}

/* Hover effect for filter selects */
.lolo-filter-select:hover {
    filter: brightness(0.95);
}

/* No Data */
.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px !important;
}

/* Pagination */
.lolo-pagination {
    background: white;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.lolo-pagination-info {
    color: #6c757d;
    font-size: 14px;
}

.lolo-pagination-wrapper .lolo-pagination-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.lolo-pagination-btn {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    background: white;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.lolo-pagination-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.lolo-pagination-btn.active {
    background: #0a4b79;
    color: white;
    border-color: #0a4b79;
}

.lolo-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lolo-pagination-dots {
    padding: 6px 8px;
    color: #6c757d;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .lolo-table {
        font-size: 13px;
    }
    
    .lolo-table thead th,
    .lolo-table tbody td {
        padding: 10px 8px;
    }
    
    .lolo-dynamic-filters-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .lolo-filter-buttons {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 992px) {
    .lolo-dynamic-filters-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .lolo-signalement-wrapper {
        padding: 15px;
    }
    
    .lolo-controls-section {
        padding: 15px;
    }
    
    .lolo-search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lolo-search-input {
        max-width: none;
    }
    
    .lolo-date-filters-container {
        padding: 10px;
    }
    
    .lolo-date-inputs {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .lolo-date-input-wrapper {
        width: 100%;
    }
    
    .lolo-date-input {
        width: 100%;
        min-width: auto;
    }
    
    .lolo-date-filter-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .lolo-date-filter-buttons .lolo-btn {
        width: 100%;
    }
    
    .lolo-filter-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .lolo-filter-buttons .lolo-btn {
        width: 100%;
    }
    
    .filter-column {
        min-width: 120px;
    }
    
    .lolo-filter-select {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .lolo-filter-checkboxes {
        flex-direction: column;
    }
    
    .lolo-pagination {
        flex-direction: column;
        text-align: center;
    }
    
    .lolo-pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Make table horizontally scrollable on mobile */
    .lolo-table-container {
        overflow-x: auto;
    }
    
    .lolo-table {
        min-width: 800px;
    }
}

@media (max-width: 480px) {
    .lolo-table {
        font-size: 12px;
        min-width: 700px;
    }
    
    .lolo-table thead th,
    .lolo-table tbody td {
        padding: 8px 6px;
    }
    
    .lolo-pagination-btn {
        padding: 4px 8px;
        font-size: 13px;
    }
}

/* Print Styles */
@media print {
    .lolo-controls-section,
    .lolo-pagination {
        display: none;
    }
    
    .lolo-signalement-wrapper {
        box-shadow: none;
        background: white;
    }
    
    .lolo-table {
        font-size: 12px;
    }
    
    .lolo-expand-btn {
        display: none;
    }
    
    .situation-short {
        display: none;
    }
    
    .situation-full {
        display: block !important;
    }
}

/* Modal Styles */
.lolo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Dossier Modal has same z-index as regular modal */
#lolo-dossier-modal-overlay {
    z-index: 999999;
}

.lolo-modal-content {
    background: white;
    border-radius: 8px;
    width: 95%;
    height: 95%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lolo-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #0a4b79, #083d64);
    color: white;
    border-radius: 8px 8px 0 0;
}

.lolo-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.lolo-modal-header-left {
    flex: 1;
}

.lolo-modal-dates {
    font-size: 14px;
    opacity: 0.9;
    font-weight: normal;
    margin-top: 5px;
}

.lolo-modal-dates span {
    margin-right: 10px;
}

.lolo-modal-close {
    background: none;
    border: none;
    font-size: 30px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.lolo-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lolo-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.lolo-modal-table-container {
    padding: 20px;
}

/* Complete Report Table */
.lolo-complete-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0;
}

.lolo-complete-table thead {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.lolo-complete-table thead th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    border: none;
}

.lolo-complete-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.lolo-complete-table tbody tr:hover {
    background-color: #f8f9fa;
}

.lolo-complete-table tbody tr:nth-child(even) {
    background-color: #fdfdfe;
}

.lolo-complete-table tbody tr:nth-child(even):hover {
    background-color: #f1f3f4;
}

.lolo-complete-table td {
    padding: 15px 20px;
    vertical-align: top;
    border: none;
    word-wrap: break-word;
}

.lolo-complete-table .field-name {
    font-weight: 600;
    color: #2c3e50;
    background: #ecf0f1;
    width: 250px;
    min-width: 250px;
}

.lolo-complete-table .field-value {
    line-height: 1.6;
    max-width: 600px;
}

/* Image Handling in Modal */
.image-container {
    text-align: left;
}

.lolo-attachment-image {
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: block;
    margin-bottom: 0; /* Remove margin since we removed the link */
}

.lolo-attachment-image:hover {
    border-color: #0a4b79;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Special Columns Headers - Grey Background */
/* Dynamic filters and last columns (excluding Actions which has its own style) */
.lolo-table thead th.dynamic-filter-column,
.lolo-table thead th.lolo-dossier-column-header,
.lolo-table thead th:nth-last-child(1) {
    background: #627a91 !important;
    color: white !important;
    border-bottom: 2px solid #4d607a;
}

/* Actions Column Header - Special Color - Must be after general rules to take precedence */
.lolo-table thead th.actions-column-header {
    background: #4a6885 !important;
    color: white !important;
    border-bottom: 2px solid #3a526b;
}

/* Hover effect for Actions column */
.lolo-table thead th.actions-column-header:hover {
    background: #3a526b !important;
}

/* Hover effect for special columns */
.lolo-table thead th.dynamic-filter-column:hover,
.lolo-table thead th.lolo-dossier-column-header:hover,
.lolo-table thead th:nth-last-child(1):hover {
    background: #4d607a !important;
}

/* Actions Column */
.lolo-table .no-sort {
    cursor: default;
}

.actions-column {
    text-align: center;
    min-width: 160px;
    white-space: nowrap;
}

.actions-column .lolo-btn-view {
    min-width: 140px;
}

/* Mobile Modal Responsive */
@media (max-width: 768px) {
    .lolo-modal-overlay {
        padding: 10px;
    }
    
    .lolo-modal-content {
        width: 98%;
        height: 98%;
    }
    
    .lolo-modal-header {
        padding: 15px 20px;
    }
    
    .lolo-modal-header h2 {
        font-size: 18px;
    }
    
    .lolo-modal-table-container {
        padding: 15px;
    }
    
    .lolo-complete-table .field-name {
        width: 120px;
        min-width: 120px;
        font-size: 13px;
    }
    
    .lolo-complete-table td {
        padding: 10px 15px;
        font-size: 13px;
    }
}

/* FIXED: Image Lightbox Styles with MUCH HIGHER z-index */
.lolo-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000000 !important; /* Much higher than modal (999999) */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lolo-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000001 !important; /* Even higher to ensure content is above overlay */
}

.lolo-lightbox-image-container {
    text-align: center;
    position: relative;
}

#lolo-lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lolo-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000002 !important; /* Even higher to be above lightbox content */
    transition: background-color 0.3s ease;
}

.lolo-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lolo-lightbox-prev,
.lolo-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 40px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000002 !important; /* Even higher to be above lightbox content */
    transition: all 0.3s ease;
}

.lolo-lightbox-prev {
    left: 20px;
}

.lolo-lightbox-next {
    right: 20px;
}

.lolo-lightbox-prev:hover,
.lolo-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lolo-lightbox-prev:disabled,
.lolo-lightbox-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lolo-lightbox-caption {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    max-width: 80vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

#lolo-lightbox-counter {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 5px;
}

/* Mobile Lightbox */
@media (max-width: 768px) {
    .lolo-lightbox-prev,
    .lolo-lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
    
    .lolo-lightbox-prev {
        left: 10px;
    }
    
    .lolo-lightbox-next {
        right: 10px;
    }
    
    .lolo-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    #lolo-lightbox-image {
        max-width: 95vw;
        max-height: 75vh;
    }
    
    .lolo-lightbox-caption {
        font-size: 12px;
        padding: 8px 15px;
        max-width: 90vw;
    }
}

/* Video Lightbox Styles */
.lolo-video-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.3s ease;
}

.lolo-video-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000001 !important;
}

.lolo-video-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
}

#lolo-lightbox-video {
    width: 100%;
    max-height: 80vh;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lolo-video-caption {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    max-width: 80vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Video link hover effect */
.video-link {
    position: relative;
}

.video-link:before {
    content: "▶";
    margin-right: 5px;
    color: #627a91;
}

/* Mobile video lightbox */
@media (max-width: 768px) {
    #lolo-lightbox-video {
        max-height: 60vh;
    }
    
    .lolo-video-caption {
        font-size: 12px;
        padding: 8px 15px;
        bottom: -40px;
    }
}
/* Add this CSS to the end of your existing style.css file */

/* Ensure view buttons are always properly styled */
.lolo-btn-view {
    background: #0a4b79 !important;
    color: white !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

.lolo-btn-view:hover {
    background: #083d64 !important;
    transform: translateY(-1px);
}

.lolo-btn-view:disabled {
    background: #627a91 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* Force proper styling on table load */
.lolo-table-container .lolo-btn-view {
    transition: all 0.3s ease;
}

/* Ensure images in modal are clickable */
.lolo-attachment-image {
    cursor: pointer !important;
    transition: all 0.2s ease;
}

.lolo-attachment-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Ensure lightbox has highest z-index - FIXED */
#lolo-lightbox-overlay {
    z-index: 10000000 !important;
}

/* Ensure modal content is properly loaded */
#lolo-modal-table-container {
    min-height: 100px;
}

/* Add this CSS to the end of your existing style.css file */

/* Assignation Column Styles */
.assignation-column {
    min-width: 200px;
    position: relative;
}

.lolo-assignation-wrapper {
    position: relative;
}

.lolo-assignation-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.lolo-assignation-input:focus {
    outline: none;
    border-color: #0a4b79;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.lolo-assignation-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.lolo-user-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lolo-user-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.lolo-user-item:last-child {
    border-bottom: none;
}

.lolo-user-item:hover {
    background-color: #f8f9fa;
}

.lolo-user-item .user-name {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.lolo-user-item .user-email {
    display: block;
    font-size: 12px;
    color: #4d607a;
    margin-top: 2px;
}

.lolo-assigned-user {
    display: flex;
    flex-direction: column; /* Add this to stack elements vertically */
    align-items: flex-start; /* Change from center to flex-start for left alignment */
    gap: 5px;
    background: #e3f2fd;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.lolo-assigned-user .assigned-name {
    font-weight: 500;
    color: #1976d2;
}

.lolo-assigned-user .assigned-email {
    color: #5e92c4;
    font-size: 12px;
}

.lolo-remove-assignment {
    background: rgba(25, 118, 210, 0.2);
    border: none;
    color: #1976d2;
    font-size: 18px;
    line-height: 1;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0; /* Remove auto margin since we're in column layout */
    margin-top: 5px; /* Add some top margin for spacing */
    align-self: flex-end; /* Align the button to the right */
}

.lolo-remove-assignment:hover {
    background: #d32f2f;
    color: white;
}

.lolo-loading-small {
    text-align: center;
    padding: 8px;
    color: #4d607a;
    font-size: 13px;
}

.lolo-assignation-results .no-results,
.lolo-assignation-results .error {
    padding: 12px;
    text-align: center;
    color: #4d607a;
    font-size: 13px;
}

.lolo-assignation-results .error {
    color: #d32f2f;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .assignation-column {
        min-width: 150px;
    }
    
    .lolo-assigned-user {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .lolo-remove-assignment {
        margin-left: 0;
        margin-top: 5px;
    }
}

@media (max-width: 768px) {
    .assignation-column {
        min-width: 120px;
    }
    
    .lolo-assignation-input {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .lolo-assigned-user {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* Add this CSS to the end of your existing style.css file */

/* Editor Info Box */
.lolo-editor-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: #1565c0;
}

.lolo-editor-info p {
    margin: 0;
    font-size: 15px;
}

.lolo-editor-info strong {
    color: #0d47a1;
}

/* Add these styles to your existing style.css file */

/* Search Row Layout */
.lolo-search-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.lolo-search-container {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Investigator Search Container */
.lolo-investigator-search-container {
    min-width: 350px;
    max-width: 400px;
}

.lolo-investigator-search-wrapper {
    position: relative;
}

.lolo-investigator-search-wrapper .lolo-search-input {
    width: 100%;
    margin-bottom: 5px;
}

.lolo-investigator-search-wrapper .lolo-btn {
    margin-right: 5px;
    font-size: 13px;
    padding: 6px 12px;
}

/* Investigator Results Dropdown */
.lolo-investigator-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 35px; /* Account for button row */
}

.lolo-investigator-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lolo-investigator-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.lolo-investigator-item:last-child {
    border-bottom: none;
}

.lolo-investigator-item:hover {
    background-color: #f8f9fa;
}

.lolo-investigator-item.selected {
    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.lolo-investigator-item .investigator-name {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.lolo-investigator-item .investigator-email {
    display: block;
    font-size: 12px;
    color: #4d607a;
    margin-top: 2px;
}

.lolo-investigator-item .investigator-assignments {
    display: block;
    font-size: 11px;
    color: #0a4b79;
    margin-top: 2px;
    font-style: italic;
}

/* Loading and messages in investigator search */
.lolo-investigator-loading {
    text-align: center;
    padding: 15px;
    color: #4d607a;
    font-size: 13px;
}

.lolo-investigator-no-results {
    text-align: center;
    padding: 15px;
    color: #4d607a;
    font-size: 13px;
    font-style: italic;
}

.lolo-investigator-error {
    text-align: center;
    padding: 15px;
    color: #d32f2f;
    font-size: 13px;
}

/* Active investigator filter indicator */
.lolo-investigator-active-filter {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 5px;
    font-size: 12px;
    color: #1565c0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lolo-investigator-active-filter .filter-name {
    font-weight: 500;
}

.lolo-investigator-active-filter .filter-remove {
    background: none;
    border: none;
    color: #1565c0;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.lolo-investigator-active-filter .filter-remove:hover {
    background: rgba(21, 101, 192, 0.1);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .lolo-search-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lolo-investigator-search-container {
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .lolo-search-row {
        gap: 15px;
    }
    
    .lolo-search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lolo-search-input {
        max-width: none;
        margin-bottom: 10px;
    }
    
    .lolo-investigator-search-wrapper .lolo-btn {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .lolo-investigator-results {
        margin-top: 30px;
    }
}

/* Dossier Column Styles */
.dossier-column {
    text-align: center;
    min-width: 180px;
}

.lolo-btn-dossier {
    background: #627a91;
    color: white;
    font-size: 12px;
    padding: 6px 10px;
    white-space: wrap;
    min-width: 160px;
    border: 1px solid #4d607a;
}

.lolo-btn-dossier:hover {
    background: #4d607a;
    transform: translateY(-1px);
}

/* Dossier Modal Styles */
#lolo-dossier-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lolo-dossier-modal-content {
    background: white;
    border-radius: 8px;
    width: 95%;
    height: 95%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.lolo-dossier-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #627a91, #4d607a);
    color: white;
    border-radius: 8px 8px 0 0;
}

.lolo-dossier-header-left {
    flex: 1;
}

.lolo-dossier-modal-header h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
}

.lolo-dossier-dates {
    font-size: 14px;
    opacity: 0.9;
    font-weight: normal;
}

.lolo-dossier-dates span {
    margin-right: 10px;
}

.lolo-dossier-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Dossier Form Styles */
.lolo-dossier-table {
    width: 100%;
}

.lolo-dossier-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
}

.lolo-save-notes {
    margin-top: 10px;
}

/* Notes Container Styles */
.lolo-notes-container {
    margin-bottom: 15px;
}

.lolo-note-item {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.lolo-note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.lolo-note-meta {
    flex: 1;
    font-size: 12px;
    color: #6c757d;
}

.lolo-note-meta span {
    display: block;
    margin-bottom: 2px;
}

.note-created {
    color: #28a745;
}

.note-updated {
    color: #17a2b8;
    font-style: italic;
}

.lolo-note-actions {
    display: flex;
    gap: 5px;
}

.lolo-note-actions button {
    background: none;
    border: 1px solid #ced4da;
    color: #495057;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.lolo-edit-note {
    color: #007bff;
    border-color: #007bff;
}

.lolo-edit-note:hover {
    background: #007bff;
    color: white;
}

.lolo-delete-note {
    color: #dc3545;
    border-color: #dc3545;
    font-weight: bold;
}

.lolo-delete-note:hover {
    background: #dc3545;
    color: white;
}

.lolo-note-content {
    color: #212529;
}

.note-display {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.note-edit {
    margin-top: 10px;
}

.lolo-note-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.note-edit-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.lolo-new-note-form {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.lolo-new-note-form .lolo-note-textarea {
    border-color: #90caf9;
}

.no-notes {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
}

.lolo-add-note {
    width: 100%;
}

/* File Upload Styles */
.lolo-file-upload-area {
    width: 100%;
}

.lolo-dropzone {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.lolo-dropzone.drag-over {
    border-color: #0a4b79;
    background: #e3f2fd;
}

.lolo-dropzone p {
    margin: 0;
    color: #6c757d;
}

.lolo-select-files {
    margin-left: 10px;
}

/* Photo Gallery Styles */
.lolo-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.lolo-photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.lolo-photo-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lolo-dossier-photo {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.lolo-dossier-photo:hover {
    transform: scale(1.05);
}

.lolo-photo-date {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    text-align: center;
}

/* FIXED: Delete file button styles */
.lolo-delete-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #d32f2f;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    z-index: 10;
}

.lolo-delete-file:hover {
    background: #d32f2f;
    color: white;
    transform: scale(1.1);
}

/* File List Styles */
.lolo-file-list {
    margin-top: 20px;
}

.lolo-dossier-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lolo-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.lolo-file-item:hover {
    background: #e9ecef;
}

.file-link {
    color: #0a4b79;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.file-link:hover {
    text-decoration: underline;
}

.file-date {
    color: #6c757d;
    font-size: 12px;
    margin: 0 15px;
}

/* FIXED: Delete button for file lists */
.lolo-file-item .lolo-delete-file {
    position: relative;
    top: auto;
    right: auto;
    flex-shrink: 0;
}

.no-files {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Upload Progress Styles */
.upload-progress {
    margin-top: 10px;
    background: #e9ecef;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: #0a4b79;
    transition: width 0.3s ease;
}

/* Responsive Dossier Styles */
@media (max-width: 768px) {
    .dossier-column {
        min-width: 140px;
    }
    
    .lolo-btn-dossier {
        font-size: 11px;
        padding: 5px 8px;
        min-width: 130px;
    }
    
    .lolo-photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .lolo-dossier-photo {
        height: 100px;
    }
    
    .lolo-file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-date {
        margin: 5px 0;
    }
}

/* Dynamic Filter Columns Headers - Grey Background */
.lolo-table thead th.dynamic-filter-column {
    background: #627a91 !important;
    color: white !important;
    border-bottom: 2px solid #4d607a;
}

/* Hover effect for dynamic filter columns */
.lolo-table thead th.dynamic-filter-column:hover {
    background: #4d607a !important;
}