@import url(../fonts/noto.css);

html {
    background-color: rgb(28, 63, 73);
    -webkit-text-size-adjust: 100%;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

.content {
    background-color: white;
    min-height: 100vh;
    border-radius: 5px;
}

body {
    font-family: "Noto Sans",sans-serif;
    font-weight: normal;
    margin: 0 auto;
    max-width: var(--lexin-max-width);
    position: relative;
}

h1 {
    font-weight: normal;
    font-style: normal;
    font-size: 1em;
    margin-bottom: 0em;
    margin-left: 0;
    margin-top: 0;
    margin-right: 0.4em;

    color: transparent;
    background: url(../images/lexinlogo.png);
    background-size: contain;
    background-position: bottom;
    background-repeat: no-repeat;
    line-height: 1.095;
}

#inputDiv {
    padding-top: 0.8em;
    background-color: rgb(28, 63, 73);
}

.extrafunctions {
    margin: 1em;
}

input[type="submit"] {
    background: no-repeat center / 1em url(../svg/search.svg);
    position: absolute;
    top: 0;
    bottom: 0;
    right: calc(var(--lexin-right-margin) + 0.5rem);
    width: 1em;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-indent: -99999px;
    white-space: nowrap;
    overflow: hidden;
    z-index: 1;
}

form#theForm, form#theForm2 {
    font-size: 2em;
    line-height: normal;
}

.headerrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: var(--lexin-left-margin);
    padding-right: var(--lexin-right-margin);
}

form#theForm2 .inputwrapper {
    max-width: 100vw;
    width: calc(min(var(--lexin-max-width), 100vw) - var(--lexin-right-margin) - var(--lexin-left-margin));
    display: inline-block;
    padding: 0 0.5em;
    position: relative;
    padding-right: var(--lexin-right-margin);
    padding-left: var(--lexin-left-margin);
}

:root {
    --lexin-max-width: 600px;
    --lexin-left-margin: max(env(safe-area-inset-left), clamp(0em, calc((var(--lexin-max-width) - 100vw)/2 + 1rem), 1rem));
    --lexin-right-margin: max(env(safe-area-inset-right), clamp(0em, calc((var(--lexin-max-width) - 100vw)/2 + 1rem), 1rem));
}

.permbar {
    width: 100%;
    padding-bottom: 0.5em;
    padding-top: 0.5em;
    z-index: 10;
    position: sticky;
    top: 0;
    background-color: rgb(28, 63, 73);
}

/* remove stickiness for horizontal phone view */
@media (max-height: 499px) {
    .permbar {
        position: static;
    }
}

form#theForm input, form#theForm2 input {
    font: inherit;
    line-height: normal;
    width: 1em;
}

form#theForm2 input#searchQuery {
    width: 100%;
    box-sizing: border-box;
    padding-right: 1.5em;
    padding-left: 0.2em;
    border-radius: 5px;
}

main {
    padding-top: 0.5em;
    padding-bottom: 1em;
}

/* --------- SKIP LINK --------- */

.skipLink {
    color: black;
    text-decoration: none;
    background-color: #D7E9EC;
    font: inherit;
    padding: 0.1em .5em 0.2em 0.5em;
    margin: 0.2em .8em 0.1em 1em;
    border: none;
    border-radius: 0.3em;
    cursor: pointer;
    margin-top: 20px;
    margin-left: 0px;

    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    transform: translateY(-200%);     /* hide */
}

.skipLink:focus {
    transform: translateY(0);         /* show */
}

.skipLink:hover {
    background-color: #3FD695;
}

.skipLink,
.skipLink:link,
.skipLink:visited,
.skipLink:hover,
.skipLink:active,
.skipLink:focus-visible {
  color: black;
}

/* --------- SELECT SINGLE LANGUAGE --------- */

select#languageChoice {
    font: inherit;
    margin-right: 0.84em;
    float: right;
    font-size: 0.55em;
    vertical-align: middle;
    -webkit-appearance: none;
    appearance: none;
    padding-left: 0.5em;
    padding-right: 1.5em;
    padding-bottom: 2px;
    width: 100%;
    max-width: 20em;
    cursor: pointer;
    background-color: #D7E9EC;
}

select {
    border-radius: 5px;
    border-color: transparent;
}


