@charset "UTF-8";

@property --default {
    syntax: "<color>";
    inherits: false;
    initial-value: #5272d0;
}

@property --positive {
    syntax: "<color>";
    inherits: false;
    initial-value: #38a788;
}

@property --negative {
    syntax: "<color>";
    inherits: false;
    initial-value: #b92a45;
}

@property --background {
    syntax: "<color>";
    inherits: false;
    initial-value: #dde6ff;
}

@property --closed {
    syntax: "<color>";
    inherits: false;
    initial-value: rgb(238, 238, 238);
}

@property --changed {
    syntax: "<color>";
    inherits: false;
    initial-value: #ffefc6;
}

@property --selected {
    syntax: "<color>";
    inherits: false;
    initial-value: #c7fdff;
}

@property --table-header {
    syntax: "<color>";
    inherits: false;
    initial-value: #5272d0;
}

* {
    font-family: "BIZ UDGothic", Arial, "Helvetica Neue", "BIZ UDPGothic", Meiryo, "Hiragino Kaku Gothic Pro", sans-serif;
    font-size: large;
}

:modal {
    border: solid 2px var(--default);
    border-radius: 5px;
}

body {
    position: relative;
    margin-bottom: 10%;
}

header {
    position: relative;
    display: flex;
    flex-direction: column;
    border-bottom: solid 1px gray;
    padding: 6px;
    margin-left: 12px;
    margin-right: 12px;
    margin-bottom: 3px;
}

header h1 {
    text-align: center;
    font-weight: bold;
    font-size: 150%;
    color: black;
}

main {
    position: relative;
    display: flex;
    flex-direction: column;
}

main h1, dialog h1 {
    text-align: center;
    font-weight: bold;
    font-size: 125%;
    color: black;
    border-bottom: solid 1px gray;
    padding: 3px;
    margin-left: 12px;
    margin-right: 12px;
    margin-bottom: 6px;
}

footer {
    position: relative;
    display: flex;
    flex-direction: column;
    border-top: solid 1px gray;
    padding: 6px;
    margin-top: 3px;
    margin-left: 12px;
    margin-right: 12px;
}

article {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 95%;
    border: solid 1px var(--default);
    border-radius: 5px;
    margin: auto;
    margin-top: 3px;
    margin-bottom: 3px;
    background-color: var(--background);
}

table {
    width: 95%;
    border-collapse: collapse;
}

table.fixed {
    table-layout: fixed;
}

table th {
    background-color: var(--table-header);
}

table th {
    color: white;
}

table.selectable tbody tr.selected {
    background-color: var(--selected);
}

table th, td {
    text-align: center;
    border: solid 1px black;
    padding: 3px;
}

table th.left-aligned, td.left-aligned {
    text-align: left;
}

table th.right-aligned, td.right-aligned {
    text-align: right;
}

dialog {
    position: relative;
    width: 90%;
    padding: 0px;
    overflow: auto;
}
dialog::after {
    margin-bottom: 10%;
}

#confirmDialog {
    width: 50%;
}

input:not(.amount), select {
    width: 100%;
    padding: 3px;
    margin-top: 3px;
    margin-bottom: 3px;
    border: solid 1.5px var(--default);
    border-radius: 5px;
    text-align: center;
    font-weight: normal;
    color: var(--default);
    background-color: white;
}

input.changed:not(.amount), select.changed {
    background-color: var(--changed);
}

input[type="hidden"] {
    display: none;
}

input.left-aligned {
    text-align: left;
}

input.right-aligned {
    text-align: right;
}

p:has(input.amount) {
    width: 100%;
    padding: 3px;
    margin-top: 3px;
    margin-bottom: 3px;
    border: solid 1.5px var(--default);
    border-radius: 5px;
    text-align: right;
    font-weight: normal;
    color: var(--default);
    background-color: white;
}
p:has(input.amount.changed) {
    background-color: var(--changed);
}

input.message-field {
    padding: 3px;
    margin-top: 3px;
    margin-bottom: 9px;
    border: none;
    border-radius: unset;
    text-align: left;
    font-weight: normal;
    font-size: 80%;
    color: black;
    background-color: transparent;
}

input.message-field::before {
    content: "";
    display: inline-block;
}

input.message-field.warning {
    color: red;
}

label:has(+input[required], +p input[required])::after {
    content: "必須";
    padding: 2px;
    margin: 2px;
    border: solid 1.5px red;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    font-size: 50%;
    color: red;
    background-color: white;
}

label:has(+select[required])::after {
    content: "必須";
    padding: 2px;
    margin: 2px;
    border: solid 1.5px red;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    font-size: 50%;
    color: red;
    background-color: white;
}

