.modal {
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6);
    box-sizing: border-box;
    display: none;
    height: 100%;
    justify-content: center;
    padding: 18px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1;
}

.modal .window {
    background-color: #EEE;
    border-radius: 3px;
    box-shadow: 4px 4px 8px #222;
    display: flex;
    flex-direction: column;
    max-height: 768px;
    max-width: 1024px;
    width: 100%;
}

body.dark .modal .window {
    background-color: #282828;
    box-shadow: 4px 4px 8px #000;
}

.modal .title_bar {
    background-color: var(--brand-color);
    border-bottom: 1px solid rosybrown;
    border-radius: 3px 3px 0 0;
    display: flex;
}

body.dark .modal .title_bar {
    border-bottom: 1px solid #000;
}

.modal .title_bar * {
    padding: .6em;
}

.modal .title {
    align-items: center;
    display: flex;
    font-family: sans-serif;
    font-size: .9em;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.modal .fa-times:hover {
    background-color: #700;
    color: #FFF;
}

.modal .contents {
    display: flex;
    flex-direction: column;
    padding: .5em;
}

.modal .contents * {
    background-color: transparent;
    border: 0;
    font-family: Sans-serif;
    font-size: 14px;
}

.modal .contents > * {
    margin-bottom: .5em;
}

.modal .contents textarea {
    background-color: #FFF;
    border: 1px solid #AAA;
    border-radius: 3px;
    color: #000;
    line-height: 1.5em;
    min-height: 8.5em;
    padding: .4em;
    resize: vertical;
}

body.dark .modal .contents textarea {
    background-color: #111;
    color: #FFF;
}

.modal .contents button {
    background-color: var(--brand-color);
    border: 1px solid rosybrown;
    border-radius: .3em;
    flex-grow: 1;
    margin-left: .5em;
    padding: .6em;
}

body.dark .modal .contents button {
    border: 1px solid #000;
}

.modal button:hover {
    background-color: var(--brand-color-highlight);
}

.modal .contents :is(input, select) {
    background-color: #FFF;
    border: 1px solid #AAA;
    border-radius: .3em;
    padding: .6em;
}

body.dark .modal .contents :is(input, select) {
    background-color: #111;
    color: #FFF;
}

.modal .contents > :last-child {
    display: flex;
    margin-bottom: 0;
}

.modal .contents .last_btns button:first-child {
    margin-left: 0;
}

.modal .preview {
    padding: .6em 0;
    text-align: center;
}

body.dark .modal .preview {
    color: #FFF;
}

.modal .tip {
    color: #777;
    text-align: center;
}

.modal .tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.modal .tags div {
    background-color: #000;
    border-radius: .3em;
    color: #FFF;
    cursor: pointer;
    font-size: 13px;
    margin: .1em;
    padding: .3em .4em;
}

body.dark .tags div {
    background-color: #EEE;
    color: #000;
}

.modal .tags div:hover {
    background-color: #900;
    color: #FFF;
}

#edit_verse_text .contents div {
    display: flex;
}

#edit_verse_text .contents div button {
    width: 50%;
}