/* style.css */

body {
    font-family: 'Gentium Book Plus', serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 10px;
    color: #333;
}

h1 {
    margin-top: -10px;
    margin-bottom: -10px;
    margin-left: 50px;
    color: #0056b3;
    font-size: 48px;
    font-family: 'Single Day', cursive;
}

h2 {
    margin-top: -10px;
    margin-bottom: -10px;
    margin-left: 20px;
    color: #0056b3;
    font-size: 18px;
    font-family: 'Gentium Book Plus', serif;
}

.icon-button {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 16px;
    margin: 5px;
    transition: background-color 0.3s;
}

.icon-button:hover {
    background-color: #e0e0e0;
}

form {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 10px auto;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

div .lemma {
    background: #fffff4;
}

div .similar {
    background: #fff4f4;
}

div .suggestions {
    background: #f4fff4;
}

div .translations {
    background: #f4f4ff;
}

.scrolllist {
    max-height: 25vh; /* Adjust as needed */
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0;
}

.scrolllist li {
    cursor: pointer;
    padding: 5px 10px;
    list-style-type: none; /* Optional: removes the bullet points */
    border-bottom: 1px solid #ddd;
}

.scrolllist li:hover {
    background-color: #f0f0f0;
}

.scrolllistsmall {
    max-height: 20vh; /* Adjust as needed */
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0;
}

.scrolllistsmall li {
    cursor: pointer;
    padding: 5px 10px;
    list-style-type: none; /* Optional: removes the bullet points */
    border-bottom: 1px solid #ddd;
}

.scrolllistsmall li:hover {
    background-color: #f0f0f0;
}

input[type="text"] {
    width: 100%;
    padding: 5px;
    margin-bottom: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="submit"] {
    background-color: #0056b3;
    color: white;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: 'Gentium Book Plus', serif;
}

input[type="submit"]:hover {
    background-color: #003d82;
}



.container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.lemma, .translations, .suggestions, .similar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 0px;
    flex-basis: 100%; /* on mobile, they take full width */
}

/* Desktop layout */
@media screen and (min-width: 600px) {
    .container {
        display: grid;
        grid-template-columns: 1fr 2fr; /* 1/3 and 2/3 column widths */
        gap: 10px;
    }

    .lemma {
        grid-column: 1; /* Place in the first column */
        grid-row: 1 / span 2;
    }

    .translations {
        grid-column: 1; /* Place in the first column */
        grid-row: 3;
    }

    .suggestions {
        grid-column: 2; /* Place in the second column */
        grid-row: 3; /* First row */
    }

    .container > .similar:first-of-type {
        grid-column: 2; /* Place in the second column */
        grid-row: 1; /* Second row */
    }

    .container > .similar:last-of-type {
        grid-column: 2; /* Place in the second column */
        grid-row: 2; /* Third row */
    }
}

/* Adjusting order for mobile layout */
@media screen and (max-width: 599px) {
    .container > div {
        order: 0; /* Reset order for all */
    }
    .lemma { order: 1; }
    .suggestions { order: 2; }
    .container > .similar:first-of-type { order: 3; } /* Selects the first .similar */
    .container > .similar:last-of-type { order: 4; } /* Selects the last .similar */
    .translations { order: 5; }
