* {
    box-sizing: border-box;
}

body {
    background: #f0e1c2;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

button,
select,
input {
    border-radius: 5px;
    border: 1px solid #a0a0a0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.85em;
    padding: 2px 5px;
}

input[type="checkbox"] {
    height: 15px;
    width: 15px;
}

button,
select {
    background: #e0e0e0;
}

button:hover,
select:hover {
    background: #d6d6d6;
}

.main {
    display: flex;
    align-items: stretch;
    position: fixed;
    inset: 0;
}

.left {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    flex: 1 1 auto;
    border-right: 1px solid black;
    vertical-align: top;
    padding: 10px;
    overflow: auto;
}

#output {
    grid-template-columns: repeat(auto-fit, minmax(20em, 1fr));
}

.right {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    flex: none;
    width: min(50%, 410px);
    vertical-align: top;
    padding: 10px;
    display: flex;
    flex-flow: column;
}

.right div {
    display: flex;
    flex-flow: row wrap;
    justify-content: stretch;
    gap: 5px;
    vertical-align: middle;
}

.outputGroup {
    font-size: 1.2em;
    margin: 10px 5px;
    border: 1px solid #222222;
    display: flex;
}

.outputGroup div {
    height: auto;
    padding: 10px;
    text-align: center;
    border-right: 1px solid #222222;
    vertical-align: middle;
}

.outputGroup div::before {
    content: "";
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}

.outputGroup ul {
    flex: 1;
    margin: 0;
    list-style-type: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10em, 1fr));
}

.outputGroup ul li {
    display: inline-block;
    padding: 10px;
    vertical-align: middle;
    text-align: center;
}

.outputGroup ul li::before {
    content: "";
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}

.g0 {
    background: #dbcaa9;
}

.g1 {
    background: #bfb193;
}

.g0 div {
    background: #4d4d4d;
    color: white;
}

.g1 div {
    background: #3d3d3d;
    color: white;
}

.error {
    background: #ff0000;
    color: white;
    padding: 10px;
}

.warning {
    background: f9e104;
    color: black;
    padding: 10px;
}

#groupInput {
    resize: none;
    border: 1px solid #222222;
    width: 100%;
    font-size: 1.2em;
    height: 75%;
    text-wrap: nowrap;
    flex: 1 1 auto;
}

#generateButton {
    padding: 5px;
    margin: 0 5px 0 0;
    background: #199e1c;
    transition: 0.3s;
    color: white;
    border: 1px solid white;
}

#generateButton:hover {
    background: #106911;
    transition: 0.3s;
}

hr {
    border: 1px dashed black;
    width: 100%;
}

#delWarning {
    text-align: center;
    border-radius: 7px;
}

#delWarning form[method="dialog"] {
    display: flex;
    width: 100%;
}

#delWarning form[method="dialog"] button {
    display: block;
    padding: 5px;
    margin: 5px;
    flex: 1 1 auto;
    border: 1px solid black;
}

#confirmDel {
    background: #dd4f4f;
    color: white;
}

#confirmDel:hover {
    background: #bf0909;
}

#save,
#delete {
    flex: none;
}

#keySelect {
    flex: 1;
}