.select-wrapper {
    position: relative;
    display: inline-block;
    font-size: 0.9em;
/*    width: 100%;*/
    padding-left: 0.5em;
}

.select-wrapper:after {
    /*content: '\0025BC';
    font-family: Arial;
    font-size: 0.5em;
    line-height: 1;
    color: black;
    right: 0.87em;
    top: 0.6em;
    padding: 0 0.6em 0 0;
    position: absolute;
    pointer-events: none;*/

    content: "";
    background-image: url("../svg/triangle.svg");
    background-size: contain;
    background-repeat: no-repeat;
    width: 10px;
    height: 10px;
    position: absolute;
    right: 0.8em;
    top: 0.4em;
    pointer-events: none;
    transform: rotate(180deg);
}

/* --------- SELECT MULTIPLE LANGUAGES --------- */

.multilang-wrapper {
    position: relative;
    display: inline-block;
    font-size: 0.9em;
    padding-left: 0.5em;
}

#multiLanguageChoiceButton {
    font: inherit;
    float: right;
    font-size: 0.55em;
    vertical-align: middle;
    border-radius: 5px;
    border-color: transparent;
    background-color: #D7E9EC;
    cursor: pointer;
}

/* --------- LOGO (?) --------- */

.logo {
}

.heading {
    cursor: pointer;
}

/* --------- SEARCH FIELD --------- */

#inputwrapper.animate {
    transition-property: all;
    transition-timing-function: ease-in-out;
    transition-duration: 400ms;
}

/* --------- NO SEARCH RESULT --------- */

.errorReport {
    padding: 0.5em 1em 0.5em 1em;
    padding-left: max(env(safe-area-inset-left), 1em);
    padding-right: max(env(safe-area-inset-right), 1em);
}

.errorReport a:hover {
    background-color: #EBEEEF;
}

/* --------- DOCUMENTATION --------- */

.testVersionInfo {
    padding: 0.5em 1em 0.5em 1em;
    padding-left: max(env(safe-area-inset-left), 1em);
    padding-right: max(env(safe-area-inset-right), 1em);
    background-color: rgb(252, 235, 145);
    color: black;
}

.loadingIndicator {
    padding: 0.5em 1em 0.5em 1em;
    padding-left: max(env(safe-area-inset-left), 1em);
    padding-right: max(env(safe-area-inset-right), 1em);
}

.correction {
    padding: 0.5em 1em 0.5em 1em;
    padding-left: max(env(safe-area-inset-left), 1em);
    padding-right: max(env(safe-area-inset-right), 1em);
}

/* --------- SEARCH RESULT --------- */

.resultList  {
    list-style-type: none;
    padding-inline-start: 0;
}

.resultList > li {
    margin-bottom: 2em;
}

/* --------- LEMMA MAIN INFO ROW --------- */

.wordInfo {
    background-color: rgb(215,233,236);
    padding: 0.5em 0.5em 0.5em 1em;
    padding-left: max(env(safe-area-inset-left), 1em);
    padding-right: max(env(safe-area-inset-right), 0.5em);
    display: flex;
    align-items: center;
    justify-content: space-between;

    /*gap: 0.5rem;
    flex-wrap: wrap;*/
}

/* break line between phonetics and pos if needed */
.phonetic,
.PoS {
    white-space: nowrap;
    display: inline-block;
}

/* --------- LEMMA --------- */

.matchingWord {
    font-weight: bold;
    font-size: 1.3em;
}

/* --------- INFLECTIONS --------- */

.inflections {
    /*flex: 1 1 12rem;  
    min-width: 0;  
    overflow-wrap: anywhere; 
    word-break: break-word; */
}

.inflections {
    font-weight: 500;
    display: block;
}

