/* Spell checker: suggestion menu (webroot/js/languagetool/plugin.js) and results panel (spellcheck.js) */

/* Suggestion menu, opened by clicking a marked error in the editor */
.lt-menu {
    position: absolute;
    z-index: 1000;
    min-width: 220px;
    max-width: 340px;
    padding: 6px 0;
    background: #fff;
    border: 1px solid #b4b9c9;
    border-top: 3px solid #a32061;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
    font-family: Lato, sans-serif;
    font-size: 15px;
}

.lt-menu-spelling { border-top-color: #d33; }
.lt-menu-grammar { border-top-color: #e0a800; }
.lt-menu-style { border-top-color: #4a7fd4; }

.lt-menu-message,
.lt-menu-none {
    padding: 6px 14px 8px;
    color: #555;
    line-height: 1.4;
}

.lt-menu-none {
    font-style: italic;
}

.lt-menu-item {
    display: block;
    width: 100%;
    padding: 7px 14px;
    border: 0;
    background: none;
    text-align: left;
    font: inherit;
    color: #222;
    cursor: pointer;
}

.lt-menu-item:hover,
.lt-menu-item:focus {
    background: #eef0f7;
    outline: none;
}

.lt-menu-suggestion {
    font-weight: 700;
    color: #2f4795;
}

.lt-menu-more,
.lt-menu-ignore {
    border-top: 1px solid #e2e2e2;
    color: #606c76;
    font-size: 14px;
}

/* Results panel under the editor */
.spellcheck-results {
    margin: 10px 0 0;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #dadeeb;
    font-family: Lato, sans-serif;
    font-size: 15px;
}

.spellcheck-results[hidden] {
    display: none;
}

.spellcheck-summary {
    font-family: Rubik, sans-serif;
    font-size: 17px;
    color: #2f4795;
}

.spellcheck-summary.spellcheck-ok {
    color: #090;
}

.spellcheck-summary.spellcheck-error {
    color: #c00;
}

.spellcheck-summary.spellcheck-progress {
    color: #606c76;
}

.spellcheck-notice {
    margin-top: 6px;
    color: #a35a00;
}

.spellcheck-list {
    max-height: 180px;
    margin: 10px 0 0;
    padding: 0 6px 0 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
}

.spellcheck-item {
    padding: 10px 0 10px 12px;
    border-top: 1px solid #ebebeb;
    border-left: 4px solid #e0a800;
}

.spellcheck-item-spelling { border-left-color: #d33; }
.spellcheck-item-style { border-left-color: #4a7fd4; }

.spellcheck-item-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.spellcheck-item-text {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 700;
    color: #222;
    text-decoration: underline dotted;
    cursor: pointer;
}

.spellcheck-item-kind {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #8a8a8a;
}

.spellcheck-item-message {
    margin: 4px 0 6px;
    color: #444;
    line-height: 1.4;
}

.spellcheck-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.spellcheck-suggestion,
.spellcheck-ignore {
    padding: 4px 10px;
    border-radius: 4px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.spellcheck-suggestion {
    border: 1px solid #2f4795;
    background: #fff;
    color: #2f4795;
    font-weight: 700;
}

.spellcheck-suggestion:hover,
.spellcheck-suggestion:focus {
    background: #2f4795;
    color: #fff;
}

.spellcheck-ignore {
    border: 1px solid #d0d0d0;
    background: #f7f7f7;
    color: #606c76;
}

.spellcheck-ignore:hover,
.spellcheck-ignore:focus {
    background: #e9e9e9;
}

@media all and (max-width: 960px) {
    .spellcheck-results {
        font-size: 16px;
    }

    .spellcheck-suggestion,
    .spellcheck-ignore {
        padding: 8px 12px;
        font-size: 16px;
    }
}
