.command-palette {
    font-family: sans-serif;
    font-size: 14px;
    z-index: 1000;

    position: fixed;
    top: 40%;
    width: 100%;
}

.command-palette--hidden {
    display: none;
}

/*.command-palette:not(:focus-within) {*/
/*    display: none;*/
/*}*/

.command-palette__container {
    display: flex;
    min-width: 50%;
    width: fit-content;
    flex-direction: column;
    margin-inline: auto;

    height: 20em;
    overflow: hidden;

    /*border: 1px solid #555555;*/
    /*border-radius: 1em;*/
    /*background-color: #191919;*/
}

.command-palette__input {
    padding: 0.75em;
    outline: none;
    width: 100%;
    background: #222222;
    border: 1px solid #555555;
    border-top-left-radius: 1em;
    border-top-right-radius: 1em;

    font: inherit;
    font-size: 1.3em;
}

.command-palette__list {
    list-style: none;
    display: flex;
    flex-direction: column;

    border: 1px solid #555555;
    border-top: none;

    overflow-y: auto;
}

.command-palette__item {
    color: #CCCCCC;
    background-color: #191919;
    transition: background-color 0.1s, color 0.1s;
}

.command-palette__item button {
    all: unset;
    cursor: pointer;
    font: inherit;
    color: inherit;

    box-sizing: border-box;
    width: 100%;
    display: block;
    padding: 0.5em;
    text-align: left;
    user-select: none;
}

.command-palette__item:hover, .command-palette__item:focus-within {
    background-color: #333333;
    color: #FFFFFF;
}

.command-palette__item:has(:active) {
    background-color: #556688;
    color: #FFFFFF;
}

.command-palette__item:not(:last-child) {
    border-bottom: 1px solid #333333;
}

.command-palette__item:not(:last-child):hover,
.command-palette__item:not(:last-child):has(+ .command-palette__item:hover) {
    border-bottom: 1px solid #555555;
}