.inflections .clickableHeading.phonetic {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

/* --------- SOUND FILE CONTAINER --------- */

.listenContainer {
    display: flex;

    /* stack icons on top of each other */
    flex-direction: column;     
    align-items: flex-end;
    gap: 0.25rem;
    flex: 0 0 auto;
    margin-left: auto;
}

/* stack icons on top of each other if >= 3 icons */
/*.listenContainer:has(> .pronunciation:nth-of-type(3)) {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    margin-left: auto;
}*/

.pronunciation {
    /*display: inline !important;*/
}

.phonetic {
    font-size: 1.3em;
    margin-right: 0.2em;
    margin-left: 0.2em;
}

.soundFiles {
    flex-direction: column;
    display: flex;
    align-items: center;
}

.soundFiles button {
    appearance: none;
    border: none;
    background: none;
    font: inherit;
    margin: 0;
    padding: 0.4em 0.5em 0.4em 0.8em;
    color: black;
}

.listenIcon {
    height: 1.3em;
    width: 2em;
    vertical-align: bottom;
    background-image: url(../svg/lyssna.svg);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    margin: auto;
    cursor: pointer;
}

.listenPronunciation {
    font-size: 0.7em;
    margin-top: 0.4em;
}

/* --------- TRANSLATIONS --------- */

.translation {
    font-weight:bold;
}

/* accessibility (make non-Latin letters adapt their font size) */
.translation,
.idiomHeadTrans,
.translatedExample {
    font-size: 1rem;
}

/* --------- SYNONYMS --------- */

.synonyms {

}

/* --------- MEANING --------- */

.meaning {

}

/* --------- EXAMPLES --------- */

.examples {
    margin-top: 1em;
    margin-bottom: 1em;
}

.exampleList {
  list-style-type: circle;
}

/* --------- REFERENCES (?) --------- */

.referenceContainer {
    margin-top: 1em;
    margin-bottom: 1em;
}

.referenceContainer a {
    font-weight: bold;
}

.referenceContainer a:hover {
    background-color: rgba(51, 82, 91, 0.1);
}

.referenceHead {

}
 
.referenceInfo {
    font-weight:bold;
}

/* --------- IDIOMS --------- */

.idioms {
    margin-top: 1em;
    margin-bottom: 1em;
}

.idiomList {
  list-style-type: circle;
}
 
.idiomHead {
    font-weight: bold;
}

.idiomTail {
    
}

.idiomHeadTrans {

}

.idiomTailTrans {
    
}

/* --------- DEFINITION --------- */

.defintion {

}

/* --------- COMPOUNDS --------- */

.compounds {
    margin-top: 1em;
    margin-bottom: 1em;
}

.compoundList {
    list-style-type: circle;
}

/* --------- LEXEME LIST --------- */

.lexemeList {
    list-style-type: none;
    padding-left: 0;
}

.lexemeList li:not(:last-child) {
    border-style: none none solid none;
    border-color: lightgrey;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.lexemeList li li:not(:last-child) {
    border-style: none none none none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.lexemeItem {

}

/* --------- LEMMA ENTRY CONTENT --------- */

.entryContent {
    list-style-type: none;
    padding: 1em 1em 0 1em;
    padding-left: max(env(safe-area-inset-left), 1em);
    padding-right: max(env(safe-area-inset-right), 1em);
}

/* --------- COMMENTS --------- */

.comment {

}

.comment_se {

}

.comment_tr {

}

/* --------- CYCLE LIST (?) --------- */

.cycleList {
  list-style-position: inside;
  padding-left: 0.75em;
}

.cycle {
    margin-top: 1em;
}

/* --------- OR CLASS (?) --------- */

.orClass {
    font-variant: small-caps;
    font-weight: 400;
}

/* --------- CUE WORD (?) --------- */

.cueWord {
    font-weight: 400;
    /*opacity: 0.5;*/
    color: #505050;
}

/* --------- DERIVATIONS --------- */

.derivation {
    margin-top: 1em;
    margin-bottom: 1em;
}

.derivationList {

}

/* --------- EXPLANATIONS --------- */

.explanation {
    margin-top: 1em;
    margin-bottom: 1em;
}

/* --------- ABBREVIATIONS --------- */

.abbr {
    
}

/* --------- HYPHENS (?) --------- */

.hyphenate {
    
}

/* --------- ANTONYMS --------- */

.antonym {

}

/* --------- PARTS OF SPEECH --------- */

.PoS {

}

/* --------- ALT FORM (?) --------- */

.alt_form {

}

/* ------ ARTICLE PARTS SELECTION ------ */

.partsselectionBox {
    margin: 0.3em 0;
}

.partsselectionBox * {
    vertical-align: middle;
}

.partsselectionCheckbox:hover {
    cursor: pointer;
}

.partsselectionLabel:hover {
    cursor: pointer;
}

.longClickLink {

}

/* ------ CLICKABLE ARTICLE PARTS ------ */

.makeClickableStandOut {
    /* color: red; */
    /* text-decoration: underline; */
}

.clickableHeading {

}

.makeClickableHeadingsStandOut {
    /* color: green; */
    /* text-decoration: underline; */
    text-decoration: underline;
    color: #33525B;
}

.makeClickableHeadingsStandOut:hover {
    cursor: pointer;
    /*text-decoration: underline;*/
    background-color: rgba(51, 82, 91, 0.1);
}

a:any-link {
   color: rgba(28, 63, 73, 0.9);
   text-decoration-color: rgba(28, 63, 73, 0.9);
}

.notRelevant {
    /* display: none !important; */
    /* color: rgb(66, 66, 66); */
}

.languageIndicator {
    text-transform: uppercase;
    font-size: small;
    font-weight: bold;
}

.metavariable {
    font-variant: small-caps;
}

/* --------- IMAGE --------- */

.ill {
    margin-top: 1em;
}

.ims {

}

.picWrap {
  display: inline-block;
}

.picIcon {
    height: 1.5em;
    padding: 0;
    margin-left: .5em;
    margin-right: .2em;
    border: 1px solid black;
    vertical-align: bottom;
    cursor: pointer;
}    

.bildtemaLink:hover {
    background-color: #EBEEEF;
}

.imageLink {
    /*font-variant: small-caps;*/
}


/* --------- VIDEO --------- */

.vidIcon {
    height: 1.5em;
    padding: 0;
    margin-left: .5em;
    vertical-align: bottom;
    cursor: pointer;
    border: 1px solid black;
}    

.vidContainer {
    margin-top: .5em;
    margin-bottom: .5em;
    display: block;

    /*display: flex;
    flex-direction: column;*/
    width: 100%;
}

.vidContainer a {
    font-weight: normal;
}

.vidContainer video {
    width: 100%;
}

span[dir=rtl] {
    display: inline-block;
    text-align: right;
}

div[dir=rtl] {
    text-align: right;
}

.languageWrapper {
    display: inline-block;
}

.translatedExample {
    margin-right: 0.5em;
}

/* --------- CONSTRUCTIONS --------- */

.gramUsage {
    font-style: italic;
}

.gramInfo {
    margin-top: 1em;
    margin-bottom: 1em;
}

.expandResultsIcon {
    vertical-align: baseline;
    height: 1em;
    padding-left: 0.5em;
    cursor: pointer;
}

.expandGraminfoIcon {
    height: 1em;
    width: 1em;
    vertical-align: baseline;
    opacity: 0.6;
    cursor: pointer;
}

.graminfoExplanation {
    background-color: #e0e0e0;
    padding: 1em;
    margin: 0.5em 0;
}

.graminfoExplanationText {
    margin-left: 0.5em;
    cursor: pointer;
    text-decoration: underline;
    color: #33525B;
}

.graminfoExplanationText:hover {
    background-color: #EBEEEF;
}

.expandGraminfoIcon.expanded {
  transform: rotate(90deg);
}

/* --------- FOOTER --------- */

footer {
    margin: 0.5em auto;
    background-color: rgb(28, 63, 73);
    padding: 1em 20px 1em 20px;
    padding-left: var(--lexin-left-margin);
    padding-right: var(--lexin-right-margin);

    display: block;
    color: white;
    justify-content: space-between;
}

footer ul.signoff {
    padding: 20px 0 !important;
    width: auto !important;
    box-sizing: border-box;
}

footer img {
    width: 150px;
}

footer ul {
    list-style-type: none;
    margin: 0;
    padding: 1em 0;
}

footer li {
    margin-bottom: 1rem;
}

footer a:any-link {
    color: white;
    word-wrap: anywhere;
    text-decoration-color: white;
}

.lp-icon {
    height: 1em;
    overflow: hidden;
    vertical-align: -0.05em;
    width: 1em;
    fill: currentColor;
}

.lp-icon, .lp-toggler-icon {
    pointer-events: none;
}

footer .lp-icon {
    color: #3fd695;
    font-size: .7em;
    margin-left: .8rem;
}

.footerLink:hover {
  background-color: #16323A !important;
  padding-top: 7px;
  padding-bottom: 7px;
}

/* --------- TEMP ERROR MESSAGE --------- */

.errorMessage {
    background-color: #FFCD00;
    border-radius: 5px; 
    font-size: 0.5em;
    padding: 5px;
    margin-top: 15px;
    margin-left: 10px;
    margin-right: 10px;
    display: flex;          /* align items */
    align-items: center;    /* align items */
    gap: 0.5rem;            /* align items */
}

/*.theform2 #errormessage {
    font-size: 1em;
}*/

.warningIcon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;         /* align items */
}

/* --------- NO HOVER BUTTON COLOR ON PHONE (ELSE BUGGY) --------- */

@media (hover: hover) and (pointer: fine) {
    #multiLanguageChoiceButton:hover {
        background-color: #3FD695;
    }
}

/* --------- BILDTEMA MULTILING --------- */

/* loading bar */
.bt-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    z-index: 10;
}

