/* Admin Table Features - Resizing & Column Picker */

/* Resizers */
.admin-table th {
    position: relative;
    /* user-select: none; allow text selection if not resizing, but preventing selects makes drag simpler */
}

.col-resizer {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background: rgba(255, 255, 255, 0.1);
    cursor: col-resize;
    user-select: none;
    touch-action: none;
    z-index: 10;
}

.col-resizer:hover, .col-resizing {
    background: var(--accent-lime);
}

/* Column Picker Dropdown */
.column-picker-dropdown {
    position: absolute;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow-y: auto;
    width: 200px;
}

.column-picker-dropdown.active {
    display: block;
}

.column-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    cursor: pointer;
    color: #ccc;
    font-size: 0.9rem;
    border-radius: 4px;
}

.column-picker-item:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.column-picker-item input {
    cursor: pointer;
}

.column-picker-header {
    font-weight: bold;
    color: var(--accent-lime);
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Dynamic hiding class appended via JS style injection */
/* e.g. .hide-col-3 { display: none !important; } */

/* ========== Dashboard Accordions ========== */

.admin-accordion-toggle:hover .admin-accordion-arrow {
    color: var(--accent-lime) !important;
}

.admin-accordion-body {
    overflow: hidden;
}

/* ========== Quick Actions HUD ========== */

.admin-qa-hud {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 25500;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.admin-qa-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-lime), #a8cc00);
    border: none;
    color: #000;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(212,255,0,0.3);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-qa-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(212,255,0,0.45);
}

.admin-qa-hud.open .admin-qa-toggle {
    background: #333;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.admin-qa-panel {
    display: none;
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 280px;
    background: #111;
    border: 1px solid #333;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    animation: qaSlideUp 0.2s ease;
}

.admin-qa-hud.open .admin-qa-panel {
    display: block;
}

@keyframes qaSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-qa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #222;
    color: var(--accent-lime);
    font-weight: 600;
    font-size: 0.95rem;
}

.admin-qa-actions {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-qa-btn {
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: 1px solid #222;
    border-radius: 10px;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-qa-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: #444;
    color: white;
}

.admin-qa-btn i {
    width: 20px;
    text-align: center;
}

.admin-qa-btn-primary {
    background: var(--accent-lime);
    color: #000;
    border-color: var(--accent-lime);
    font-weight: 600;
}

.admin-qa-btn-primary:hover {
    background: #c2eb00;
    border-color: #c2eb00;
    color: #000;
}

.admin-qa-btn-danger {
    color: #ff4444;
    border-color: rgba(255,68,68,0.3);
}

.admin-qa-btn-danger:hover {
    background: rgba(255,68,68,0.1);
    border-color: #ff4444;
    color: #ff4444;
}

.admin-qa-btn-warn {
    color: orange;
    border-color: rgba(255,165,0,0.3);
}

.admin-qa-btn-warn:hover {
    background: rgba(255,165,0,0.1);
    border-color: orange;
    color: orange;
}

.admin-qa-divider {
    height: 1px;
    background: #222;
    margin: 6px 0;
}

/* ========== Confirmation Dialog ========== */

.admin-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 26000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.admin-confirm-dialog {
    background: #111;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 30px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}

.admin-confirm-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .admin-qa-hud {
        bottom: 20px;
        right: 16px;
    }
    .admin-qa-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    .admin-qa-panel {
        width: 260px;
        bottom: 62px;
    }
}
