#command-generator {
    position: absolute;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    left: 320px;

    transition: all 300ms;
    width: calc(90vw - 320px);

    min-width: min(24em, 100%);

    top: 0;
    right: 0;
    bottom: 0;
}

#app.hide #command-generator {
    left: 50%;
    transform: translate(-50%);
    width: 90vw;
}

#input {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

#output {
    border-top: 1px solid var(--sub-bg);
    margin-top: 1em;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

#params {
    margin: 0 1em;
    display: flex;
    width: 80vw;
    max-width: 50vh;
    flex-direction: column;
}

.param {
    width: 100%;
    display: flex;
    justify-content: space-between;
    white-space: nowrap;
    align-items: center;
    margin: 0.4em 0;
}

.param span {
    margin-right: 0.4em;
    font-size: 0.9em;
}

.param>div {
    height: 2rem;
    width: 70%;
    display: flex;
}

.param .sub-param {
    width: 30%;
    font-size: 0.6em;
    margin-left: 0.2rem;
}

.param input {
    font-size: 0.8em;
    width: 100%;
}

.param select {
    width: 100%;
    font-weight: 400;
    padding-left: 0.6rem;
}

#output-area {
    min-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#command-list-title {
    margin: 0 1em;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

#list-hide {
    width: 2em;
    height: 2em;

    line-height: 2em;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    background: var(--hl-text);
}

#command-list {
    overflow-y: auto;
    align-self: flex-start;
    background: var(--sub-bg);
    margin: 0 1em;
    display: flex;
    flex-direction: column;
    max-width: 80vh;
    border-radius: 16px;
    padding: 0.6em;
    font-size: 0.9rem;
}

.required-param::after {
    content: '*';
    color: var(--hl-text);
    font-weight: 1000;
    font-size: 1.4em;
    vertical-align: middle;
}

#command-search {
    margin: 0 1em;
    padding: 10px;
    padding-top: 0;
}

.command-head {
    display: inline-block;
    margin-right: 0.6em;
    margin-left: 0.1em;
    padding: 5px 10px;
    border-radius: 3px;
    color: var(--sub-text);
    background-color: var(--card-bg);
    font-size: 14px;
    font-weight: 700;
}

#output-span {
    background: var(--sub-bg);
    color: var(--hl-text);
    border: black 1px dashed;
    border-radius: 0.3em;
    display: inline-block;
    text-align: center;
    width: 100%;
    min-width: 16em;
    min-height: 1em;
    padding: 0.4em 1em;
    font-weight: 600;
}

.card {
    color: var(--text);
    display: flex;
    align-items: center;
    border-radius: .5em;
    padding: 1em .5em;
    cursor: pointer;
    transition: .3s;
}

.card:hover,
.card:focus-within {
    background: hsla(0, 0%, 80%, .14);
}

.modal-select-input {
    display: flex;
    align-items: center;
    overflow-y: clip;
    font-size: 0.7em;
    width: 100%;
    background: var(--sub-bg);
    border: 1px var(--sub-text) solid;
    border-radius: 4px;
}

.modal-select-input .command-head {
    margin: 0 0.6em;
    font-size: 0.6em;
}

.modal-select-item {
    cursor: pointer;
    transition: all 0.4s;
    color: var(--text);
}

.modal-select-item:hover {
    font-weight: 600;
    color: var(--hl-text);
}

#modal-select {
    width: 90%;
    height: 95%;
    position: fixed;
    top: 5%;
    left: 5%;
    background: var(--sub-bg);
    opacity: 1.0;
    overflow: hidden;
    box-shadow: #333 5px 5px 5px;
    border: 5px solid var(--sub-bg);
    border-radius: 12px;

    z-index: 100;
}

#modal-select-data {
    height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

#modal-select-data>details,
#modal-select-data div {
    padding: 0.6em;
    color: var(--text);
    font-size: 0.9rem;
    margin: 0.4em 1em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

#modal-select-data>details:hover,
#modal-select-data div:hover {
    background: hsla(0, 0%, 80%, .14);
}

#modal-select-data div {
    display: flex;
    align-items: center;
}

#modal-select-data p {
    text-align: center;
    font-weight: 600;
}

#modal-srarch-setting {
    padding: 0.4em;
    border-bottom: 2px solid var(--bg);
}

#modal-srarch-setting details>div {
    padding-bottom: 0.2em;
    border-bottom: 2px dashed var(--bg);
}

#modal-srarch-setting p {
    margin: 0 0.4em 0.6em
}

#modal-srarch-setting .command-head {
    margin: 4px 8px;
}

#message {
    position: fixed;
    width: 100vw;
    left: 0;
    height: 30px;
    top: -60px;
    transition: top 500ms;
    text-align: center;
    background-color: var(--card-bg);
    padding: 10px;
    color: var(--sub-text);
    font-weight: 600;

    z-index: 150;
}

#modal-search-bar {
    display: flex;
    align-items: baseline;
    height: 2em;
    box-shadow: #999 5px 5px 10px;
}

#modal-search-bar>input {
    height: 100%;
    width: 100%;
    border: none;
    outline: none;
    margin: 0 0.4em;
}

#command-generator>#output>.button-group {
    align-items: center;
    width: max-content;
}

@media (max-width: 650px) {
    #params {
        font-size: 1.1em;
    }

    .param {
        margin: 0.6em 0;
    }

    #modal-select-data>details,
    #modal-select-data div {
        min-width: max-content;
        padding: 0.8em 0.2em;
        margin: 0.6em 0.2em;
    }

    .command-head {
        font-size: 10px;
    }

    .card {
        margin: 0.2em 0;
        padding: 1em 0.4em;
    }

    #output>.button-group {
        flex-wrap: wrap
    }
}