/* loading bar */
.bt-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: bt-spin 0.8s linear infinite;
}

.bildtemaLangSelector {
    font: inherit;
    float: right;
    font-size: 1em;
    vertical-align: middle;
    -webkit-appearance: none;
    appearance: none;
    padding-left: 0.5em;
    padding-right: 1.5em;
    padding-bottom: 2px;
    width: 100%;
    max-width: 192px;
    cursor: pointer;
    background-color: #D7E9EC;
}

.bildtemaLangSelectorWrapper {
    position: relative;
}

.bildtemaLangSelectorWrapper::after {
    /*content: '\0025BC';
    font-family: Arial;
    font-size: 0.9em;
    line-height: 1;
    color: black;*/
    /*right: 0.87em;*/
    /*right: 0.3em;
    top: 0.5em;
    padding: 0 0.6em 0 0;
    position: absolute;
    pointer-events: none;*/

    content: "";
    background-image: url("../svg/triangle.svg");
    background-size: contain;
    background-repeat: no-repeat;
    width: 10px;
    height: 10px;
    position: absolute;
    right: 0.6em;
    top: 0.7em;
    pointer-events: none;
    transform: rotate(180deg);
}

/* --------- HIGH CONTRAST MODE --------- */

@media (prefers-contrast: more) {
    .wordInfo {
        background-color: transparent;
        border: solid black;
        border-width: 1px 0px;
    }

    a:any-link {
        color: CanvasText;
        text-decoration-color: black;
    }

    .graminfoExplanation {
        background-color: white;
        padding: 1em;
        margin: 0.5em 0;
        border: 1px solid black;
    }

    .cueWord {
        opacity: 1;
        font-style: italic;
    }

    .expandGraminfoIcon {
	    opacity: 1;
    }
}

