/* 記録系ページのスタイル (daily_recordsを除く) */

#body-measurement-edit-page,
#body-measurement-index-page,
#breastfeeding-create-page,
#breastfeeding-edit-page,
#breastfeeding-index-page,
#checkups-edit-page,
#checkups-index-page,
#dosing-management-index-page,
#medical-records-edit-page,
#medical-records-index-page,
#personal-records-index-page,
#teeth-edit-page,
#teeth-index-page,
#vaccination-edit-page,
#vaccination-index-page,
.g-record-page-dialog {
    --primary-color-dark: #03b988;
    --primary-color-light: #7fc7b4;
}



/*
    ----------------------------------------------
    身体測定 登録
    ----------------------------------------------
*/

#body-measurement-edit-page .table-wrapper {
    overflow-x: auto;
    max-width: 100%;
}

#body-measurement-edit-page table {
    table-layout: fixed;
    width: max-content;
}

#body-measurement-edit-page th,
#body-measurement-edit-page td {
    height: inherit;
}

#body-measurement-edit-page table th .caption {
    width: 16.8rem;
    height: 5.8rem;
    border: 0.2rem solid #afded2;
    border-left: none;
    border-radius: 0 3rem 3rem 0;
    background-color: white;
}



#body-measurement-edit-page td > input,
#body-measurement-edit-page td > .weight-input input {
    border: none;
    border-radius: unset;
    padding: 0.2rem 1rem 0.2rem 2rem;
    height: inherit;
}

#body-measurement-edit-page td > input[type="date"] {
    width: 100%;
    font-size: 3.5rem;
    font-weight: bold;
}

#body-measurement-edit-page th,
#body-measurement-edit-page td,
#body-measurement-edit-page td > input[type="number"],
#body-measurement-edit-page td > .weight-input input {
    font-size: 3rem;
    font-weight: bold;
}

#body-measurement-edit-page td > .weight-input,
#body-measurement-edit-page td > .weight-input input {
    height: inherit;
}

#body-measurement-edit-page td > input[type="number"],
#body-measurement-edit-page td > .weight-input input {
    width: calc(100% - 6rem);
    text-align: right;
    appearance: textfield;
}

#body-measurement-edit-page td,
#body-measurement-edit-page td > input,
#body-measurement-edit-page td > .weight-input input {
    color: #4d4d4d;
}

#body-measurement-edit-page input[type="number"] + span {
    display: inline-block;
    width: 4.5rem;
    margin-left: 0.5rem;
    font-size: 3rem;
    color: #9d9d9d;
}

#body-measurement-edit-page input::-webkit-inner-spin-button,
#body-measurement-edit-page input::-webkit-outer-spin-button {
    display: none;
}



#body-measurement-edit-page .bm-table th {
    width: 28rem;
}

#body-measurement-edit-page .bm-table th:first-of-type {
    width: 35rem;
    padding-left: 0;
}

#body-measurement-edit-page .bm-table th:first-of-type > input,
#body-measurement-edit-page .bm-table td:first-of-type > input {
    width: 34rem;
}

#body-measurement-edit-page .bm-table th[aria-label="削除"],
#body-measurement-edit-page .bm-table td[aria-label="削除"] {
    width: 13.5rem; /* 15rem - (スクロールバーの幅) */
}

#body-measurement-edit-page .wm-table th:first-of-type {
    width: 35rem;
}



/*
    ----------------------------------------------
    調乳表一覧
    ----------------------------------------------
*/

#breastfeeding-index-page .date {
    text-align: left;
    width: 24rem;
}



/*
    ----------------------------------------------
    調乳表登録
    ----------------------------------------------
*/

#breastfeeding-edit-page {
    --header-height: 16rem;
    --footer-height: 11.2rem;
}

#breastfeeding-edit-page .g-header-fixed {
    /* #fixedHeader */
    position: fixed;
    top: 0; left: 0;
    z-index: 3;
    width: 100vw;
    min-width: 140rem;
}

#breastfeeding-edit-page .g-footer-fixed {
    /* #fixedFooter */
    position: fixed;
    bottom: 0; left: 0;
    width: 100vw;
    min-width: 140rem;
}

#breastfeeding-edit-page .breastfeeding-grid {
    grid-template-columns: 22.8rem 31.8rem 8rem 19.3rem repeat(2, 16rem 2.3rem 12.1rem) 21.3rem 26.3rem 0;
    color: #4d4d4d;
}

