﻿/* ForensicsReport.razor.css */

/* Main Container */
.forensics-container {
    padding: 1rem;
    max-width: 100%;
    overflow-x: auto;
}

/* Header Section */
.forensics-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

    .forensics-header h3 {
        margin: 0;
        font-size: 1.75rem;
        font-weight: 600;
    }

/* Control Panels */
.control-panel {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.control-panel-header {
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* Filter Section */
.filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 6px;
    min-width: 200px;
}

    .filter-group label {
        font-weight: 500;
        color: #495057;
        margin: 0;
        white-space: nowrap;
    }

    .filter-group input[type="search"],
    .filter-group input[type="date"] {
        border: 1px solid #ced4da;
        border-radius: 4px;
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }

        .filter-group input[type="search"]:focus,
        .filter-group input[type="date"]:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
            outline: 0;
        }

/* Radio Button Groups */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0.5rem 0;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

    .radio-option input[type="radio"] {
        margin: 0;
    }

/* Quick Date Buttons */
.quick-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.quick-date-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

    .quick-date-btn:hover {
        background: #667eea;
        color: white;
    }

/* Year Controls */
.year-controls {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.year-controls-header {
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 0.75rem;
}

.year-toggles {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.year-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #2196f3;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

    .year-toggle:hover {
        background: #f5f5f5;
    }

    .year-toggle input[type="checkbox"] {
        margin: 0;
    }

    .year-toggle.active {
        background: #2196f3;
        color: white;
    }

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.btn-primary {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: none;
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

.btn-secondary {
    background: #6c757d;
    border: 1px solid #6c757d;
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-secondary:hover {
        background: #5a6268;
        border-color: #5a6268;
    }

.btn-outline {
    background: transparent;
    border: 1px solid #667eea;
    color: #667eea;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-outline:hover {
        background: #667eea;
        color: white;
    }

/* Results Section */
.results-section {
    margin-top: 2rem;
}

.results-summary {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

    .results-summary h5 {
        color: #155724;
        margin-bottom: 0.75rem;
    }

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #155724;
}

/* Grid Controls */
.grid-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.grid-options {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Grid Styling */
.forensics-grid {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
}

.grid-container {
    overflow-x: auto;
    max-width: 100%;
}

/* Custom QuickGrid Styling */
::deep .quickgrid[theme=corporate] {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #495057;
    border: none;
    width: 100%;
    min-width: 1200px; /* Ensure minimum width for all columns */
}

    ::deep .quickgrid[theme=corporate] .col-title {
        gap: 0.4rem;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
        background: #f8f9fa;
        color: #495057;
        padding: 1rem 0.75rem;
        border-bottom: 2px solid #e9ecef;
    }

    ::deep .quickgrid[theme=corporate] .sort-indicator {
        color: #667eea;
    }

    ::deep .quickgrid[theme=corporate] button.col-title:hover,
    ::deep .quickgrid[theme=corporate] .col-options-button:hover {
        background-color: #e9ecef;
    }

    ::deep .quickgrid[theme=corporate] button.col-title:active,
    ::deep .quickgrid[theme=corporate] .col-options-button:active {
        background-color: #dee2e6;
    }

    ::deep .quickgrid[theme=corporate] tbody tr {
        border-bottom: 1px solid #f1f3f4;
    }

        ::deep .quickgrid[theme=corporate] tbody tr:hover {
            background-color: #f8f9fa;
        }

    ::deep .quickgrid[theme=corporate] td {
        padding: 0.75rem;
        font-size: 0.875rem;
        vertical-align: middle;
    }

/* Table Styling for Non-Grid View */
.forensics-table {
    width: 100%;
    min-width: 1200px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

    .forensics-table thead th {
        background: #f8f9fa;
        color: #495057;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
        padding: 1rem 0.75rem;
        border-bottom: 2px solid #e9ecef;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .forensics-table tbody td {
        padding: 0.75rem;
        font-size: 0.875rem;
        border-bottom: 1px solid #f1f3f4;
        vertical-align: middle;
    }

    .forensics-table tbody tr:hover {
        background-color: #f8f9fa;
    }

/* Loading Spinner */
.loading-container {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.3rem solid #f3f3f3;
    border-top: 0.3rem solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Job History */
.job-history {
    margin-top: 2rem;
}

.job-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.job-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.job-item-actions {
    display: flex;
    gap: 0.5rem;
}

.job-item-info {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .forensics-container {
        padding: 0.5rem;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        min-width: auto;
    }

    .grid-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons {
        flex-direction: column;
    }

    .year-toggles {
        justify-content: center;
    }

    .quick-dates {
        justify-content: center;
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-2 {
    margin-top: 1rem;
}

.p-2 {
    padding: 1rem;
}

/* Column Width Controls */
.column-widths {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* Year Column Visibility */
.year-2023-columns {
    display: table-cell;
}

.year-2024-columns {
    display: table-cell;
}

.year-2025-columns {
    display: table-cell;
}

.year-2023-hidden .year-2023-columns {
    display: none;
}

.year-2024-hidden .year-2024-columns {
    display: none;
}

.year-2025-hidden .year-2025-columns {
    display: none;
}