/* --------- DARK MODE --------- */

@media (prefers-color-scheme: dark) { 
    /* background + text */
    .content,
    form#theForm2 input#searchQuery {
        background-color: #111b20;
        color: white;
    }
    .wordInfo,
    .graminfoExplanation {
        background-color: #233540;
    }
    .cueWord {
        color: #82a6bb;
    }
    .listenPronunciation {
        color: white;
    }

    /* links */
    .makeClickableHeadingsStandOut,
    .bildtemaLink,
    .vidContainer a,
    .graminfoExplanationText,
    .referenceInfo a,
    .antonym a {
        color: #3FD695 !important;
    }
    .makeClickableHeadingsStandOut:hover,
    .bildtemaLink:hover,
    .graminfoExplanationText:hover,
    .referenceInfo a:hover,
    .vidContainer a:hover,
    .antonym a:hover {
        background-color: #324b5a;
    }
    /*a:any-link {
        color: #3FD695;
        text-decoration-color: #3FD695;
    }*/
    .referenceInfo a,
    .bildtemaLink,
    .vidContainer a,
    .antonym a {
        text-decoration-color: #3FD695 !important;
    }

    /* icons */
    input[type="submit"] {
        background-image: url(../svg/search_darkmode.svg);
    }
    .listenIcon {
        background-image: url(../svg/lyssna_darkmode.svg);
    }
    .expandGraminfoIcon {
        filter: invert(1);
    }
    .expandResultsIcon {
        filter: invert(1);
    }
}

/* --------- CHECKBOXES --------- */

input[type="checkbox"] {
  accent-color: #3FD695;
}