#breastfeeding-edit-page .header-cell {
    background-color: var(--primary-color-dark);
    display: grid;
    place-content: center;
    min-width: 4rem;
    height: 7rem;

    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
    text-align: center;
}

#breastfeeding-edit-page .header-cell:not(:first-child) {
    border-left: 1px solid #ededed;
}

#breastfeeding-edit-page .data-cell {
    border: 4px solid #ededed;
    background-color: white;

    min-height: 8rem;

    display: flex;
    align-items: center;
}

#breastfeeding-edit-page .data-cell.gap-cell,
#breastfeeding-edit-page .data-cell[data-kind="cross-icon"] {
    border: none;
    background-color: inherit;
}

#breastfeeding-edit-page .data-cell[data-kind="home"],
#breastfeeding-edit-page .data-cell[data-kind="child"] {
    padding: 2.5rem;
    line-height: 1.2;
}

#breastfeeding-edit-page .data-cell[data-kind="drink"] {
    justify-content: center;
    color: #4d4d4d;
}

#breastfeeding-edit-page .data-cell[data-kind="actual-intake"],
#breastfeeding-edit-page .data-cell[data-kind="planned-intake"],
#breastfeeding-edit-page .data-cell[data-kind="number-of-times"],
#breastfeeding-edit-page .data-cell[data-kind="delta-intake"] {
    padding-right: 1.6rem;
}

#breastfeeding-edit-page .data-cell[data-kind="delta-intake"] {
    padding-left: 1.6rem;
}

#breastfeeding-edit-page .data-cell[data-kind="home"] {
    font-size: 2.8rem;
    font-weight: bold;
}

#breastfeeding-edit-page .data-cell[data-kind="child"] {
    font-size: 3.5rem;
    font-weight: bold;
}

#breastfeeding-edit-page .data-cell[data-kind="cross-icon"] {
    font-size: 3rem;
    color: #9d9d9d;
}

#breastfeeding-edit-page .data-cell[data-kind="drink"] {
    font-size: 2rem;
    font-weight: bold;
    color: #9d9d9d;
}

#breastfeeding-edit-page .data-cell[data-kind="actual-intake"],
#breastfeeding-edit-page .data-cell[data-kind="delta-intake"] {
    font-size: 3.5rem;
    font-weight: bold;
}

#breastfeeding-edit-page .data-cell[data-kind="actual-intake"] > .unit,
#breastfeeding-edit-page .data-cell[data-kind="delta-intake"] > .unit {
    margin-left: 1rem;
}

#breastfeeding-edit-page .number-cell-input {
    appearance: textfield;
    padding-right: 1rem;
    border: none;

    width: 50%;
    height: 100%;
    flex: 1;

    font-size: 3.5rem;
    font-weight: bold;
    text-align: end;
    color: #4d4d4d;
}

#breastfeeding-edit-page .remarks-textarea {
    border: none;
    resize: none;

    padding: 2.5rem 2rem;
    height: 100%;
    flex: 1;

    color: #4d4d4d;
    font-size: 2.5rem;
    line-height: 1.2;
    word-break: break-all;
    word-wrap: break-word;
}

#breastfeeding-edit-page .plus {
    margin-right: 0.6rem;
    width: 2.4rem;

    font-size: 3rem;
    font-weight: normal;
    color: #9d9d9d;
}

#breastfeeding-edit-page .unit {
    margin-bottom: 1.6rem;
    align-self: end;

    font-size: 2.5rem;
    font-weight: normal;
    color: #9d9d9d;
}

#breastfeeding-edit-page input[type="number"]::-webkit-outer-spin-button,
#breastfeeding-edit-page input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    display: none;
}



/*
    ----------------------------------------------
    健診 登録
    ----------------------------------------------
*/

#checkups-edit-page {
    min-width: 150rem;
}

#checkups-edit-page thead th {
    height: 7rem;
    background-color: #03b988;

    font-size: 2.5rem;
    font-weight: bold;
    color: white;
}

#checkups-edit-page tbody th,
#checkups-edit-page tbody td {
    background-color: white;
}

#checkups-edit-page tbody .vacant {
    background-color: transparent;
}

#checkups-edit-page tbody th,
#checkups-edit-page td,
#checkups-edit-page td > input {
    font-weight: bold;
    color: #4d4d4d;
}

#checkups-edit-page tbody th {
    font-size: 3.5rem;
}

