/* フォーム
  ====================================================*/
label {
    text-align: left;
    font-family: "NSJ400", sans-serif;
    font-weight: 400;
    font-size: clamp(0.875rem, 0.8295rem + 0.2273vw, 1rem); /* 14px~16px */
}
.required:after {
    content: " *";
    color: #e00;
}
/* エラーララベル用 */
.error-lalabel-message {
    font-size: clamp(0.75rem, 0.7045rem + 0.2273vw, 0.875rem);
    display: block;
    color: red;
}
.error-lalabel-message-center {
    font-size: clamp(0.75rem, 0.7045rem + 0.2273vw, 0.875rem);
    display: block;
    color: red;
    margin: 0 auto;
}
/* エラーフロント用 */
/* 
  <input type="email" id="email" name="email" value="" placeholder="sample@xxxx.xxx"
  pattern="[a-zA-Z0-9+\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$" required >
  <div class="error">正しい形式のメールアドレスを入力してください</div>
   */
/* 
  <input type="tel" id="phone" name="phone" pattern="\d{2,4}-\d{3,4}-\d{3,4}"
  placeholder="03-123-4567" required />
  <div class="error">正しい形式の電話番号入力してください</div>
  */
.error {
    visibility: hidden;
    font-size: clamp(0.75rem, 0.7045rem + 0.2273vw, 0.875rem);
}
input:invalid:not(:focus):not(:placeholder-shown) + div.error {
    font-size: clamp(0.75rem, 0.7045rem + 0.2273vw, 0.875rem);
    visibility: visible;
    color: red;
}
.error-login {
    visibility: hidden;
    font-size: clamp(0.75rem, 0.7045rem + 0.2273vw, 0.875rem);
}
input:invalid:not(:focus):not(:placeholder-shown) + div.error-login {
    font-size: clamp(0.75rem, 0.7045rem + 0.2273vw, 0.875rem);
    visibility: visible;
    color: red;
    margin: 0 auto;
}
/* テキスト */
::placeholder {
    text-align: left;
    font-family: "NSJ400", sans-serif;
    font-weight: 400;
    font-size: clamp(0.875rem, 0.8295rem + 0.2273vw, 1rem); /* 14px~16px */
}
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
select,
textarea {
    background: #f8f8f8;
    display: block;
    padding: 12px 15px;
    transition: 0.1s;
    border-radius: 5px;
    width: 100%;
    border: 1px solid #ccc;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    background: #fcfaf3; /* 色指定 */
    outline: none;
    box-shadow: /* 色指定 */ 2px 2px #efbc3b, -2px 2px #efbc3b,
        -2px -2px #efbc3b, 2px -2px #efbc3b, 2px 0px #efbc3b, 0px 2px #efbc3b,
        -2px 0px #efbc3b, 0px -2px #efbc3b;
    border-color: transparent;
}
textarea[name="content"] {
    display: inline-block;
    width: 100%;
    height: 150px;
}
input::placeholder,
select::placeholder,
textarea::placeholder {
    color: #ccc;
}
::-webkit-input-placeholder {
    color: #ccc;
    opacity: 1;
}
::-moz-placeholder {
    color: #ccc;
    opacity: 1;
}
:-ms-input-placeholder {
    color: #ccc;
    opacity: 1;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
    appearance: none;
    -webkit-appearance: none !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
}
/* 日付 */
/* <script>
    document.addEventListener('DOMContentLoaded', function () {
    // 初期表示時の文字色変更
    document.querySelectorAll('input[type=date]').forEach(function (datebox) {
        datebox.style.color = (datebox.value) ? 'black' : '#f8f8f8';
    });

    // フォーカス取得時は入力用にいったん色を付ける
    document.querySelectorAll('input[type=date]').forEach(function (datebox) {
        datebox.addEventListener('focus', function (event) {
            this.style.color = 'black';
        });
    });

    // フォーカス喪失後の文字色変更
    document.querySelectorAll('input[type=date]').forEach(function (datebox) {
        datebox.addEventListener('blur', function (event) {
            this.style.color = (this.value) ? 'black' : '#f8f8f8';
        });
    });
});
</script> */
.day-wrap input[type="date"] {
    position: relative;
}
.day-wrap input[type="date"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}
.day-wrap input[type="date"]::-webkit-clear-button {
    -webkit-appearance: none;
}
.day-wrap input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.day-wrap {
    /* 日付ボックスの親要素 */
    position: relative;
}
.day-wrap:after {
    /* 日付ボックスの親要素にオリジナルの矢印を宣言 */
    content: "\f073"; /* fontawesomeのアイコン表示 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    color: #000;
    width: 0;
    z-index: 0;
    position: absolute;
    top: 50%;
    right: 33px;
    transform: translateY(-50%);
    pointer-events: none;
}

/* セレクトボックス */
/* 
<div class="select-wrap">
    <select>
        <option value="オプション１">オプション１</option>
        <option value="オプション２">オプション２</option>
    </select>
</div>
*/
.select-wrap {
    /* selectボックスの親要素 */
    position: relative;
}
.select-wrap:after {
    /* selectボックスの親要素にオリジナルの矢印を宣言 */
    content: "\f078"; /* fontawesomeのアイコン表示 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    color: #000;
    width: 0;
    z-index: 0;
    position: absolute;
    top: 50%;
    right: 33px;
    transform: translateY(-50%);
    pointer-events: none;
}
/* ラジオ */
/* 
  <p>
  <input type="radio" id="統一" name="項目" value="項目" checked="" autocomplete="off">
  <label for="統一">項目</label>
  </p>
  */
input[type="radio"] {
    position: relative;
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 50%;
    vertical-align: -2px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
input[type="radio"]:checked:before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #009aa4; /* 色指定 */
    content: "";
}
/* チェックボックス */
/* 
  <div>
  <input type="checkbox" id="統一" name="項目">
  <label for="統一" class="checkbox-point">項目</label>
  </div>
  */
.checkbox-point {
    cursor: pointer;
    display: inline-block;
    padding: 5px 30px;
    position: relative;
    width: auto;
    color: #666;
    user-select: none;
}
.checkbox-point:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 5px;
    display: block;
    height: 16px;
    width: 16px;
    margin-top: -10px;
    border-radius: 3px;
    background: #fff;
    border: 1px solid #aaa;
}
.checkbox-point:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 10px;
    display: block;
    height: 11px;
    width: 6px;
    margin-top: -8px;
    border-right: 2px solid #009aa4; /* 色指定 */
    border-bottom: 2px solid #009aa4; /* 色指定 */
    opacity: 0;
    transform: rotate(45deg);
}
input[type="checkbox"]:checked ~ .checkbox-point::after {
    opacity: 1;
}

