@charset "utf-8";

body {
    font-family: "Zen Maru Gothic", sans-serif;
}

html {
    background-color: rgb(188, 232, 185);
    color: rgb(21, 72, 9);
    font-size: 12px;
}

.title {
    display: flex;
    justify-content: space-between;

}

.var {
    margin-top: 8%;
}

h2 {
    font-size: 24px;
}

input {
    font-size: 20px;
}

/*入力要素左の見出し文字*/
.m2 {
    font-size: 16px;
}

button {
    background-color: #4caf50;
    color: rgb(255, 255, 255);
    font-weight: 450;
    font-size: 12px;
    border-radius: 5px;
    margin: 0.005%;
    height: 32px;
}

.operationButton {
    display: flex;
    justify-content: space-between;
}

#allDelete {
    background-color: rgb(169, 37, 37);
    margin-top: 3%;
}

#loadButton,
#addbutton {
    margin-top: 3%;
}

table,
th,
td {
    border: 1px solid #000;
    border-collapse: collapse;
    background-color: #fff;
    color: #000;
}

table button,
th button,
td button {
    border: 0.05px solid #000;
    font-weight: unset;
    background-color: unset;
    color: #000;
    font-size: 10px;

    border: none;
    border-radius: 50%;
}

th {
    background-color: #ccc;
}

#sum {
    display: flex;
    justify-content: end;
    font-weight: bold;
    margin-top: 1.5%;
    background: #fff;
    color: #000;
    padding: 0;
    line-height: 0.5;
    margin-bottom: 3%;
    text-align: right;
}

#sumQuantity {
    margin-right: 5%;
}

#sumAmount {
    margin-right: 1%;
}

#message {
    color: red;
    background: yellow;
    font-weight: bold;
}

th:nth-child(1),
td:nth-child(1) {
    min-width: 110px;
}

th:nth-child(2) {
    width: 2.8rem;
}

th:nth-child(3) {
    width: 3rem;
}

th:nth-child(5) {
    width: 1.5rem;
    font-size: 15px;
}

td:nth-child(5) input[type="checkbox"] {
    transform: scale(1.2);
}

td:nth-child(6) {
    font-size: 8px;
    width: 3.8rem;
}

td:nth-child(7) button {
    background-color: #8bc34a;
    color: #fff;
    width: 25px;
    height: 25px;
    padding: 0;
    font-size: 11px;
    line-height: 1;
}

th:nth-child(7),
th:nth-child(8) {
    width: 2rem;
}

td:nth-child(8) button {
    background-color: #e53935;
    color: #fff;
}

th:nth-child(9) {
    width: 2rem;
    font-size: 9px;
}

td:nth-child(9) {
    text-align: center;
}

td:nth-child(2),
td:nth-child(3),
td:nth-child(4) {
    text-align: right;
}

.delete-cell {
    text-align: center;
}

.delete-cell button {
    background-color: #e53935;
    width: 25px;
    height: 25px;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

.screenshot-mode {
    background: white;
    color: black;
    width: 350px;
    padding: 20px;
    box-sizing: border-box;
}

.screenshot-mode table {
    width: 100%;
}

.screenshot-mode #sum {
    text-align: right;
    width: 100%;
    font-size: 16px;
}

.screenshot-mode .no-shot {
    display: none;
}

.handle {
    padding: 5px;
    font-size: medium;
}

/* 編集モード*/
td input {
    width: 90%;
    font-size: 9px;
    padding: 2px 4px;
    box-sizing: border-box;
}

tr.editing td {
    background-color: #93fb97;
}

tr.editing td:nth-child(1) input {
    width: 100px;
}

tr.editing td:nth-child(2) input {
    width: 32px;
}

tr.editing td:nth-child(3) input {
    width: 25px;
}

tr.editing td:nth-child(6) input {
    width: 50px;
}

/* 編集中は不要列を隠す */
tr.editing td:nth-child(4),
tr.editing td:nth-child(5),
tr.editing td:nth-child(8),
tr.editing td:nth-child(9) {
    visibility: hidden;
}

tr.editing td:nth-child(7) {
    background-color: rgb(255, 255, 255);
}

tr.editing td:nth-child(7) button {
    background-color: #4caf50;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modalContent {
    background-color: rgb(183, 255, 144);
    border: 0.15rem solid black;
    padding: 20px;
    width: 80%;
    max-width: 400px;
    box-sizing: border-box;
    border-radius: 8px;
    text-align: center;
}

.buttons {
    margin-top: 15px;
}

.modalContent button {
    background-color: rgb(19, 66, 25);
    color: white;
    border: none;
    padding: 8px 16px;
    margin: 0 10px;
    border-radius: 4px;
    cursor: pointer;
}

.modalContent button:hover {
    opacity: 0.8;
}

#topBack {
    position: fixed;
    bottom: 5px;
    right: 20px;
    visibility: hidden;
    color: rgb(255, 255, 255);
    background-color: rgb(119, 205, 73);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 8px;
    cursor: pointer;
}

.search-container {
    position: relative;
    display: inline-block;
}

.clear-button {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: none;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    border-radius: 50%;
    background: #ccc;
}


.unchecked-row td {
    filter: grayscale(1);
    background-color: #ededed;
}


@media (min-width: 768px) {
    .m1 {
        display: flex;
        font-size: 20px;
    }

    .operationButton {
        display: flex;
    }

    .operationButton button {
        margin: 0 25px 0 25px;
        height: 100px;
        width: 100px;
        border-radius: 50%;
        font-size: 14px;
        font-weight: 500;
    }

    #table {
        width: 100%;
    }

    table button,
    th button,
    td button {
        border: none;
        border-radius: 5px;
    }

    th {
        font-size: 14px;
    }

    th:nth-child(1) {
        width: 120px;
    }

    td:nth-child(1) {
        font-size: 16px;
    }

    th:nth-child(2) {
        width: 25px;
    }

    th:nth-child(3) {
        width: 25px;
    }

    th:nth-child(4) {
        width: 35px;
    }

    td:nth-child(2),
    td:nth-child(3),
    td:nth-child(4) {
        font-size: 14px;
    }

    th:nth-child(5) {
        width: 20px;
    }

    td:nth-child(5) input[type="checkbox"] {
        transform: scale(1.5);
    }


    td:nth-child(6) {
        width: 100px;
        font-size: 12px;
    }

    td:nth-child(7) button,
    td:nth-child(8) button {
        width: 85%;
        font-size: 16px;
    }

    th:nth-child(7),
    th:nth-child(8) {
        width: 50px;
    }

    th:nth-child(9) {
        width: 30px;
        font-size: 12px;
    }

    td:nth-child(9) {
        text-align: center;
        font-weight: 700;
    }

    .edit-cell,
    .delete-cell {
        text-align: center;
    }

    #sum {
        font-size: 20px;
    }

    td input {
        width: 90%;
        font-size: 9px;
        padding: 2px 4px;
        box-sizing: border-box;
    }

    tr.editing td:nth-child(1) input,
    tr.editing td:nth-child(2) input,
    tr.editing td:nth-child(3) input,
    tr.editing td:nth-child(6) input {
        width: 95%;
    }

    h2 {
        font-size: 30px;
    }

    .title {
        font-size: 22px;
    }

    #topBack {
        width: 60px;
        height: 60px;
        font-size: 11px;
    }

    #footerButton {
        padding-bottom: 50px;
    }

    #footerButton button {
        font-size: 20px;
    }

    .clear-button {
        top: 60%;
    }
}