/* style.css */
html {
    overflow-y: scroll;
}
body, html { 
    font-family: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
    background-color: #fffffc; /* 胡粉色 こふんいろ */
    color: #3c3c3c; /* 共通フォント色 */
}
h1 {
    font-size: 22px;
    margin: 0;
}
a {
  text-decoration: none; /* 下線を消す */
  color: inherit;        /* 親要素の文字色を使う */
}
.red {
    color: #bb0000;
}
.blue {
    color: #0078D4;
}

.center {
    text-align: center;
}

.button-row {
    display: flex;
    align-items: center;
}
.justify {
    justify-content: space-between; /* 左 / 中央 / 右 に配置 */
}
.button-row b {
    margin-right: auto;
}
.step {
  display: flex;
  align-items: center;
}
.left, .page2_left { /* 左側レイアウト */
    margin: 10px;
    padding: 5px;
    box-sizing: border-box; 
    background-color: #bd00001d;
    border-width: 2px;
    border-style: solid;
    border-color: #bb0000;
    border-radius: 15px;
}
.font14 {
  font-size: 14px;
}
footer {
    padding: 20px;
}
.input_form.gray {
  background-color: #eee;
}


/* Table & Input */
table {
    border-collapse: collapse;
    width: 100%;
}
th, td {
    border: 1px solid #dddcd6;
    padding: 1px 1px;
    text-align: center;
    font-weight: normal;
}
tr:nth-child(even) {
    background-color: #fffffc; /* 胡粉色 こふんいろ */
}
table.shi {
    border-collapse: collapse;
    width: 100%;
}
table.shi th, table.shi td {
    border: 1px solid #999;     /* セルの線 */
    padding: 1px 1px;
    vertical-align: center;
}
.input_form2 {
    width: 60%;
    height: 30px;
    box-sizing: border-box;
}
.input_form {
    width: 85%;
    height: 30px;
    font-size: 16px;
    padding: 4px 6px;
    box-sizing: border-box;
    margin-bottom: 6px;
    color: #3c3c3c; /* 共通フォント色 */
    background-color: #fffffc; /* 胡粉色 こふんいろ */
    border: 1px solid #dddcd6; /* 枠線の色 */
    border-radius: 6px; /* 角丸 */
}
.input_formred {
    width:100%;
    height: 30px;
    font-size: 16px;
    padding: 4px 6px;
    box-sizing: border-box;
    margin-bottom: 6px;
    color: #3c3c3c; /* 共通フォント色 */
    background-color: #E8F0FE;
    border: 1px solid #dddcd6; /* 枠線の色 */
    border-radius: 6px; /* 角丸 */
}
.input_form:invalid {
  color: #757575;
}
.input_formred:invalid {
  color: #757575;
}


/* PC用 600px以上 */
@media (min-width:600px) {
    .top-row {
        display: flex;
        flex-direction: row; /* 横並び指定 */
    }
    .left, .page2_left {
        flex: 1;
        padding:15px; 
    }
    .right, .page2_right {
        flex: 2;
        padding: 10px;
    }
    h1 {
        font-size: 24px;
    }
    .input_form {
        width:90%;
    }
}



/* Button */
button {
    padding: 5px 15px;
    font-size: 18px;
    line-height: 1.4;
    background-color: #bb0000;
    color: #fff;
    border: 2px solid #bb0000;
    border-radius: 30px;
    cursor: pointer;
    margin: 5px;
}
#btn5 {
    background-color: #fff;
    border: 2px solid #bb0000;
    font-weight: normal;
    color: #bb0000;
    font-weight: bold;
}
#openData, #saveData, #btn2, #btn4 {
    background-color: #fff;
    border: 2px solid #bb0000;
    font-weight: normal;
    color: #bb0000;
    font-weight: bold;
}
#buy {
    background-color: #fff;
    border: 2px solid #bb0000;
    font-weight: normal;
    color: #bb0000;
    margin: 15px;
}
#print, #search1, #search2 {
    background-color: #0078D4;
    border: 2px solid #fff;
    font-weight: normal;
    color: #fff;
}



/* help-popover*/
.help {
    position: relative;
    display: inline-block;
}
.help-button {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #bb0000;
    border-radius: 50%;
    background-color: #00000000;
    color: #bb0000;
    font-weight: bold;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    display: inline-block;
    box-sizing: border-box;
}
.popover {
    font-size: 15px;
    position: absolute;
    top: -60%;      /* ← ボタンの下方向へ（%はボタンの高さ基準） */
    left: 100%;     /* ← ボタンの右方向へ（%はボタンの幅基準） */
    max-width: 500px;
    padding: 10px;
    background: #deedd7;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    z-index: 200;
    color: #000;
    text-align: left;
}
.popover.show {
    display: block;
}
#left, #page2-left {
  position: relative;
}
.help-bottom{
  position: absolute;
  right: 10px;
  bottom: 10px;
}


/* check box をsliderに変更 */
#toggle, #toggle2, #toggle3 {
    appearance: none;
    -webkit-appearance: none;
    width: 50px;
    height: 26px;
    background: #c0c0c0;
    border-radius: 50px;
    position: relative;
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s;
    vertical-align: middle;
}
/* 丸部分 */
#toggle::before, #toggle2::before, #toggle3::before {
    content: "";
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}
/* ON の状態 */
#toggle:checked, #toggle2:checked, #toggle3:checked {
    background: #0078D4;
}
#toggle:checked::before, #toggle2:checked::before, #toggle3:checked::before {
    transform: translateX(24px);
}




/* 処理中マーク */
.spinner {
  width: 24px;
  height: 24px;
  border: 4px solid #ccc;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media print {
  body * {
    visibility: hidden;
  }
  .right * {
    visibility: visible;
  }
  .right {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    box-sizing: border-box;
  }
}