/* Expanded 'rom.css' on Thu, 17 Jul 2025 19:54:17 +0000. Process time 1.0 ms. */

/* No automatic translation for a dictionary */
.notranslate {
    -ms-transform: translate(0, 0); /* IE 9 */
    -webkit-transform: translate(0, 0); /* Safari */
    transform: translate(0, 0);
}

/* Body is always at least as big as the window. It is a flexbox to allow expansion */
body {
    align-items:stretch;
    margin: 8px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 16px);
}

/* This is a child of body and expands to push down the footer */
div.expand {
    flex-grow: 1;
    margin-bottom: 5px;
}

/* First hr should have no margin below for spacing, and all hrs should be wide */
body > hr {
    margin-bottom: 0;
}

hr {
    width: 100%;
}

/* Holds some information at the bottom of the page */
footer {
    padding-top:0;
}

footer > p {
    margin:0;
}

/* Page starts with a header including title and form */
header {
    display:flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-direction: row;
    flex-grow: 0;
}

header > .title {
    display: flex;
}

header div.title {
    margin-left: 3px;
    font-size: x-large;
    align-self: flex-start;
}

header form {
    margin:0;
}

/* div.sbs holds to nav element and main side-by-side */
div.sbs {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

/* The main dictionary, which grows to fill the space. It must not overflow itself */
main {
    flex-grow: 1;
    overflow: hidden;
}

/* The navigation bar (holding dictionary entries), and coloured blocks below */
nav {
    top: 0;
    position: sticky;
    min-width:8em;
    margin-right: 10px;
    display: flex;
    flex-direction: column;
}

nav a {
    display:block;
    padding: 2px;
    margin-top: 4px;
    border-width: 1px;
    border-color: grey;
    border-style: solid;
    border-radius: 5px;
    text-align: center;
    min-height: calc(1em + 2px);
}

nav .word {
    background-color: green;
    color: white;
}

nav :is(.pre, .post) {
    background-color: floralwhite;
    color: black;
}

nav .far {
    display:none;
}

nav .none {
    background-color: lightgrey;
}

nav .word.unlisted {
    background-color: rgb(200, 49, 49);
    color: white;
}

/* Each definition is in an article. It is a flex box to control the position of the aside. Th first hr is not drawn */
hr + hr, main > hr:first-child {
    display: none;
}

section {
    display: flex;
    justify-content: space-between;
}

section > div {
    flex-grow: 1;
    min-width: 225px;
}

/* A headword and description labels the word. Selectable for easy copying */
p.headword {
    margin-top: 10px;
    margin-bottom: 15px;
    font-weight: 500;
    font-size: x-large;
}

p.headword span {
    font-weight: normal;
    font-size: medium;
    font-style: italic;
}

p.headword .type {
    text-transform: lowercase;
    padding-left: 20px;
}

p.headword :is(span.open, span.closed) {
    padding-left: 20px;
    padding-right: 10px;
    font-style: normal;
    cursor: pointer;
}

p.headword span.cswitch {
    /* display: inline-block; */
    display: none;
    float:right;
    width:0.45em;
    height: 0.45em;
    margin-top: 0.3em;
    margin-right: -10px;
    border: 1px solid black;
    font-size: inherit;
}

/*  Under both headword and title, no decoration of the links */
p.headword a, .title a {
    text-decoration: inherit;
    color: inherit;
    user-select: text;
}

/* Display arrow with showDetails */
/* default state */
article .open {
    display: none;
}

article .closed {
    display: inline;
}

/* if showDetails */
/* display details in heading */
article.showDetails .open {
    display: inline;
}

article.showDetails .closed {
    display: none;
}

/* Hide second options except under showDetails, excluding vocative */
article:not(.showDetails) tr:not(.vocative) :is(span.alt, span.comma) {
    display: none;
}

/* Colouring and showDetails */
/* default if unusued class */
:is(.showDetails, .showColour) * .cmid {
    color:red
}

:is(.showDetails, .showColour) * .cend {
    color:blue
}

:is(.showDetails, .showColour) * .cend2 {
    color:forestgreen
}

/* noun-like */
:is(.showDetails, .showColour) :is(.adjective, .noun, .proper, .pronoun) .cmid {
    color:red
}

:is(.showDetails, .showColour) :is(.adjective, .noun, .proper, .pronoun) .cend {
    color:blue
}

:is(.showDetails, .showColour) :is(.adjective, .noun, .proper, .pronoun) .cend2 {
    color:forestgreen
}

/* verbs */
:is(.showDetails, .showColour) .verb .cmid {
    color: red
}

/* stem changes always red */
:is(.showDetails, .showColour) .verb .cend {
    color: blue
}

:is(.showDetails, .showColour) .verb :is(.present, .subjunct, .imperative, .imperfect, .infin, .pp, .gerund, .long) .cinfix0 {
    color: red
}

/* e.g. h in crachez */
:is(.showDetails, .showColour) .verb :is(.present, .subjunct, .imperative, .imperfect, .infin, .pp, .gerund, .long) .cinfix {
    color: forestgreen
}

:is(.showDetails, .showColour) .verb :is(.present, .subjunct, .imperative, .imperfect, .infin, .pp, .gerund, .long) .cend {
    color: blue
}

:is(.showDetails, .showColour) .verb .simple :is(.cinfix0, .cinfix) {
    color: forestgreen
}

:is(.showDetails, .showColour) .verb .simple .cend {
    color: blue
}

:is(.showDetails, .showColour) .verb .plup .cinfix0 {
    color: forestgreen
}

:is(.showDetails, .showColour) .verb .plup .cinfix {
    color: deeppink
}

:is(.showDetails, .showColour) .verb .plup .cend {
    color: blue
}

:is(.showDetails, .showColour) .ckey {
    display: revert;
    margin: 0 0 0.5em 0;
    text-align: right;
    
    font-size: small;
}

:is(.showDetails, .showColour) .ckey span:not(:first-child) {
    margin-left: 0.6em;
    margin-right: 5px;
}

:is(.showDetails, .showColour) .ckey .cstem {
    color: red
}

:is(.showDetails, .showColour) .ckey .cend {
    color: blue
}

:is(.showDetails, .showColour) .ckey .cinfix {
    color: forestgreen
}

:is(.showDetails, .showColour) .ckey .cplupin {
    color: deeppink
}

:is(.showDetails, .showColour) .ckey .cpost {
    color: forestgreen
}

:is(.showDetails, .showColour) table.verb + .ckey .cpost {
    display: none
}

:is(.showDetails, .showColour) table:not(.verb) + .ckey .cinfix {
    display: none
}

:is(.showDetails, .showColour) table:not(.verb) + .ckey .cplupin {
    display: none
}

/* Default hidden parts */
.details, .uform, table.alt {
    /* uform is -u form of -ul words */
    display: none;
}

/* Secondary tables - create gap */
table.alt {
    margin-top: 1.5em;
}

/* Hidden parts and showDetails */
.showDetails :is(table.alt, .uform) {
    display: revert;
}

/* details formatting only if the list has details */
/* Separating list items */
article.showDetails ol.hasDetails li:not(:first-child)::before {
    display: block;
    content: "";
    position: relative;
    left: -1.5em;
    top: -0.25em;
    width: calc(100% + 1.5em);
    height: 0px;
    border-top: 1px solid grey;
}

article.showDetails ol.hasDetails li {
    margin-top: 5px;
    margin-bottom: 8px;
}

article.showDetails ol.hasDetails .details {
    display: block;
    margin: 12px 0 20px 15px;
}

/* ux and uxi are for translations */
article.showDetails ol.hasDetails .details :is(.ux, .uxi) {
    margin-left: 0;
}

/* English version of the translation */
article.showDetails ol.hasDetails .details :is(.ux, .uxi) > .uxt {
    margin-left: 30px;
    margin-top: 5px;
    margin-bottom: 7px;
}

/* Literal translation */
article.showDetails ol.hasDetails .details :is(.ux, .uxi) > .uxlit {
    margin-left: 0px;
    margin-top: 5px;
    margin-bottom: 7px;
}

article.showDetails ol.hasDetails .details :is(.ux, .uxi) > .uxlit > span {
    display: inline-block;
    font-style: italic;
    font-size: small;
    color: grey;
    width: 60px;
}

article.showDetails ol.hasDetails .details :is(.ux, .uxi) > .uxlit > span::after {
    content: ":";
}

/* synonyms and antonyms */
article.showDetails ol.hasDetails .details :is(div.ant, div.syn) {
    margin-bottom: 4px;
    margin-left: 0em;
}

article.showDetails ol.hasDetails .details > div {
    width: calc(100% - 2em);
}

article.showDetails ol.hasDetails .details > div:nth-child(n+2) {
    margin-top: 2px;
    padding-top: 4px;
    border-top: solid grey 1px;
}

article.showDetails ol.hasDetails .details a {
    color: green;
}

/* A list of items is found under the headword */
ol {
    margin-top: 0;
}

li {
    /*also affects the welcome list */
    padding-left: 5px;
    margin-bottom: 1px;
}

li i {
    padding-right: 1px; /* Adjust the padding value as needed */
}

/* A usage comment is found twice. The one directly under "main" is not printed until the screen shrinks. */
p.use {
    margin-left: 10px;
    font-style: italic;
    color: grey;
    margin-bottom: 0.7em;
    font-size: 1em;
}

article > p.use {
    display:none;
    margin-top: 2px;
    margin-bottom: 0;
    text-align: right;
}

/* the aside holds a div holds a table. The aside is in a flex box (changes as screen shrinks). The div holds the table and adds a scrollbar if too little space. */
aside {
    order: 2;
    margin-left:20px;
    margin-top: 15px;
}

aside > div {
    width: 100%; /* use all available space */
    overflow-y: auto;
}

table {
    margin-left: auto; /* keep right */
    margin-bottom: 5px;
    border-collapse: collapse;
    border-spacing: 0;
}

/* Hide table key by default */
.ckey {
    display: none;
}


/* firefox needs an extra pixel on the left because of a bug */
@supports (-moz-appearance:none) {
    table {
        margin-left: 1px;
    }

}

/* remove top left from non-verb tables */
table:not(.verb) > tbody > tr:nth-child(1) > td:nth-child(1) {
    border: none;
}

/* table formatting */
th, td {
    font-size:.875rem;
    font-family: Open Sans, Arial, sans-serif;
    border: lightgrey 1px solid;
    border-collapse: collapse;
    letter-spacing: .02rem;
}

td {
    padding-left: 5px;
    padding-right: 7px;
    padding-top: 2px;
    padding-bottom: 2px;
    min-width: 6em;
}

tr.heading > td, td.heading {
    letter-spacing: normal;
    color: dimgrey;
    font-size: small;
    font-style: italic;
    min-width: 5em;
    word-wrap: break-word;
    text-align: center;
}

/* no colouring for lins in a table*/
table a {
    color: inherit;
}

/* This controls the small lettering in the tables. It is also used for footer lettering */
span.article, footer {
    letter-spacing: normal;
    color: darkgrey;
    font-size: small;
}

/* Throughout, no underlining of links */
a {
    color: blue;
    text-decoration: none;
}


/* Override for smallish screens and windows */
@media screen and (max-width:900px) {
    /* so inflection tables under defintions */
    section {
        flex-direction: column;
    }

    aside {
        margin-top:5px;
        margin-left: 0;
        display: flex;
        flex-flow: row-reverse;
    }

    /* hide the first usage case and show the second, right aligned */
    div > p.use {
        display: none;
    }

    article > p.use {
        display: block;
    }

    /* cswitch needs changed margin */
    p.headword span.cswitch {
        margin-right: 10px;
    }

}


/* Override for very small screens or phones */
@media screen and (max-width:655px) {
    /* so title is above dictionary */
    header {
        flex-direction: column;
    }

    header > .title {
        margin-bottom: 10px;
        width: 100%;
    }

    header div > div.title {
        flex-grow: 1;
    }

    /* make some text a little larger */
    li, span.desc {
        font-size: revert;
    }

    p.headword {
        font-size: x-large;
    }

    td, th {
        font-size: 1rem;
    }

    /* move dictionary navigation to horizontal and format*/
    div.sbs {
        flex-wrap: wrap;
    }

    nav {
        position: inherit;
        
        flex-direction: row;
        
        margin-top: 10px;
        margin-right: 0;
        
        padding-top: 3em;
        padding-right: 2em;
        padding-left: 2em;
        padding-bottom: 3em;
        
        overflow-x:auto;
    }

    nav a {
        transform: rotate(-50deg);
        min-width: 7em;
        position: relative;
        margin: 0 -2em;
        height: fit-content;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    nav .far {
        display: block;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    main > hr:first-child {
        display: block;
    }

    /* increase size of search bar */
    input, label, button {
        font-size: large;
    }

}

