/* Copyright (c) 2023 Joel Klinghed, see LICENSE file. */

body {
    font-family: sans-serif;
    font-size: 25px;
}

button {
    margin: 10px;
    min-height: 48px;
    min-width: 48px;
}

.hidden {
    display: none;
}

.health_box {
    clear: both;
    margin: auto;
    max-width: 500px;
    text-align: center;
}

.health_max_health {
    margin-left: 10px;
}

.health_top_row {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.health_top_row > span {
    align-items: center;
    display: flex;
}

.health_bg button {
    background-color: inherit;
    border: 0;
    color: white;
    cursor: pointer;
    font-size: 45px;
    margin: 10px;
}

.health .health_heal,
.health .health_hurt {
    font-size: 150%;
}

.health_current_health {
    font-size: 300%;
}

.setup_dialog {
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    height: 100%;
    left: 0;
    overflow: auto;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1;
}

.setup_dialog_content {
    background-color: #fefefe;
    border: 1px solid #888;
    font-size: 20px;
    margin: 10% auto;
    max-width: 400px;
}

.setup_dialog_content form {
    padding: 30px 30px 0 30px;
}

.setup_dialog_content .close {
    float: right;
    font-size: 48px;
    padding-right: 10px;
}

.setup_dialog_content .close:hover,
.setup_dialog_content .close:focus {
    cursor: pointer;
}

.setup_dialog_content input {
    font-size: 20px;
    width: 5ch;
}

.setup_dialog_content input[type="text"] {
    width: 10ch;
}

.setup_dialog_content label {
    display: inline-block;
    padding: 5px 0 5px 0;
}

.setup_dialog_content select {
    font-size: 20px;
}

.setup_dialog_content button {
    font-size: 35px;
}

fieldset {
    margin: 10px 0 10px 0;
}

.inventory_box {
    margin: auto;
    max-width: 500px;
    text-align: center;
}

.inventory_top_row {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.inventory_top_row > span {
    align-items: center;
    display: flex;
}

.inventory_tbl {
    box-sizing: border-box;
    padding-left: 15px;
    width: 100%;
}

.inventory_tbl input[type="number"] {
    font-size: 20px;
    width: 5ch;
}

.inventory_tbl .inventory_count_col {
    text-align: right;
}

.inventory_count_col input {
    margin-right: 5px;
}

.inventory_count_col button {
    background-color: inherit;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-size: 20px;
    margin: 0;
    min-height: 24px;
    min-width: 40px;
    padding: 0;
}

.inventory_setup_tbl {
    width: 100%;
}

.inventory_setup_tbl .inventory_add_col,
.inventory_setup_tbl .inventory_del_col {
    text-align: right;
}

.spellslots_box {
    margin: auto;
    max-width: 500px;
}

.spellslots_top_row {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.spellslots_top_row > span {
    align-items: center;
    display: flex;
}

.spellslots_levels {
    padding-left: 15px;
    padding-right: 15px;
}

.spellslots_levels_row {
    align-items: center;
    display: flex;
}

.spellslots_levels input[type="checkbox"] {
    margin-left: 10px;
    min-height: 48px;
    min-width: 48px;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: black;
        color: #999;
    }

    .health_bg {
        color: black;
    }

    .setup_dialog_content {
        color: black;
    }

    /* <table> has weird inheritance rules in chromium based browsers */
    .setup_dialog_content table {
        color: black;
    }
}
