/* =============================================================================
   INTERACTIVE COLUMN HEADERS (Sort & Filter)
   ============================================================================= */
.ni-col-header {
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: color 0.15s;
}

.ni-col-header:hover {
    color: #fff;
}

.ni-col-header.ni-filter-active {
    color: #e8a838;
}

.ni-sort-arrow {
    font-size: 0.55em;
    vertical-align: middle;
    margin-left: 2px;
    opacity: 0;
    transition: opacity 0.15s;
}

.ni-sort-arrow.active {
    opacity: 1;
    color: #e8a838;
}

/* Filter dropdown */
.ni-filter-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 200;
    background: #1e2122;
    border: 1px solid hsl(151, 6%, 30%);
    border-radius: 0.3rem;
    padding: 0.5rem 0.6rem;
    min-width: 9vw;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.ni-filter-dropdown-title {
    font-size: 0.6vw;
    color: #7a7672;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ni-filter-option {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72vw;
    color: #d1cdc7;
    padding: 0.15rem 0;
    cursor: pointer;
    white-space: nowrap;
}

.ni-filter-option input[type="checkbox"] {
    accent-color: hsl(151, 40%, 40%);
    cursor: pointer;
    width: 0.75vw;
    height: 0.75vw;
}

.ni-filter-search-input {
    width: 100%;
    background: #181a1b;
    border: 1px solid hsl(151, 6%, 25%);
    color: #d1cdc7;
    padding: 0.25rem 0.4rem;
    font-size: 0.72vw;
    border-radius: 0.2rem;
    outline: none;
}

.ni-filter-search-input:focus {
    border-color: hsl(151, 40%, 40%);
}

.ni-filter-dropdown-actions {
    margin-top: 0.35rem;
    padding-top: 0.25rem;
    border-top: 1px solid hsl(151, 6%, 22%);
    text-align: right;
}

.ni-filter-clear-btn {
    background: none;
    border: none;
    color: #9e9a94;
    font-size: 0.62vw;
    cursor: pointer;
    padding: 0.1rem 0;
}

.ni-filter-clear-btn:hover {
    color: #d1cdc7;
    text-decoration: underline;
}

/* Filter status bar */
.ni-filter-status {
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    margin-bottom: 0.4rem;
    background: hsla(40, 40%, 18%, 0.4);
    border: 1px solid hsla(40, 40%, 30%, 0.4);
    border-radius: 0.2rem;
    color: #e8a838;
    font-size: 0.65vw;
}

.ni-filter-status svg {
    width: 11px;
    height: 11px;
    fill: #e8a838;
    flex-shrink: 0;
}

.ni-filter-status button {
    margin-left: auto;
    background: none;
    border: 1px solid hsla(40, 40%, 30%, 0.4);
    color: #e8a838;
    padding: 0.1rem 0.5rem;
    font-size: 0.6vw;
    border-radius: 0.15rem;
    cursor: pointer;
    transition: background 0.15s;
}

.ni-filter-status button:hover {
    background: hsla(40, 40%, 20%, 0.5);
}

/* =============================================================================
   CURRENTLY RUNNING TAB
   ============================================================================= */
.ni-running-container {
    padding: 0.5rem;
}

.ni-running-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40vh;
    color: #9e9a94;
    font-size: 1vw;
    text-align: center;
}

.ni-running-task {
    border: 1px solid hsl(151, 6%, 28%);
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: hsl(160, 6%, 14%);
}

.ni-running-task-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.3rem;
}

.ni-running-task-collection {
    font-weight: 500;
    color: #d1cdc7;
    font-size: 0.85vw;
}

.ni-running-task-type {
    color: #9e9a94;
    font-size: 0.72vw;
    background: hsl(0, 0%, 20%);
    padding: 0.1rem 0.4rem;
    border-radius: 0.15rem;
}

.ni-running-task-details {
    display: flex;
    gap: 1.2rem;
    font-size: 0.72vw;
    color: #9e9a94;
    flex-wrap: wrap;
}

.ni-running-task-detail-label {
    color: #7a7672;
}

/* Status indicators */
.ni-status-badge {
    font-size: 0.68vw;
    padding: 0.1rem 0.5rem;
    border-radius: 0.15rem;
    font-weight: 500;
    white-space: nowrap;
}

.ni-status-running {
    background: hsl(130, 40%, 20%);
    color: hsl(130, 60%, 65%);
    border: 1px solid hsl(130, 40%, 30%);
}

.ni-status-stopped {
    background: hsl(0, 40%, 20%);
    color: hsl(0, 60%, 65%);
    border: 1px solid hsl(0, 40%, 30%);
}

.ni-status-skipping {
    background: hsl(40, 40%, 20%);
    color: hsl(40, 60%, 65%);
    border: 1px solid hsl(40, 40%, 30%);
}

.ni-status-reason {
    font-size: 0.68vw;
    margin-top: 0.2rem;
}

.ni-status-reason.stopped {
    color: hsl(0, 60%, 65%);
}

.ni-status-reason.skipping {
    color: hsl(40, 60%, 65%);
}

/* Send Edits button (disabled/coming soon) */
.ni-send-edits-btn {
    background: hsl(0, 0%, 25%);
    border: 1px solid hsl(151, 6%, 28%);
    color: #6b6863;
    padding: 0.3rem 1rem;
    font-size: 0.78vw;
    border-radius: 0.2rem;
    cursor: not-allowed;
    opacity: 0.6;
    position: relative;
}

.ni-send-edits-btn:hover::after {
    content: "Coming Soon";
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #d1cdc7;
    padding: 0.2rem 0.5rem;
    border-radius: 0.2rem;
    font-size: 0.65vw;
    white-space: nowrap;
    z-index: 100;
}

/* Coming soon overlay */
.ni-coming-soon-overlay {
    position: relative;
}

.ni-coming-soon-overlay::after {
    content: "Editing running profiles - Coming Soon";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(24, 26, 27, 0.85);
    color: #9e9a94;
    font-size: 1vw;
    z-index: 10;
    border-radius: 0.25rem;
}

/* Running tab header bar */
.ni-running-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.ni-running-header-title {
    font-size: 0.85vw;
    color: #d1cdc7;
}

.ni-running-task-list {
    max-height: 60vh;
    overflow-y: auto;
}

/* Scroll styling for running task list */
.ni-running-task-list::-webkit-scrollbar {
    width: 6px;
}

.ni-running-task-list::-webkit-scrollbar-track {
    background: hsl(160, 6%, 12%);
}

.ni-running-task-list::-webkit-scrollbar-thumb {
    background: hsl(151, 6%, 30%);
    border-radius: 3px;
}