#checkups-edit-page tbody td {
    font-size: 3rem;
    height: 12rem;
}

#checkups-edit-page td > input {
    padding: 1rem 2rem;
    border: none;
    width: 100%;
    height: 100%;
}



/*
    ----------------------------------------------
    服薬表
    ----------------------------------------------
*/

#dosing-management-index-page {
    /* ビューポートの横幅が小さい場合にレイアウトが崩れるのを防ぐため、コンテンツの横幅を固定する */
    width: 190rem;
    overflow-x: clip;
}

/* 服薬表のカラム幅 */
.g-dosing-table-part {
    /* スクロールバーのために列幅を17px減らしている (進捗: 100→93 (-6), 薬品: 171→160(-11)) */
    grid-template-columns: 5rem 8.8rem 9.4rem 8.9rem 16rem 75.8rem 28.3rem 15.5rem;
}
.g-dosing-table-day-subgrid {
    grid-template-columns: 5rem 1fr;
}
.g-dosing-table-time-subgrid {
    grid-template-columns: 8.8rem 9.4rem 8.9rem 16rem 75.8rem 28.3rem 15.5rem;
}

/* 服薬表のボーダー */
.g-dosing-table-header {
    border-bottom: 0.2rem solid #afded2;
}
.g-dosing-table-header-cell:last-of-type {
    border-right: 0.2rem solid #afded2;
}
.g-dosing-table-header-cell {
    border-top: 0.2rem solid #afded2;
    border-left: 0.2rem solid #afded2;
}
.g-dosing-table-day-cell {
    border-left: 0.2rem solid #d8d8d8;
}
.g-dosing-table-day-cell,
.g-dosing-table-time-subgrid {
    border-top: 0.2rem solid #d8d8d8;
}
.g-dosing-table-deferred-row,
.g-dosing-table-empty-row,
.g-dosing-table-data-cell {
    border-bottom: 0.2rem solid #d8d8d8;
    border-right: 0.2rem solid #d8d8d8;
}

/* 服薬表の色 */
.g-dosing-table-header-cell {
    background-color: var(--primary-color-dark);
}
.g-dosing-table-data-cell {
    background-color: white;
}
.g-dosing-table-deferred-row,
.g-dosing-table-empty-row {
    background-color: #f3f3f3;
}
.g-dosing-table-data-cell[data-status="pending"] {
    /* (#e8c34926 (不透明度15%)) */
    background-color: #fcf6e4;
}
.g-dosing-table-data-cell[data-status="skipped"] {
    /* (#acd5ea33 (不透明度20%)) */
    background-color: #eef7fb;
}
.g-dosing-table-time-wrapper-emphasized {
    background-color: #f8f813;
}

/* レイアウト */
.g-dosing-table-body,
.g-dosing-table-day-subgrid {
    row-gap: 0.5rem;
}
.g-dosing-table-deferred-row {
    grid-column: 2 / -1;
}
.g-dosing-table-empty-row {
    grid-column: 2 / -1;
}
.g-dosing-table-time-wrapper {
    padding: 1rem 0.8rem;
}
.g-dosing-table-time-name-clamp {
    max-height: 4.5rem;

    /* #multilineTextOverflowEllipsis */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: clip;
}

/* 服薬表: 状況セルのスタイル */
.g-dosing-table-medicine-status-cell {
    grid-auto-columns: calc(75.8rem / 5);
    grid-auto-flow: column;
}
.g-dosing-table-step-card {
    position: relative;
    padding: 1.5rem 0 0 2rem;
}
.g-dosing-table-step-status-icon-active,
.g-dosing-table-step-status-icon-completed,
.g-dosing-table-step-status-icon-error,
.g-dosing-table-step-status-icon-inactive {
    border-radius: 9999px;
    width: 6rem; height: 6rem;
    cursor: inherit; user-select: none;
}
.g-dosing-table-step-status-icon-active {
    /* パディングを使ってコンテンツを中央寄せする (gridを使うよりレイアウト計算のコストが下がる) */
    padding: 1.5rem 1.65rem;

    border: 0.6rem solid #9d9d9d;
    background-color: white;
    font-size: 2.2rem; font-weight: bold;
    color: #9d9d9d;
}
.g-dosing-table-step-status-icon-completed {
    padding: 2rem;
}
.g-dosing-table-step-status-icon-error {
    padding: 1.7rem 2.375rem;
}
.g-dosing-table-step-status-icon-inactive {
    padding: 2.2rem;
}
.g-dosing-step-gauge-bar {
    top: 4.25rem; left: 5rem;
    width: 60.5rem; height: 0.5rem;
}
.g-dosing-table-process-status-contents,
.g-dosing-table-rescue-status-contents {
    padding: 5rem 2rem;
    display: flex; gap: 4rem;
}