/* ファイル */
/* 
  <input type="file" id="imgs" name="imgs1" accept=".jpg, .jpeg, .png" onchange="preview(this)">
  <div class="preview-area"></div>

    <script>
    function preview(elem) {
        const file = elem.files[0]
        const isOK = file?.type?.startsWith('image/')
        const image = (file && isOK) ? `<img src=${URL.createObjectURL(file)}>` : ''
        elem.nextElementSibling.innerHTML = image
    }
    </script>
  */

.preview-area {
    width: 150px;
}

.preview-area img {
    width: 100%;
    margin: clamp(1rem, 0.6364rem + 1.8182vw, 2rem) 0;
}

input[type="file"] {
    background: #f8f8f8;
    display: block;
    padding: 12px 15px;
    transition: 0.1s;
    border-radius: 5px;
    width: 100%;
    border: 1px solid #ccc;
}

::file-selector-button,
::-webkit-file-upload-button {
    background-color: #6eb4cf;
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 0.25rem 1rem;
    margin-right: 1rem;
    border-radius: 5px;
}

/* 規約チェックボックス */
/* 
  <div class="agree-checkbox">
  <input type="checkbox" id="sample" name="sample1">
  <label for="sample" class="agree-checkbox-point">会員規約に同意する</label>
  </div>
  */
