/* Simple Table Styling for Scan Management - Using unified .table-dark from base.css */

.simple-jobs-table,
.simple-unmatched-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing-lg);
    background: var(--bg-dark-secondary);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-light-strong);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.simple-jobs-table th,
.simple-jobs-table td,
.simple-unmatched-table th,
.simple-unmatched-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-white);
}

.simple-jobs-table th,
.simple-unmatched-table th {
    background-color: var(--bg-dark-primary);
    color: var(--text-white);
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--border-light-strong);
}

.simple-jobs-table tr:hover,
.simple-unmatched-table tr:hover {
    background-color: var(--bg-light-overlay);
}

.simple-jobs-table tr:nth-child(even),
.simple-unmatched-table tr:nth-child(even) {
    background-color: var(--bg-transparent-5);
}

/* Jobs table wrapper with scrolling */
.jobs-table-wrapper {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-light-strong);
    border-radius: 10px;
    background: var(--container-glass-primary);
    backdrop-filter: blur(10px);
}

/* Column sizing for jobs table */
.simple-jobs-table th:nth-child(1), /* ID */
.simple-jobs-table td:nth-child(1) {
    width: 80px;
    max-width: 80px;
}

.simple-jobs-table th:nth-child(2), /* Library */
.simple-jobs-table td:nth-child(2) {
    width: 120px;
    max-width: 120px;
}

.simple-jobs-table th:nth-child(4), /* Status */
.simple-jobs-table td:nth-child(4) {
    width: 100px;
    max-width: 100px;
    text-align: center;
}

.simple-jobs-table th:nth-child(5), /* Progress */
.simple-jobs-table td:nth-child(5) {
    width: 150px;
    max-width: 150px;
    text-align: center;
}

.simple-jobs-table th:nth-child(6), /* Actions */
.simple-jobs-table td:nth-child(6) {
    width: 120px;
    max-width: 120px;
    text-align: center;
}

.simple-jobs-table th:nth-child(3), /* Path - takes remaining space */
.simple-jobs-table td:nth-child(3) {
    width: auto;
    min-width: 200px;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status badges */
.status-running {
    color: #007bff;
    font-weight: bold;
}

.status-completed {
    color: #28a745;
    font-weight: bold;
}

.status-failed {
    color: #dc3545;
    font-weight: bold;
}

.status-ignore {
    color: #6c757d;
    font-style: italic;
}

.status-unmatched {
    color: #fd7e14;
    font-weight: bold;
}

.status-pending {
    color: #007bff;
    font-weight: bold;
}

.status-duplicate {
    color: #dc3545;
    font-weight: bold;
}

/* Status-based row background colors for unmatched folders table */
.simple-unmatched-table tr[data-status="Unmatched"] {
    background-color: var(--scan-running-bg) !important;
}

.simple-unmatched-table tr[data-status="Duplicate"] {
    background-color: var(--scan-error-bg) !important;
}

.simple-unmatched-table tr[data-status="Ignore"] {
    background-color: var(--scan-completed-bg) !important;
}

.simple-unmatched-table tr[data-status="Pending"] {
    background-color: var(--scan-info-bg) !important;
}

/* Filter controls styling */
.unmatched-filters {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-white-05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    font-size: 0.875rem;
    border-radius: 6px;
    border: 1px solid var(--border-light-30);
    background: var(--bg-light-overlay);
    color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-btn:hover {
    background: var(--bg-light-overlay-hover);
    border-color: var(--border-white-50);
}

.filter-btn.active {
    background: var(--scan-info-button);
    border-color: #007bff;
    color: #fff;
}

.search-container {
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-light-30);
    border-radius: 6px;
    background: var(--bg-light-overlay);
    color: #fff;
    font-size: 0.875rem;
}

.search-input::placeholder {
    color: var(--text-white-60);
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    background: rgba(255, 255, 255, 0.15);
}

/* Results counter */
.results-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-style: italic;
}

/* Row animations */
.row-fade-out {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease-out;
    pointer-events: none;
}

.simple-unmatched-table tr {
    transition: all 0.3s ease;
}

/* Success notification */
.success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(40, 167, 69, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-light-30);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.success-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.success-notification i {
    font-size: 1.1rem;
}

.success-notification.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Progress bars */
.scan-progress {
    --spacing-sm: 0; /* Neutralize the spacing variable for this component */
}

.scan-progress .progress {
    background-color: var(--bg-light-overlay-hover);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-bottom: 4px;
}

