.xh-context-menu {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100000;
    box-sizing: border-box;
    width: 270px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .68);
    border-radius: 14px;
    background: color-mix(in srgb, var(--main-bg-color, #fff) 92%, transparent);
    color: var(--main-color, #333);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 8px, 0);
    transition: opacity .18s ease, transform .18s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.xh-context-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
}

.xh-context-menu-tools {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px dotted rgba(89, 101, 255, .42);
}

.xh-context-menu-tools button,
.xh-context-menu-item {
    border: 0;
    outline: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.xh-context-menu-tools button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 34px;
    border-radius: 10px;
    justify-self: center;
}

.xh-context-menu-tools button:hover,
.xh-context-menu-item:hover {
    background: var(--muted-border-color, rgba(89, 101, 255, .09));
    color: var(--focus-color, #5965ff);
}

.xh-context-menu svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.xh-context-menu-group {
    padding: 12px 0;
    border-bottom: 2px dotted rgba(89, 101, 255, .42);
}

.xh-context-menu-group:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.xh-context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 10px;
    text-align: left;
    font-size: 15px;
    font-weight: 700;
}

.xh-context-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
}

.xh-context-menu-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .xh-context-menu {
        width: min(270px, calc(100vw - 24px));
        padding: 14px;
    }
}
