/* ================================================
   Context Menu — Custom Retro Terminal Style
   ================================================ */
.kookoawpf-context-menu {
    position: fixed;
    z-index: 200000;
    background: var(--kookoawpf-bg);
    border: 1px solid var(--kookoawpf-green);
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8), 0 0 10px rgba(57,255,20,0.1);
    padding: 4px 0;
    min-width: 200px;
    font-family: var(--kookoawpf-font);
}

.kookoawpf-ctx-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.kookoawpf-ctx-list > li:last-child {
    margin-bottom: 0;
}

.kookoawpf-ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    color: var(--kookoawpf-text);
    font-size: 13px;
    font-family: var(--kookoawpf-font);
    transition: background 0.15s;
}

.kookoawpf-ctx-item:hover {
    background: var(--kookoawpf-green-glow);
    color: var(--kookoawpf-green);
}

.kookoawpf-ctx-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--kookoawpf-green-soft);
    flex-shrink: 0;
}

.kookoawpf-ctx-item:not(.kookoawpf-ctx-disabled):hover > .dashicons {
    color: var(--kookoawpf-green);
}
.kookoawpf-ctx-locked-delete:not(.kookoawpf-ctx-danger):hover > .dashicons {
    color: var(--kookoawpf-green-soft) !important;
}
.kookoawpf-ctx-locked-delete.kookoawpf-ctx-danger:hover > .dashicons {
    color: var(--kookoawpf-red) !important;
}
.kookoawpf-ctx-submenu .kookoawpf-ctx-item .dashicons {
    color: var(--kookoawpf-green-soft);
}
.kookoawpf-ctx-submenu .kookoawpf-ctx-item:hover .dashicons {
    color: var(--kookoawpf-green);
}

/* Separator */
.kookoawpf-ctx-sep {
    height: 1px;
    background: #39FF14;
    margin: 4px 12px;
    list-style: none;
}

/* Delete item — red */
.kookoawpf-ctx-danger {
    color: var(--kookoawpf-red) !important;
}

.kookoawpf-ctx-danger .dashicons {
    color: var(--kookoawpf-red) !important;
}

.kookoawpf-ctx-danger:hover {
    background: rgba(248, 81, 73, 0.1) !important;
    color: var(--kookoawpf-red) !important;
}

/* Context Menu — Disabled item */
.kookoawpf-ctx-disabled {
    cursor: default !important;
    pointer-events: auto;
}
.kookoawpf-ctx-disabled > .dashicons,
.kookoawpf-ctx-disabled > span:not(.kookoawpf-ctx-locks):not(.kookoawpf-ctx-pro-badge) {
    opacity: 0.35;
}
.kookoawpf-ctx-disabled:hover {
    background: transparent !important;
    color: var(--kookoawpf-text) !important;
}

/* Context Menu — Locked Delete (strikethrough + lock icons) */
.kookoawpf-ctx-locked-delete {
    cursor: default !important;
    pointer-events: auto;
}
.kookoawpf-ctx-locked-delete:hover {
    background: transparent !important;
    color: var(--kookoawpf-text) !important;
}
.kookoawpf-ctx-locked-delete.kookoawpf-ctx-danger:hover {
    color: var(--kookoawpf-red) !important;
}
.kookoawpf-ctx-locked-delete .kookoawpf-ctx-strike {
    text-decoration: line-through;
}
.kookoawpf-ctx-locks {
    margin-left: 6px;
    display: flex;
    gap: 1px;
}
.kookoawpf-ctx-locks .dashicons {
    color: #F5BF42 !important;
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
}

/* Context Menu — Submenu (Move Folder) */
.kookoawpf-ctx-has-sub {
    position: relative;
}
.kookoawpf-ctx-has-sub > .kookoawpf-ctx-submenu {
    display: none;
    position: absolute;
    top: -6px;
    left: 100%;
    min-width: 160px;
    background: var(--kookoawpf-bg);
    border: 1px solid var(--kookoawpf-green);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 8px rgba(57, 255, 20, 0.1);
    padding: 4px 0;
    list-style: none;
    margin: 0;
    z-index: 10001;
}
.kookoawpf-ctx-has-sub.kookoawpf-ctx-sub-open > .kookoawpf-ctx-submenu {
    display: block;
}
.kookoawpf-ctx-arrow {
    margin-left: auto;
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
    color: var(--kookoawpf-green-dim);
    padding-left: 12px;
}
.kookoawpf-ctx-has-sub.kookoawpf-ctx-sub-open > .kookoawpf-ctx-arrow {
    color: var(--kookoawpf-green);
}
/* Make the parent item a flex row so arrow goes to the right */
.kookoawpf-ctx-has-sub {
    display: flex !important;
    align-items: center !important;
}

/* Hide jstree's default vakata context menu (if it somehow appears) */
.vakata-context { display: none !important; }
