/*
  This file is part of GNU Dico.
  Copyright (C) 2008-2010, 2012, 2013, 2023 Wojciech Polak

  GNU Dico is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3, or (at your option)
  any later version.

  GNU Dico is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with GNU Dico.  If not, see <https://www.gnu.org/licenses/>.
*/

:root {
    --color-background: white;
    --color-border: #e1e1e1;
    --color-button-bg-hover: #d0d0d7;
    --color-button-bg: #e9e9ed;
    --color-button-border: #8f8f9d;
    --color-button-font: #0d0d0d;
    --color-font: #585858;
    --color-header: #185360;
    --color-input-focus: #ff5c2f;
    --color-link: #ff5c2f;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #111;
        --color-border: #555;
        --color-button-bg-hover: #333;
        --color-button-bg: #222;
        --color-button-border: #444;
        --color-button-font: #ccc;
        --color-font: #ccc;
        --color-header: #1f9d9d;
    }
}

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    font-size: 95%;
    background-color: var(--color-background, white);
    color: var(--color-font, #585858);
    max-width: 750px;
    margin: 0 auto;
    padding: 0 1em;
    overflow-y: scroll !important;
}

h1, h2, h3 {
    font-weight: normal;
}

h2, h3, h4 {
    color: var(--color-header, #185360);
}

h2 {
    margin: 0;
    padding-top: .5em;
    padding-bottom: .17em;
}

h3 {
    margin-bottom: 8px;
}

img {
    padding: 3px;
    border: 0;
}

a {
    color: var(--color-link, #ff5c2f);
}
a:hover {
    text-decoration: underline;
}

input, select {
    padding: 4px 6px;
}

input[type="search"],
select {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-font, white);
    background-color: var(--color-background, transparent);
    outline: none;
}
input[type="search"]:focus,
input[type="submit"]:focus,
select:focus {
    border-color: var(--color-input-focus);
}
input[type="submit"] {
    border: 1px solid var(--color-button-border);
    border-radius: 4px;
    color: var(--color-button-font);
    background-color: var(--color-button-bg);
    cursor: pointer;
    -webkit-appearance: none;
    outline: none;
}
input[type="submit"]:hover {
    background-color: var(--color-button-bg-hover);
}

ul {
    margin-bottom: 1em;
}

li {
    margin-left: 1.5em;
    margin-bottom: 0.2em;
    line-height: 1.5em;
}

p {
    line-height: 1.8em;
    margin-bottom: 1em;
}

pre { 
    font-family: Arial, sans-serif;
    font-size: 95%; 
    text-align: justify; 
    white-space: normal; 
    line-height: 140%; 
    padding: 1em; 
}
pre a {
    text-decoration: none;
}
pre h3, pre h4 {
    margin-top: 1.2em;
}

.clear {
    clear: both;
}

.hidden {
    display: none
}

#wrap {
    margin: 1em 0;
}

#logo {
    float: left;
}

#logo h1 {
    padding-left: 15px;
    padding-bottom: 3px;
}
#logo a {
    text-decoration: none;
}
#logo img {
    padding-left: 15px;
}

#main {
    padding-top: 45px;
}

#searchform {
    min-height: 130px;
}
#searchform .form-rows {
    margin: 0 auto 0 200px;
    width: 600px;
}
#searchform .form-rows .row {
    margin: 7px 0;
    display: flex;
    align-items: center;
}
#searchform .form-rows .label {
    width: 140px;
    text-align: right;
    padding-right: 0.7em;
}
#searchform .form-rows .field {
    text-align: right;
}
#searchform .form-rows .field.left {
    text-align: left;
}
#searchform .form-rows .row input[type="search"],
#searchform .form-rows .row select.fw {
    width: 300px;
}

.results, .derror {
    border-top: dotted 1px var(--color-border, #e1e1e1);
    margin: 1em auto 0 auto;
    padding: 10px 4px 4px 4px;
    clear: both;
}
.results > pre {
    font-family: "DejaVu Sans Mono", monospace;
    font-size: 95%;
    text-align: left;
    white-space: pre-wrap;
    line-height: 140%;
    padding: 1em;
}

.dbname-short {
    border-bottom: 1px dotted #aaaaaa;
    cursor: help;
}

a.link-lmr {
    float: right;
    font-size: 8pt;
}

#toggle_options {
    white-space: nowrap;
    margin-left: 4px;
}

#footer {
    clear: both;
    font-size: 80%;
    text-align: center;
    border-top: dotted 1px var(--color-border, #e1e1e1);
    margin: 1.2em auto 10px auto;
    padding: 10px 4px 4px 4px;
}

.copyright {
    margin-top: 4px;
}

/* mobile devices */
@media screen and (max-width: 640px) {
    #main {
        padding-top: 50px;
    }

    #logo h1 {
        font-size: 2em;
        float: right;
    }
    #logo img {
        max-width: 48px;
        max-height: 48px;
        float: left;
        padding-left: 0;
    }

    #searchform {
        clear: both;
        margin-top: 1em;
    }
    #searchform .form-rows {
        margin-left: auto;
        width: 100%;
    }
    #searchform .form-rows .row {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 0.8em;
    }
    #searchform .form-rows .row.action-row {
        align-items: center;
    }
    #searchform .form-rows .label {
        text-align: left;
        width: auto;
    }
    #searchform .form-rows .field {
        width: 100%;
    }
    #searchform .form-rows .row input[type="search"],
    #searchform .form-rows .row select.fw {
        width: 100%;
    }

    #toggle_options {
        padding-top: 4px;
        display: inline-block;
    }

    #action {
        padding-top: 0.5em;
    }

    li {
        margin-left: 1em;
        margin-bottom: 1em;
    }

    pre {
        font-size: 90%;
        padding: 1em 0 0 0;
    }
}

em {
  color: #009900;
}

.dictserver_from {
    font-size: 110%;
    font-weight: 600;
}

.dictd_article {
    margin-top: 1em;
}