/* 服薬表: 補足セル */
.g-dosing-table-remarks-cell {
    padding: 0.5rem 1.5rem;
}
.g-dosing-table-remarks-section {
    line-height: 1.4;
    white-space: pre-line;
    word-break: break-all;

    /* #multilineTextOverflowEllipsis */
    height: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: clip;
}
.g-dosing-table-remarks-separator {
    border-top: 0.1rem solid #d8d8d8;
    border-bottom: none;
    border-inline: none;
}

/* 服薬記録のステータス変更ボタン */
.g-dosing-table-status-button-make-pending,
.g-dosing-table-status-button-revert-pending,
.g-dosing-table-status-button-make-skipped,
.g-dosing-table-status-button-revert-skipped {
    width: 13.5rem; height: 4rem;
    font-size: 1.8rem; font-weight: bold;
    color: #4d4d4d;
}
.g-dosing-table-status-button-make-pending {
    background-color: #e8c349;
}
.g-dosing-table-status-button-revert-pending {
    /* こがね色 */
    border: 0.3rem solid #e8c349;
    background-color: white;
}
.g-dosing-table-status-button-make-skipped {
    background-color: #acd5ea;
}
.g-dosing-table-status-button-revert-skipped {
    /* 空色 */
    border: 0.3rem solid #acd5ea;
    background-color: white;
}

.g-dosing-table-record-info2,
.g-dosing-table-record-info1,
.g-dosing-table-record-info-skeleton {
    width: 14rem;
    height: 7.65rem;
}
.g-dosing-table-record-info-skeleton {
    font-size: 1.7rem;
    color: #d8d8d8;
    line-height: 1.5;
    white-space: pre-line;
}



.g-dosing-management-warning-alert[data-anchor="top"]::before {
    content: "";
    position: absolute;
    top: calc(-1.0rem + 0.1rem);
    left: calc((100% - 1.15rem) / 2);
    width: 1.15rem;
    height: 1.0rem;
    background-color: white;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.g-dosing-management-warning-alert[data-anchor="left"]::before {
    content: "";
    position: absolute;
    top: calc((100% - 1.0rem) / 2);
    left: calc(-1.15rem + 0.2rem);
    width: 1.0rem;
    height: 1.15rem;
    background-color: white;
    clip-path: polygon(0 50%, 100% 0, 100% 100%);
}




/*
    ----------------------------------------------
    医療記録
    ----------------------------------------------
*/

#medical-records-index-page .date {
    width: 24rem;
}



#medical-records-edit-page .g-bullet-heading {
    line-height: 1.2;
}

/* 前後リンク */
#medical-records-edit-page .g-left-angle,
#medical-records-edit-page .g-right-angle {
    width: 1.5rem;
    height: 1.2rem;
}

#medical-records-edit-page .g-left-angle path,
#medical-records-edit-page .g-right-angle path {
    stroke: #03b988;
}

#medical-records-edit-page .react-datepicker__input {
    padding-inline: 1.8rem;
    width: 20.5rem;
}



/*
    ----------------------------------------------
    個人記録
    ----------------------------------------------
*/

#personal-records-index-page .page-title {
    font-size: 4.5rem;
    font-weight: bold;

    color: #03b988;
}

/*
    リスト

    (日計表一覧とだいたい同じ。左端のマーカー、記録日、最終更新・削除ボタンの列がなく、代わりに記録月、こどもの姿の列がある。)
*/

#personal-records-index-page .list {
    gap: 3rem;
}

#personal-records-index-page .header-cell,
#personal-records-index-page .row,
#personal-records-index-page .data-cell {
    /* フレックスボックスの大きさによらず拡縮しない。 */
    flex: 0 0 auto;
}

#personal-records-index-page .header-row,
#personal-records-index-page .row {
    padding-left: 6rem; /* 日計表一覧と違ってマーカーがないのでパディングがいる */
    gap: 5rem;
}

#personal-records-index-page .row {
    padding-right: 2.4rem;
}