.scan-progress .progress-bar {
    background-color: #007bff;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Progress information layout */
.progress-info {

    font-size: 0.875rem;
    text-align: center;
}

.progress-numbers {
    color: #fff;
    font-weight: bold;
}

.progress-status {
    margin-top: 2px;
    text-align: center;
}

.text-bright-green {
    color: #28a745 !important;
    font-weight: 500;
}

/* Button styling */
.simple-jobs-table .btn,
.simple-unmatched-table .btn {
    margin: 2px;
    padding: 4px 8px;
    font-size: 0.875rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .simple-jobs-table,
    .simple-unmatched-table {
        font-size: 0.875rem;
    }
    
    .simple-jobs-table th,
    .simple-jobs-table td,
    .simple-unmatched-table th,
    .simple-unmatched-table td {
        padding: 8px;
    }
    
    .simple-jobs-table .btn,
    .simple-unmatched-table .btn {
        padding: 2px 6px;
        font-size: 0.75rem;
    }
}

/* Jobs table container styling */
.scan-jobs-card {
    background: var(--bg-light-overlay);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light-strong);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.scan-jobs-card .card-header {
    border-bottom: 1px solid var(--border-light-strong);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.jobs-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.jobs-title-section h4 {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;
}

.jobs-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin: 5px 0 0 0;
    font-size: 0.9rem;
}

.jobs-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.inline-form {
    display: inline;
}

/* Actions styling */
.actions-group {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.actions-group form {
    display: inline;
}

/* Folder path styling */
.folder-path {
    font-family: monospace;
    font-size: 0.9rem;
}

/* Remove old DataTables-specific styles */
.dataTables_wrapper,
.dataTables_length,
.dataTables_filter,
.dataTables_info,
.dataTables_paginate {
    display: none !important;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 20px;
    display: none;
}

.loading-spinner img {
    max-width: 50px;
    height: auto;
}

/* Auto scan styling */
.auto-scan-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-title {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin: 0;
}

/* Config cards */
.config-card,
.path-card,
.action-card {
    background: var(--bg-light-overlay);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light-strong);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    border-bottom: 1px solid var(--border-light-strong);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-title {
    color: #fff;
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-content {
    color: #fff;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.config-item {
    display: flex;
    flex-direction: column;
}

.config-label {
    color: #fff;
    font-weight: bold;
    margin-bottom: 8px;
}

.config-input,
.form-control {
    background: var(--bg-light-overlay);
    border: 1px solid var(--border-light-30);
    border-radius: 8px;
    padding: 10px;
    color: #fff;
}

.config-input:focus,
.form-control:focus {
    background: var(--bg-light-overlay-hover);
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Radio buttons and checkboxes */
.radio-group {
    display: flex;
    gap: 15px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

.options-row {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.option-item {
    display: flex;
    align-items: center;
}

.modern-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Path input styling */
.path-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-with-button {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.path-input {
    flex: 1;
}

.browse-btn {
    white-space: nowrap;
}

/* Folder browser */
.folder-browser {
    margin-top: 15px;
}

.up-btn {
    margin-bottom: 10px;
}

.folder-contents {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px;
    max-height: 400px;
    overflow-y: auto;
}

/* Folder and file item styling */
.folder-item,
.file-item {
    padding: 4px 8px;
    margin: 2px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-item {
    cursor: default;
}

/* Hover effects with blue tint */
.folder-item:hover,
.file-item:hover {
    background-color: rgba(0, 123, 255, 0.15);
    border: 1px solid rgba(0, 123, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

/* File size styling */
.file-size {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-left: 8px;
}

/* Action card */
.action-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.scan-btn {
    font-size: 1.1rem;
    padding: 12px 30px;
}

/* No libraries card */
.no-libraries-card {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    color: #fff;
    max-width: 600px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.no-libraries-card:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.no-libraries-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.no-libraries-content h4 {
    color: #60a5fa;
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.no-libraries-content i {
    font-size: 2.5rem;
    color: #60a5fa;
    margin-bottom: 5px;
    opacity: 0.9;
}

.no-libraries-content p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.no-libraries-content .help-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

/* Elegant button styling */
.btn-elegant {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: white;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
    font-size: 1.05rem;
}

.btn-elegant:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    color: white;
    text-decoration: none;
}

.btn-elegant:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.create-library-btn i {
    font-size: 1.1rem;
}

/* General form styling */
.form-group {
    margin-bottom: 20px;
}

.form-check {
    margin-bottom: 10px;
}

.form-check-label {
    color: #fff;
    margin-left: 5px;
}

.alert {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #f8d7da;
}

/* Tab styling */
.admin_manage_scanjobs-nav-panel {
    background: var(--bg-white-05);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 0;
    margin-bottom: 30px;
}

.container-settings {
    padding: 20px;
}

.admin_manage_scanjobs-nav-tabs {
    border-bottom: 1px solid var(--border-light-strong);
    margin-bottom: 0;
}

.admin_manage_scanjobs-nav-link {
    border: none;
    padding: 15px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin_manage_scanjobs-nav-link:hover {

    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.admin_manage_scanjobs-nav-link.active {
    background: var(--container-glass-primary);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light-strong);
    border-bottom: 3px solid #007bff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.admin_manage_scanjobs-tab-content {
    padding: 30px 0;
}

.admin_manage_scanjobs-tab-panel {
    color: #fff;
}

/* Unmatched folders styling */
.admin_manage_scanjobs-unmatched-container {
    color: #fff;
}

.admin_manage_scanjobs-unmatched-panel {
    background: var(--bg-light-overlay);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light-strong);
    border-radius: var(--border-radius-lg);
    padding: 30px;
}

.admin_manage_scanjobs-tab-header h3 {
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
}

.container-unmatched-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

/* Manual scan styling */
.admin_manage_scanjobs-manual-panel {
    background: var(--bg-light-overlay);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light-strong);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    color: #fff;
}

.admin_manage_scanjobs-library label,
.admin_manage_scanjobs-scanmode label {
    color: #fff;
    font-weight: bold;
    margin-bottom: 8px;
}

.admin_manage_scanjobs-foundgames-header h4 {
    color: #fff;
    margin-bottom: 20px;
}

.admin_manage_scanjobs-list-item {
    background: var(--bg-light-overlay);
    border: 1px solid var(--border-light-strong);
    color: #fff;
    margin-bottom: 10px;
    border-radius: 8px;
}

/* Glass panel effect */
.glass-panel {
    background: var(--bg-light-overlay);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light-strong);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}