.agree-checkbox label {
    font-size: clamp(0.75rem, 0.7045rem + 0.2273vw, 0.875rem);
}
.agree-checkbox-point {
    cursor: pointer;
    display: inline-block;
    padding: 5px 30px;
    position: relative;
    width: auto;
    color: #666;
    user-select: none;
}
.agree-checkbox-point:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 5px;
    display: block;
    height: 16px;
    width: 16px;
    margin-top: -9px;
    border-radius: 3px;
    background: #fff;
    border: 1px solid #aaa;
}
.agree-checkbox-point:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 10px;
    display: block;
    height: 11px;
    width: 6px;
    margin-top: -8px;
    border-right: 2px solid #1c5ce5; /* 色指定 */
    border-bottom: 2px solid #1c5ce5; /* 色指定 */
    opacity: 0;
    transform: rotate(45deg);
}
.agree-checkbox input[type="checkbox"]:checked ~ .agree-checkbox-point::after {
    opacity: 1;
}

/* 規約文章表示 */
.ruleArea {
    width: 100%;
    text-align: left;
    overflow-y: scroll;
    height: 125px;
    color: #333333;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
}
.ruleArea p {
    font-size: clamp(0.625rem, 0.5795rem + 0.2273vw, 0.75rem);
}
.ruleArea pre {
    white-space: pre-wrap;
    font-size: clamp(0.625rem, 0.5795rem + 0.2273vw, 0.75rem);
}
p.indent-0 {
    padding-left: 1em;
    text-indent: -1em;
}
p.indent-1 {
    padding-left: 2em;
    text-indent: -1em;
}
p.indent-2 {
    padding-left: 3em;
    text-indent: -1em;
}
p.indent-3 {
    padding-left: 4em;
    text-indent: -1em;
}
p.indent-4 {
    padding-left: 5em;
    text-indent: -1em;
}
p.indent-5 {
    padding-left: 6em;
    text-indent: -1em;
}
p.indent-6 {
    padding-left: 7em;
    text-indent: -1em;
}
p.indent-7 {
    padding-left: 8em;
    text-indent: -1em;
}
p.indent-8 {
    padding-left: 9em;
    text-indent: -1em;
}
p.indent-9 {
    padding-left: 10em;
    text-indent: -1em;
}

/* サブミット */
/* <!-- inputタグを使う場合 -->
  <input type="submit" name="" value="送信" class="form-submit-button" />
  
  <!-- buttonタグを使う場合 -->
  <button type="submit" class="form-submit-button">送信</button> */

.form-submit-button {
    display: inline-block;
    width: 40%;
    padding: 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: clamp(0.7875rem, 0.675rem + 0.6vw, 1.125rem);
}

.form-submit-button:enabled {
    background-color: #009aa4;
}

.form-submit-button:disabled {
    background-color: #ccc;
}

.form-submit-button:disabled:hover {
    background-color: #ccc;
}

.form-submit-button:enabled:hover {
    background-color: #009aa4;
    opacity: 0.5;
}

.form-submit-button:focus {
    outline: 0;
    background-color: #009aa4;
    border: 2px solid #009aa4;
}

@media screen and (max-width: 500px) {
    .form-submit-button {
        width: 80%;
    }
}

#submitbutton:disabled{
    opacity: 0.3;
}
#submitbutton:enabled{
    opacity: 1;
}

/* aボタン */
/* <a class="form-a-button">ボタン</a>  */

.form-a-button {
    display: inline-block;
    width: 40%;
    padding: 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    border: 2px solid transparent;
    background-color: #009aa4;
    font-size: clamp(0.7875rem, 0.675rem + 0.6vw, 1.125rem);
}

.form-a-button:hover {
    background-color: #009aa4;
    opacity: 0.5;
}

@media screen and (max-width: 500px) {
    .form-a-button {
        width: 80%;
    }
}

/* pボタン風 */
/* <p class="form-p-button">ボタン</p>  */
.form-p-button {
    display: inline-block;
    width: 40%;
    padding: 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid transparent;
    background-color: #009aa4;
    font-size: clamp(0.7875rem, 0.675rem + 0.6vw, 1.125rem);
}

@media screen and (max-width: 500px) {
    .form-p-button {
        width: 80%;
    }
}
