/* ══════════════════════════════════════════════════════════════════════════
   ContextSelector.css — Premium glassmorphism popover for Scope/Project switching
   ══════════════════════════════════════════════════════════════════════════ */

.ctx-selector {
    display: flex;
    flex-direction: column;
    min-width: 240px;
    font-family: inherit;
    margin: -8px;
}

@keyframes ctx-pop {
    from { opacity: 0; transform: scale(0.96) translateY(-4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Header ────────────────────────────────────────────── */
.ctx-selector-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 12px 14px 12px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ctx-selector-header svg {
    color: var(--accent, #60a5fa);
    opacity: 0.9;
}

.ctx-selector-title {
    flex: 1;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-base, #f8fafc);
}

.ctx-selector-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted, #94a3b8);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 800;
}

/* ── List Area ─────────────────────────────────────────── */
.ctx-selector-list {
    display: block;
    padding: 4px;
}

/* ── Item Row ──────────────────────────────────────────── */
.ctx-selector-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin: 0 0 2px 0 !important;
    padding: 8px;
    box-sizing: border-box !important;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

/* Base icon styling */
.ctx-selector-row-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted, #94a3b8);
    transition: all 0.2s ease;
}

/* Label & Meta */
.ctx-selector-row-label {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim, #cbd5e1);
    transition: color 0.2s ease;
}

.ctx-selector-meta {
    font-size: 10px;
    color: var(--text-muted, #64748b);
    opacity: 0.8;
}

/* ── Interaction States ────────────────────────────────── */
.ctx-selector-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ctx-selector-row:hover .ctx-selector-row-icon {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-base, #f8fafc);
    transform: scale(1.05);
}

.ctx-selector-row:hover .ctx-selector-row-label {
    color: var(--text-base, #ffffff);
}

/* ── Selected State ────────────────────────────────────── */
.ctx-selector-selected {
    background: linear-gradient(90deg, rgba(var(--accent-rgb, 96, 165, 250), 0.15) 0%, transparent 100%) !important;
    box-shadow: 0 0 12px rgba(var(--accent-rgb, 96, 165, 250), 0.15) !important;
}

.ctx-selector-selected .ctx-selector-row-icon {
    background: var(--accent, #60a5fa);
    color: #ffffff;
}

.ctx-selector-selected .ctx-selector-row-label {
    color: var(--text-base, #ffffff);
    font-weight: 700;
}

.ctx-selector-check {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, #60a5fa);
    opacity: 0;
    transform: translateX(-4px) scale(0.8);
    animation: check-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes check-pop {
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* ── Empty State ───────────────────────────────────────── */
.ctx-selector-empty {
    padding: 32px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #64748b);
    font-style: italic;
}
