body {
    font-family: Nunito, sans-serif;
    margin: 0;
    padding: 0;
    padding: 1rem;
    background-color: lightgray;
}


/* MODAL */

dialog {
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    overscroll-behavior: contain;
    width: 80%;
    height: 80%;
    z-index: 9999;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

#modal-header {
    position: sticky;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    margin-bottom: 1rem;
    background-color: white;
}

#modal-title {
    font-size: 1.5rem;
    font-weight: bold;
}

#modal-buttons {
    display: flex;
    align-items: center;
}

.modal-button {
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
    padding: 0.5rem;
    width: 30px;
    text-align: center;
    margin-left: 0.5rem;
}

.modal-button:hover {
    background-color: #0056b3;
}



/* PROCESSING */

#processing {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2.5em;
    display: none;
}

/* BUTTONS */

.buttons {
    display: flex;
    justify-content: center;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
    min-width: 100px;
    text-align: center;
    margin-top: 1rem;
    height: 50px;
    border: 1px solid white;
}

.button:hover {
    background-color: #0056b3;
}

.button-100 {
    width: 100px;
}

.button-blue {
    background-color: #007bff;
}

.button-blue:hover {
    background-color: #0056b3;
}

.button-red {
    background-color: #dc3545;
}

.button-red:hover {
    background-color: #c82333;
}



/* HEADER */

#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: cyan;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;

}

#header-left {
    display: flex;
    align-items: center;
    max-width: 80%;
    cursor: pointer;
}

#header-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 1rem;
}

#header-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.header-button {
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
    margin-right: 1rem;
}

.header-button:hover {
    background-color: #0056b3;
}

.header-button-json {
    display: none;
}


/* MENU */

#menu-toggle {
    cursor: pointer;
    padding: 10px;
}

#menu-toggle:hover {
    background-color: lightgray;
}

#menu-dropdown {
    display: none;
    position: absolute;
    background-color: white;
    top: 5px;
    right: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

}

.menu-item {
    cursor: pointer;
    margin: 0.25rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    display: flex;
}

.menu-item:hover {
    background-color: lightgray;
}

.menu-caption {
    margin-left: 0.5rem;
}

.menu-separator {
    border-top: 1px solid lightgray;
    margin: 0.25rem;
}





/* iPhone: 312 x 511 */
@media only screen and (max-width: 350px) {

    #header {
        display: block;
    }

    #header-left {
        margin-bottom: 1rem;
    }

    #header-right {
        justify-content: left;
    }

    #header-title {
        font-size: 1rem;
    }

    #module {
        padding-top: 80px;
    }

    #unit {
        padding-top: 80px;
    }


}


/* Android: 382 x 699 */
@media only screen and (max-width: 400px) {

    #header {
        display: block;
    }

    #header-left {
        margin-bottom: 1rem;
    }

    #header-right {
        justify-content: left;
    }

    #header-title {
        font-size: 1.25rem;
    }

    #module {
        padding-top: 80px;
    }

    #unit {
        padding-top: 80px;
    }

}
