/* LexiconService: tester, words and dictionaries. Colors come from the theme variables of common.css (dark mode). */

.MetaRow {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 8px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 750;
}

.MetaRow strong {
    color: var(--text);
}

.ErrorBox {
    margin-top: 10px;
    border: 1px solid var(--red);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--red-soft);
    color: var(--red);
    font-family: var(--font-mono);
    font-size: .84rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.SmallText {
    font-size: .78rem;
}

.PathText {
    font-family: var(--font-mono);
    overflow-wrap: anywhere;
}

.ExampleRow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 12px;
}

.ExampleChip {
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 6px 12px;
    background: var(--surface-accent);
    color: var(--accent);
    font: inherit;
    font-size: .82rem;
    font-weight: 850;
    cursor: pointer;
}

.ExampleChip:hover {
    border-color: var(--accent);
}

.LexiconInputRow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 12px;
    align-items: start;
}

.LexiconText textarea {
    min-height: 96px;
    font-size: 1.02rem;
}

.GistBox {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--violet);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--violet-soft);
}

.GistLabel {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.GistText {
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 1.12rem;
    font-weight: 800;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.GistText.Alternatives {
    font-size: .95rem;
    font-weight: 700;
}

.TokenTableBox {
    margin-top: 12px;
    max-height: 520px;
    overflow-y: auto;
}

.TokenTable td {
    vertical-align: middle;
}

.TokenTable tr.KindStop td {
    opacity: .62;
}

.KindBadge {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 9px;
    font-size: .74rem;
    font-weight: 900;
    white-space: nowrap;
}

.KindBadge.KindWord {
    background: var(--green-soft);
    color: var(--green);
}

.KindBadge.KindStop {
    background: var(--surface-soft);
    color: var(--muted);
}

.KindBadge.KindUnknown {
    background: var(--amber-soft);
    color: var(--amber);
}

.KindBadge.KindNumber {
    background: var(--blue-soft);
    color: var(--blue);
}

.LemmaChips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.LemmaChip,
.LemmaChip:visited {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 3px 8px;
    background: var(--surface);
    color: var(--text-soft);
    font-family: var(--font-mono);
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
}

.LemmaChip:hover {
    border-color: var(--accent);
}

.LemmaChip.Primary {
    border-color: var(--violet);
    background: var(--violet-soft);
    color: var(--text);
    font-weight: 900;
}

.LemmaChip.Key {
    border-style: dashed;
    color: var(--amber);
}

.LemmaChips.Large .LemmaChip {
    padding: 6px 10px;
    font-size: 1rem;
}

.LemmaTag {
    border-radius: 6px;
    padding: 0 5px;
    background: var(--surface-soft);
    color: var(--muted);
    font-family: var(--font-sans, inherit);
    font-size: .68rem;
    font-weight: 850;
}

.LemmaTag.Name {
    background: var(--amber-soft);
    color: var(--amber);
}

.LemmaTag.Count {
    background: var(--blue-soft);
    color: var(--blue);
}

.TermList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.TermChip {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: .86rem;
    font-weight: 750;
}

.TermChip span:nth-child(2) {
    font-family: var(--font-mono);
}

.TermChip.Found {
    background: var(--green-soft);
    color: var(--green);
}

.TermChip.Missing {
    background: var(--red-soft);
    color: var(--red);
}

.HighlightBox {
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.HighlightBox mark {
    border-radius: 5px;
    padding: 1px 3px;
    background: #fde047;
    color: #1f2937;
    font-weight: 850;
}

.LanguageHeading {
    margin: 14px 0 6px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.FormCloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.FormChip,
.FormChip:visited {
    border-radius: 7px;
    padding: 3px 8px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-family: var(--font-mono);
    font-size: .86rem;
    font-weight: 700;
    text-decoration: none;
}

.FormChip:hover {
    background: var(--violet-soft);
}

.RowActions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ConfirmRow {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 6px;
    color: var(--red);
    font-size: .82rem;
    font-weight: 800;
}

.CatalogPage .SmallAction.Danger {
    border-color: var(--red);
    color: var(--red);
}

.CatalogPage .SmallAction.Primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.UsageSteps {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 22px;
    line-height: 1.5;
}

.MethodBadge {
    display: inline-block;
    margin-right: 6px;
    border-radius: 6px;
    padding: 1px 7px;
    color: #fff;
    font-size: .74rem;
    font-weight: 900;
}

.MethodBadge.POST {
    background: #16a34a;
}

.MethodBadge.GET {
    background: #2563eb;
}

.CodeSample {
    margin: 10px 0 0;
    border-radius: 12px;
    padding: 12px 14px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: .84rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .LexiconInputRow {
        grid-template-columns: 1fr;
    }
}

.LexiconSideFields {
    display: grid;
    gap: 12px;
}

.DictionaryChecks {
    display: grid;
    gap: 4px;
}

.ErrorText {
    color: var(--red) !important;
    font-weight: 800;
}

.KindBadge.KindCustom {
    background: var(--violet-soft);
    color: var(--violet);
}

.SourceName {
    display: block;
    margin-top: 2px;
    color: var(--violet);
    font-size: .74rem;
    font-weight: 850;
}

.UnknownBox {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--amber);
    border-radius: 12px;
    padding: 10px 14px;
    background: var(--amber-soft);
}

.EntryForms {
    font-family: var(--font-mono);
    font-size: .86rem;
    overflow-wrap: anywhere;
}

.MethodBadge.PUT {
    background: #d97706;
}

.LemmaChip.Synonym {
    border-color: var(--green);
    background: var(--green-soft);
    color: var(--text);
}

.SynonymGroup {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    border-left: 3px solid var(--line-strong);
    padding-left: 10px;
}

.SynonymGroup p {
    margin: 0;
}

.UnknownWord {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.SuggestionArrow {
    color: var(--muted);
    font-weight: 900;
}

.LemmaChip.Suggestion {
    border-color: var(--blue);
    background: var(--blue-soft);
    color: var(--text);
}

.CollectionSearch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.CollectionSearch input[type=search] {
    flex: 1 1 24rem;
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 9px 14px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

/* results as the search of DocumentsService: a card per group, a header, one row per result (number, preview, quality) */
.CollectionHits {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.CollectionHit {
    border: 2px solid var(--line-strong);
    border-radius: 10px;
    padding: 4px;
    background: var(--surface);
}

.CollectionHitHeader {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    align-items: baseline;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 3px 8px;
    background: var(--surface-soft);
}

.CollectionHitTitle {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.CollectionHitTitle mark,
.CollectionHitPreview mark {
    border-radius: 4px;
    padding: 0 2px;
    background: #fde047;
    color: #1f2937;
    font-weight: 800;
}

.CollectionHitMeta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    align-items: center;
    color: var(--muted);
    font-size: .78rem;
}

.CollectionHitMeta strong {
    color: var(--text-soft);
}

.CollectionHitMeta .Good strong {
    color: #15803d;
}

.CollectionHitMeta .GroupHit {
    border-radius: 999px;
    padding: 0 8px;
    background: var(--blue-soft);
    color: var(--brand-strong);
    font-weight: 700;
}

.CollectionHitRow {
    display: flex;
    align-items: stretch;
    gap: 4px;
    margin-top: 4px;
}

.CollectionHitNumber {
    flex: 0 0 54px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: .85rem;
    font-weight: 700;
}

.CollectionHitPreview {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 3px 10px;
    color: var(--text-soft);
    font-size: .92rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.CollectionHitRow .QualityBadge {
    flex: 0 0 62px;
    border-radius: 8px;
}

/* the match quality as in the search of DocumentsService: a percent on a red-yellow-green gradient */
.QualityBadge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 62px;
    border: 1px solid #aaa;
    border-radius: 10px;
    padding: 2px 6px;
    color: #fff;
    font-size: .86rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}


a.CollectionHitTitle {
    text-decoration: none;
}

a.CollectionHitTitle[href]:hover,
a.CollectionHitNumber[href]:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

a.CollectionHitNumber {
    text-decoration: none;
}

a.CollectionHitNumber[href] {
    color: var(--link);
}

.CollectionHitHeading .SectionTag {
    border-radius: 999px;
    padding: 0 8px;
    background: var(--violet-soft);
    color: var(--violet);
    font-weight: 800;
}



.CollectionHitHeading {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
    min-width: 0;
}

.CollectionHitHeading .SectionTag {
    font-size: .76rem;
}

/* the document's own parts of its score, next to the score */
.CollectionHitParts {
    flex: 0 0 auto;
    min-width: 112px;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 2px 8px;
    color: var(--muted);
    font-size: .74rem;
    line-height: 1.35;
}

.CollectionHitParts strong {
    color: var(--text-soft);
}

.CollectionFocus {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin: 12px 0 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    background: var(--surface-accent);
}

.CollectionHitMeta .LinkButton {
    border: 0;
    padding: 0;
    background: none;
    color: var(--link);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.CollectionHitMeta .LinkButton:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* more places of the same document: the score stays on its first row */
.CollectionHitRow .QualityBadgeSpace {
    flex: 0 0 62px;
}

.CollectionHitRow.MorePassage .CollectionHitNumber {
    font-weight: 600;
    font-size: .78rem;
}

.TopActions .LoginLink {
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font: inherit;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.TopActions .LoginLink:hover {
    background: rgba(255, 255, 255, .22);
}

.ApiKeyValue {
    margin-top: 6px;
    overflow-wrap: anywhere;
    font-size: .9rem;
}

.ConfigSnippet {
    margin: 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #0f2130;
    color: #e6f2ff;
    font-size: .9rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.NewTenantConfig {
    border-left: 4px solid #2f9e5b;
}

/* the developer version (Settings:DeveloperMode): a red bar over every page */
.DeveloperBar {
    background: #c62828;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 6px 16px;
    overflow-wrap: anywhere;
}