#personal-records-index-page .header-row {
    margin-top: 3.2rem;
    margin-bottom: 0.8rem;

    font-size: 2rem;
    font-weight: bold;
    color: #9d9d9d;

    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color-light);
}

#personal-records-index-page .header-cell {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem;
}

#personal-records-index-page .row {
    height: 9rem;

    background-color: white;
    border-radius: 1rem;
    box-shadow: 0px 3px 6px #00000029;
}

#personal-records-index-page .header-row .month,
#personal-records-index-page .row .month {
    width: 14rem;
}

#personal-records-index-page .header-row .name,
#personal-records-index-page .row .name,
#personal-records-index-page .header-row .home,
#personal-records-index-page .row .home {
    width: 24rem;
    line-height: 1.2;
}

#personal-records-index-page .header-row .age,
#personal-records-index-page .row .age {
    width: 15rem;
}

#personal-records-index-page .row .select {
    margin-left: auto;
    width: 6rem;
}

#personal-records-index-page .row .month,
#personal-records-index-page .row .name,
#personal-records-index-page .row .age,
#personal-records-index-page .row .home {
    font-size: 3rem;
    font-weight: bold;
}

#personal-records-index-page .row .name,
#personal-records-index-page .row .age,
#personal-records-index-page .row .home {
    color: #4d4d4d;
}

#personal-records-index-page .row .sugata-button,
#personal-records-index-page .row .pdf-button {
    width: 25rem;
    height: 5rem;

    border-radius: 3rem;

    font-size: 2.5rem;
    font-weight: bold;
}

#personal-records-index-page .row .sugata-button {
    border: 0.2rem solid #03b988;
    color: #03b988;
}

#personal-records-index-page .row .pdf-button {
    background-color: #ffc834;
}

#child-appearance-edit-dialog .g-form-dialog-contents {
    margin: 10rem 4rem 1rem 4rem;
}



/*
    ----------------------------------------------
    生歯
    ----------------------------------------------
*/

.g-tooth-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    border-radius: 1rem;
}

.g-tooth-legends {
    margin: 3rem;
    place-self: start;

    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: repeat(3, auto);
    gap: 3rem 1.5rem;
}

.g-tooth-legends > dd {
    margin-left: 0;

    display: flex;
    flex-flow: row;
    align-items: center;

    font-size: 2.5rem;
    font-weight: bold;
    color: #9d9d9d;
}

.g-teeth-editor {
    position: relative;
    margin: 3rem;
    width: 56rem;
    height: 56rem;
}

.g-teeth-editor .tooth {
    position: absolute;
    left: 25.25rem; /* コンテナ半径:560/2 - 歯の半径:50/2 */
    top: 25.25rem;
}

.g-tooth-container .tooth {
    width: 5rem;
    height: 5rem;
    border-radius: 5rem;
    border: 0.1rem dashed #4d4d4d;
}

.g-tooth-container .tooth[data-status="new"] {
    background-color: #03b988;
    border-color: #03b988;
}

.g-tooth-container .tooth[data-status="old"] {
    background-color: #d8d8d8;
    border-color: #d8d8d8;
}

.g-tooth-container .tooth[data-status="future"] {
    border-style: solid;
}



/*
    ----------------------------------------------
    予防接種 登録
    ----------------------------------------------
*/

#vaccination-edit-page table {
    table-layout: fixed;
    width: 100%;
}

#vaccination-edit-page th {
    width: 31.4rem;
}

#vaccination-edit-page tr {
    height: 1rem;
}

#vaccination-edit-page .data-row {
    height: 10rem;
    background-color: white;
}

#vaccination-edit-page td,
#vaccination-edit-page td > input {
    height: inherit;
    font-size: 2.8rem;
    font-weight: bold;
    color: #4d4d4d;
}

#vaccination-edit-page td > input {
    width: 100%;
    padding: 1rem;
    border: none;
    appearance: textfield;
}

#vaccination-edit-page .periodical-tag,
#vaccination-edit-page .optional-tag {
    margin-right: 1rem;

    border-width: 0.2rem;
    border-style: solid;
    border-radius: 1rem;
    padding: 1rem 2rem;

    font-size: 2rem;
    font-weight: bold;
}

#vaccination-edit-page .periodical-tag {
    color: #56cdeb;
    border-color: #56cdeb;
}

#vaccination-edit-page .optional-tag {
    color: #a3ddb0;
    border-color: #a3ddb0;
}
