/* Consolidated list view styles */

:root {
    --lv-row-even: #ffffff;
    --lv-row-odd: #f3f4f6;
    --lv-row-hover-even: #e8f2ff;
    --lv-row-hover-odd: #dde8ff;
    --lv-row-active: #e3f2fd;
    --lv-row-border: #eaecf0;
    --lv-column-divider: #e5e7eb;
    --lv-header-hover: #eff6ff;
    --lv-header-active: #dbeafe;
    --lv-header-text: #1f2937;
    --lv-header-active-text: #1d4ed8;
}

/* Layout wrappers */
.views-container,
.view-panel,
#listView {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}

.view-panel .panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    min-width: 0;
}

.split-pane-right .panel-content {
    overflow: visible;
}

.clean-table-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0;
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 100%;
}

.clean-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    min-width: 100%;
}

.clean-table th,
.clean-table td {
    border-right: 1px solid var(--lv-column-divider);
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    text-align: center;
    vertical-align: middle;
}

.clean-table thead th {
    padding: 4px 6px;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    font-weight: 600;
}

.clean-table tbody td {
    padding: 4px 6px;
    font-size: 0.74rem;
    line-height: 1.25;
}

.clean-table tbody td .cell-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    font-size: 0.72rem;
    line-height: 1.2;
}

.clean-table thead th:last-child {
    border-right: none;
}

.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
    white-space: nowrap;
    color: var(--lv-header-text);
}

.sortable-header:hover {
    background: var(--lv-header-hover);
}

.sortable-header .header-content {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 6px;
    width: 100%;
    white-space: nowrap;
    justify-content: center;
}

.sortable-header .header-label {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.7rem;
}

.sortable-header .sort-indicators {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.sortable-header .sort-indicators i {
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.sortable-header.sorted-asc,
.sortable-header.sorted-desc {
    background: var(--lv-header-active);
    color: var(--lv-header-active-text);
    box-shadow: inset 0 -3px 0 rgba(29, 78, 216, 0.35);
}

.sortable-header.sorted-asc .sort-icon-default,
.sortable-header.sorted-desc .sort-icon-default {
    display: none !important;
}

.sortable-header.sorted-asc .sort-icon-asc,
.sortable-header.sorted-desc .sort-icon-desc {
    display: inline-flex !important;
    opacity: 1;
}

.sortable-header:hover .sort-icon-default {
    opacity: 0.7;
}

.clean-table tbody tr {
    border-bottom: 1px solid var(--lv-row-border);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.clean-table tbody tr:nth-child(even) {
    background: var(--lv-row-even);
}

.clean-table tbody tr:nth-child(odd) {
    background: var(--lv-row-odd);
}

.clean-table tbody tr:nth-child(even):hover {
    background: var(--lv-row-hover-even);
    box-shadow: 0 1px 3px rgba(56, 117, 233, 0.12);
}

.clean-table tbody tr:nth-child(odd):hover {
    background: var(--lv-row-hover-odd);
    box-shadow: 0 1px 3px rgba(56, 117, 233, 0.12);
}

.clean-table tbody tr:last-child {
    border-bottom: none;
}

.clean-table tbody td:last-child,
.clean-table thead th:last-child {
    border-right: none;
}

.clean-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f8fafc;
    background-clip: padding-box;
    box-shadow: inset 0 -1px 0 var(--lv-row-border);
}

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

.status-column {
    text-align: center;
    vertical-align: middle;
    width: 42px;
    min-width: 38px;
    max-width: 46px;
    padding: 0;
}

.clean-table thead .status-column {
    padding: 0;
}

.status-header-icon {
    font-size: 0.78rem;
    color: var(--lv-header-text);
}

.status-icon {
    display: inline-flex!important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #fff;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}

.status-icon i {
    line-height: 1;
}

.status-checked {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.status-unchecked {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    color: #1f2937;
}

.status-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.status-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.status-ai_checked {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.status-checking {
    background: linear-gradient(135deg, #60a5fa, #1d4ed8);
    color: #fff;
}

.actions-dropdown {
    position: relative;
}

.simple-actions-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.simple-actions-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.actions-dropdown .dropdown-toggle::after {
    display: none;
}

.actions-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    min-width: 220px;
    border-radius: 10px;
    padding: 8px 0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    background: #fff;
    display: none;
    z-index: 5;
}

.actions-dropdown .dropdown-menu.show {
    display: block;
}

.actions-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 10px 16px;
}

.actions-dropdown .dropdown-item:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.actions-dropdown .dropdown-divider {
    margin: 6px 0;
}

.dropdown-active-row {
    position: relative;
    background: var(--lv-row-active) !important;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.15);
    border-color: rgba(33, 150, 243, 0.2);
}

@media (max-width: 992px) {
    .clean-table thead th {
        padding: 5px 7px;
        font-size: 0.68rem;
    }
    .clean-table tbody td {
        padding: 5px 7px;
        font-size: 0.72rem;
    }
    .clean-table tbody td .cell-text {
        -webkit-line-clamp: 3;
    }
    .status-icon {
        min-width: 0;
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 576px) {
    .clean-table tbody tr:hover {
        box-shadow: none;
        transform: none;
    }
}
