body {
    font-size: 110%;
    font-family: -apple-system, BlinkMacSystemFont,
        "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
        "Fira Sans", "Droid Sans", "Helvetica Neue",
        sans-serif;
    background-color: #f7f7f7;
    color: #111;
}



.menu {
    background-color: rgb(13, 25, 83);
}

.menu a {
    color: white;
}

.button {
    background-color: rgb(13, 25, 83);
}

h1 {
    font-size: 1.5em;
    margin-bottom: 1.0em;
}

h1.item_title {
    font-size: 1.6em;
    margin-bottom: 0px;
    font-weight: 500
}

h2 {
    font-size: 1.15em;
    margin-bottom: 1.0em;
}

h1.heading {
    margin-bottom: 0.0em;
}

h2.english_subheading {
    font-size: 0.95em;
    margin-bottom: 1.1em;
    margin-left: 0.1em;
    color: #555
}

a {
    color: rgb(13, 25, 83);
    text-decoration: underline;
}

input[name="q"] {
    margin-bottom: 2.0em;
}

/* Clear button styles */
.input-group {
    position: relative;
    margin-bottom: 2.0em;
}

.input-group .input-group-field {
    margin-bottom: 0;
    padding-right: 40px;
}

.input-group .clear-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    z-index: 1;
    display: none;
}

.input-group .clear-button svg {
    display: block;
    width: 24px;
    height: 24px;
}

.input-group .clear-button svg circle {
    transition: fill 0.15s ease;
}

.input-group .clear-button:hover svg circle {
    fill: rgba(128, 128, 128, 0.5);
}

.input-group .clear-button:active svg circle {
    fill: rgba(128, 128, 128, 0.6);
}

input[type="submit"] {
    width: 100%;
    /*height: 40px;*/
    border: none;
    background-color: rgb(13, 25, 83);
    color: #fff;
    cursor: pointer;
}

div.result {
    padding: 1.0em;
    padding-top: 0.7em;
    padding-bottom: 0.7em;
    background-color: #fefefe;
    border: 1px solid #efefef;
    margin-bottom: 0.7em;
}

span.result_definition_text {
    cursor: default !important;
}

div.item {
    font-size: 1.05em;
}

div.item ul {
    margin-left: 1.6em;
}

div.ipa {
    margin-bottom: 1.0em;
    font-size: 0.9em;
}

div.syllables {
    font-size: 0.9em;
}

hr.separator {
    margin: 2.0em 0;
}

div.wordcat {
    font-weight: 600;
    margin-bottom: 0.5em;
    /* font-style: italic; */
}

div.result:hover {
    background-color: #f1f1f1;
    cursor: pointer;
    border: 1px solid #ddd;
}

div.result a {
    text-decoration: none;
}

div.result p {
    margin-bottom: 0;
}

div.itemlinks {
    float: right;
    color: #aaa;
    height: 100%;
    margin-left: 5px;
}

div.itemslinks>svg {
    color: #aaa;
}

.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    stroke-width: 0;
    stroke: currentColor;
    fill: currentColor;
}

.pag_arrow {
    width: 30px;
    margin-bottom: 10px;
    color: blue;
}

.pag_right {
    float: right;
}

.pag_left {
    float: left;
}

a.result_link {
    color: #111;
}

.aboutimg {
    width: 25%;
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

.zoega-img {
    float: right;
    margin-left: 10px;
    width: 33%;
    filter: invert(0) !important;
}

#wordcats td a, #general_stats td a {
    text-decoration: none;
}

/* Autocompletion styles */
.autocomplete-suggestions {
    text-align: left;
    cursor: default;
    border: 1px solid #ccc;
    border-top: 0;
    background: #fff;
    box-shadow: -1px 1px 3px rgba(0, 0, 0, .1);
    position: absolute;
    display: none;
    z-index: 9999;
    max-height: 254px;
    overflow: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

.autocomplete-suggestion {
    position: relative;
    padding: 0 .6em;
    line-height: 23px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.02em;
    color: #333;
}

.autocomplete-suggestion b {
    font-weight: normal;
    color: #1f8dd6;
}

.autocomplete-suggestion.selected {
    background: #f0f0f0;
}


/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1e1e1e;
        color: #ddd;
    }

    a {
        color: #4ea1f7;
    }

    h2.english_subheading {
        color: #888;
    }

    a.result_link {
        color: #ddd;
    }

    div.result {
        background-color: #2e2e2e;
        border: 1px solid #3e3e3e;
    }

    div.result:hover {
        background-color: #3e3e3e;
        cursor: pointer;
        border: 1px solid #4e4e4e;
    }

    div.grid-container img {
        filter: invert(1);
    }

    input[name="q"] {
        background-color: #2e2e2e;
        color: #ddd;
        border: 1px solid #3e3e3e;
    }

    input[name="q"]:focus {
        background-color: #2e2e2e;
        color: #ddd;
        border: 1px solid #4e4e4e;
    }

    input[name="q"]::placeholder {
        color: #888;
    }

    .autocomplete-suggestions {
        background: #2e2e2e;
        border: 1px solid #555;
    }

    .autocomplete-suggestion {
        color: #ddd;
    }

    .autocomplete-suggestion.selected {
        background: #3e3e3e;
    }

    tbody {
        background-color: #2e2e2e;
        border: 1px solid #555;
    }

    tbody tr:nth-child(even) {
        background-color: #3e3e3e;
    }
}