div.row-directed-container {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    pointer-events: none !important;
}

div.row-directed-container * {
    pointer-events: all;
}

div.row-directed-container.left-aligned {
    justify-content:flex-start;
}

div.row-directed-container.right-aligned {
    justify-content: flex-end;
}

div.row-directed-container.top-aligned {
    align-items: flex-start;
}

div.row-directed-container.bottom-aligned {
    align-items: flex-end;
}

div.column-directed-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    pointer-events: none !important;
}

div.column-directed-container * {
    pointer-events: all;
}

div.column-directed-container.top-aligned {
    justify-content:flex-start;
}

div.column-directed-container.bottom-aligned {
    justify-content: flex-end;
}

div.column-directed-container.left-aligned {
    align-items: flex-start;
}

div.column-directed-container.right-aligned {
    align-items: flex-end;
}

div.shrinkable-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

div.shrinkable-container.closed>*:not(header) {
    display: none !important;
}

div.shrinkable-container.template>* {
    display: none !important;
}

div.shrinkable-container:not(.closed) header {
    border: solid 1px var(--default);
    border-radius: 5px;
    padding: 3px;
    margin: auto;
    margin-top: 0px;
    background-color: white;
    width: 100%;
    align-items: center;
    border-bottom-left-radius: 0%;
    border-bottom-right-radius: 0%;
}

div.shrinkable-container:not(.closed) main {
    display: flex;
    flex-direction: column;
    width: 100%;
    border: solid 1px var(--default);
    border-radius: 5px;
    border-top: none;
    margin: auto;
    margin-top: 0px;
    margin-bottom: 6px;
    background-color: var(--background);
    border-top-left-radius: 0%;
    border-top-right-radius: 0%;
}

div.shrinkable-container:last-child:not(.closed) main {
    margin-bottom: 0px;
}

div.shrinkable-container:not(.closed) header:after {
    content: "▲";
    font-size: 80%;
    display: block;
}

div.shrinkable-container:not(.closed) header table {
    display: none;
}

div.shrinkable-container.closed header {
    border: solid 1px var(--default);
    border-radius: 5px;
    padding: 3px;
    margin: auto;
    margin-top: 3px;
    margin-bottom: 3px;
    background-color: var(--closed);
    width: 100%;
    align-items: center;
}

div.shrinkable-container header table, div.shrinkable-container header table td {
    border: none;
}

div.shrinkable-container header table th {
    display: none;
}

div.shrinkable-container header table td:not(:last-child) {
    border-right: solid 1px gray;
}

div.floating-container.top-aligned, div.floating-container.bottom-aligned, div.floating-container.left-aligned, div.floating-container.right-aligned {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.100);
    z-index: 99999;
    pointer-events: none;
}

div.floating-container * {
    pointer-events: all;
}


div.floating-container.top-aligned, div.floating-container.bottom-aligned {
    flex-direction: row;
    width: 100%;
    height: 10%;
    left: 0px;
}

div.floating-container.top-aligned {
    top: 0px;
}

div.floating-container.bottom-aligned {
    bottom: 0px;
}

div.floating-container.left-aligned, div.floating-container.right-aligned {
    flex-direction: column;
    height: 100%;
    width: 30%;
    top: 0px;
}

div.floating-container.left-aligned {
    left: 0px;
}

div.floating-container.right-aligned {
    right: 0px;
}

div.row-directed-container.absolute-top {
    position: absolute;
    top: 0px;
}

div.row-directed-container.absolute-bottom {
    position: absolute;
    bottom: 0px;
}

div.column-directed-container.absolute-left {
    position: absolute;
    left: 0px;
}

div.column-directed-container.absolute-right {
    position: absolute;
    right: 0px;
}

button {
    border: solid 1.5px var(--default);
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    color: var(--default);
    background-color: white;
}

button.edge-round-button {
    border-radius: 999px;
    font-size: x-large;
    padding: 5px;
}

button.round-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: x-large;
}

button.round-button.large {
    font-size: xx-large;
}

button.round-button.small {
    font-size: large;
}

button[disabled] {
    background-color: var(--background);
}

button.hidden {
    display: none;
}

button.delete-button {
    color: red;
    font-size: x-large;
}

button.borderless-button {
    border: solid 1.5px transparent;
    background-color: transparent;
}

button.color-reversal {
    color: white;
    background-color: var(--default);
}

button.positive:not(.color-reversal) {
    color: var(--positive);
}

button.negative:not(.color-reversal) {
    color: var(--negative);
}

button.color-reversal.positive {
    background-color: var(--positive);
}

button.color-reversal.negative {
    background-color: var(--negative);
}

button[disabled].borderless-button {
    color: gray;
}
