/* ページ全体のフォントを変更 */
* {
    font-family: Noto Sans JP, Noto Sans, sans-serif, arial;
    /* スマホの画面枠ぎりぎりまで表示される問題を防ぐ対応 */
    box-sizing: border-box;
}

body {
    /* background: linear-gradient(135deg, #f9f9fb, #eceef3); */
    background-color: #fdfdfd;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

/*---------------------------------------------
ヘッダーフッターのWordPress固有表示を非表示
---------------------------------------------*/
#header,
#headerimg,
#headerimg h1,
#headerimg .description {
    display: none !important;
}

#header+hr {
    display: none;
}

/* フッター非表示 */
#footer {
    display: none !important;
}

/*
 フッターの直前にある <hr> を消したい場合
 :has 対応ブラウザ向け
 */
hr:has(+ #footer) {
    display: none !important;
}

/*---------------------------------------------
アプリのスタイル
---------------------------------------------*/

/* タイトル */
h1 {
    font-size: 24px;
    font-weight: normal;
}

h2 {
    font-size: 24px;
    font-weight: normal;
    text-align: center;
}

.header h1 {
    margin: 0;
    font-size: 28px;
    color: #222;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
}

.header h2 {
    margin: 0;
    font-size: 20px;
    color: #222;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
}

.page-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    position: relative;
    /* display: inline-block; */
    padding-bottom: 8px;
}

.page-title::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background-color: #d2d2d2; /* アクセントカラー */
    border-radius: 2px;
}

/* ボタン */
button {
    padding: 15px 30px;
    background-color: #D16B70;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    margin-bottom: 5px;
}

button:hover {
    background-color: #c64b52;
}

.back-btn {
    width: 300px;
}

/* メッセージボックス */
.message-box {
    background-color: #ffffff;
    border: 5px solid #f0f0f0;
    border-radius: 5px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center; 
    /* 画面幅の割合で指定 */
    /* min-width: 50vw; */
}

/* メッセージタイトル */
.message-title {
    font-size: 24px;
    margin-bottom: 20px;
}

/* メッセージ本文 */
.message-text {
    font-size: 14px;
    margin-bottom: 15px;
    color: #252525;
}

.annotation-text {
    color: red;
}

/* submit時のエラーメッセージ */
#submit-error-message {
    margin: 10px;
    font-size: 16px;
    color: #ea1111;
    text-align: center;
}

/* メッセージ枠 */
.page-container {
    padding: 10px 10px;
    max-width: 960px;
    margin: 0 auto;
}

/* すべてのテキスト入力欄とテキストエリアに共通のスタイルを適用 */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
    /* 内側の余白 */
    padding: 10px;
    /* 薄いグレーの枠線 */
    border: 1px solid #e0e0e0;
    /* 角を少し丸くする */
    border-radius: 4px;
    /* パディングとボーダーを幅に含める */
    box-sizing: border-box;
    /* フォントサイズ */
    font-size: 14px;
    color: #333333;
    /* 上部に余白 */
    margin-top: 5px;
    /* 下部に余白 */
    margin-bottom: 5px;
}

/* 入力欄にフォーカスが当たったときのスタイル */
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus {
    /* デフォルトのフォーカス枠を非表示 */
    outline: none;
    /* 枠線の色を青色に */
    border-color: #007bff;
    /* 柔らかな影を追加 */
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* 非活性な入力フィールドのスタイル */
input[readonly] {
    background-color: #e9ecef;
    color: #495057;
    /* カーソルを禁止マークに変更 */
    cursor: not-allowed;
}

/* submitボタンの配置 */
.submit-btn-container {
    text-align: center;
    display: flex;
    justify-content: center; /* ボタン全体を中央に配置 */
    gap: 40px; /* ここでボタン間の間隔を指定 */
    margin: 20px;
}

/* 確認用項目 */
.confirm-value-linebreak {
    /* 値の全体が次の行から始まり、インデントが適用されるように block を追加 */
    display: block; 
    /* インデント（全角スペース1文字分に近い20pxを利用） */
    padding-left: 20px; 
    /* プリフォーマットされたテキストのように、改行や連続するスペースを保持する */
    white-space: pre-line;
}

.confirm-value-textarea {
    /* 値の全体が次の行から始まり、インデントが適用されるように block を追加 */
    display: block; 
    /* インデント（全角スペース1文字分に近い20pxを利用） */
    /* padding-left: 20px;  */
    /* プリフォーマットされたテキストのように、改行や連続するスペースを保持する */
    white-space: pre-line;
}

/* 閉じるボタン */
.close-button {
    position: absolute;
    top: 15px;
    /* 上からの位置を少し調整 */
    right: 15px;
    /* 右からの位置を少し調整 */
    font-size: 20px;
    /* バツマークのサイズを調整 */
    font-weight: bold;
    color: #555;
    /* バツマークの色を濃いグレーに */
    background-color: #e0e0e0;
    /* 丸い背景色 */
    border-radius: 50%;
    /* 丸い形状にする */
    width: 30px;
    /* ボタンの幅 */
    height: 30px;
    /* ボタンの高さ */
    display: flex;
    /* 中央寄せのためにFlexboxを使用 */
    justify-content: center;
    /* 水平方向の中央寄せ */
    align-items: center;
    /* 垂直方向の中央寄せ */
    cursor: pointer;
    transition: background-color 0.3s ease;
    /* ホバー時のアニメーション */
}

.close-button:hover {
    /* ホバー時の背景色 */
    background-color: #d0d0d0;
    /* ホバー時のバツマークの色 */
    color: #333;
}

/* 戻るボタン */
.return-btn {
    /* 楕円形にするためのスタイル */
    background-color: #ffffff;
    color: #161616;
    /* ボタンの背景色 */
    border: 1px solid #ccc;
    /* ホバー時のアニメーション効果 */
    transition: all 0.2s ease;
}

.return-btn:hover {
    /* ホバー時の背景色 */
    background-color: #f7f7f7;
    /* ホバー時のボーダー色 */
    /* border-color: #999; */
}

/* タイトル横の縦ライン */
.section-title {
    border-left: 4px solid #333232;;
    font-size: 22px;
    font-weight: 500;
    font-weight: normal;
    height: 32px;
    line-height: 32px;
    margin-top: 25px;
    margin-bottom: 25px;
    padding-left: 20px;
    /* ラベルの位置調整 */
    position: relative;
}

.section-title::before {
    background-color: #ee8373;
    bottom: 0;
    content: "";
    display: block;
    height: 15px;
    left: -4px;
    /* ラインの位置調整 */
    position: absolute;
    width: 4px;
}

/* テーブル関連 * 
/* テーブル全体のスタイル */
.base-table {
    width: 100%;
    border-collapse: collapse;
    /* テーブル全体には左と上の境界線のみを設定 */
    border-top: 1px solid #e0e0e0;
    border-left: 1px solid #e0e0e0;
}

/* セルのスタイル */
.base-table th,
.base-table td {
    padding: 10px;
    vertical-align: middle;
    text-align: left;
    /* セルには右と下の境界線のみを設定 */
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

/* 予約内容欄用 連絡先情報テーブルと接地した際に境界線が濃くならない対策 */
.base-table-details {
    border-top: none;
}

/* ヘッダーセルのスタイル */
.base-table th {
    background-color: #f2f2f2;
    font-weight: normal;
}

.base-table td {
    /* 表の値列の幅 */
    width: 65%;
}

.base-table .main-category {
    font-size: 14px;
    background-color: #f0f0f0;
}

.base-table .half-width-input {
    width: 48%;
    display: inline-block;
}

.base-table .half-width-input:first-child {
    margin-right: 2%;
}

/* 必須マーク */
.required::after {
    content: "必須";
    font-size: 10px;
    font-weight: 500;

    background-color: #e81058;
    padding: 5px;
    vertical-align: middle;
    margin: 0 0 0 10px;
    color: #fff;
    border-radius: 5px;
}

/**
*  入力内容の表示関連 
*/
.input-row {
    font-size: 14px;
    display: flex;
    gap: 10px;
    /* 項目間のスペース */
}

.input-row .input-container {
    flex: 1;
}

.label-cell-contact {
    /* インラインブロックとして扱うことでwidthを有効にする */
    display: inline-block;
    width: 150px;
}

.label-cell-request {
    /* インラインブロックとして扱うことでwidthを有効にする */
    display: inline-block;
    width: 150px;
}

.main-content-container {
    max-width: 960px;
    margin: 20px auto;
    /* padding: 0px 20px; */
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    /* border: 1.5px solid #e9e9e9; */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
    /* box-shadow: 0 0px 1px rgba(0, 0, 0, 0.5); */
}

.main-content {
    padding-left: 15px;
    padding-right: 15px;
}

.main-content-title {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.confirm-value {
    /* 欧米言語などの長い単語を、行の終端で強制的に改行する */
    overflow-wrap: break-word;
    /* 互換性のためword-wrapも設定（overflow-wrapの旧称） */
    word-wrap: break-word; 
    
    /* CJK（中国語、日本語、韓国語）以外の言語で、文字と文字の間で強制的に改行する */
    word-break: break-all;
    
    /* overflow-wrapの最新の推奨値で、改行の機会を増やす */
    /* サポートしていないブラウザもあるため、上記と合わせて記述 */
    overflow-wrap: anywhere; 
}

/* ローディングアニメーションのスタイル */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #8d8d8d; /* スピナーの色 */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite; /* 1秒間で1回転 */
    margin: 20px auto;
}

/* スピナーのアニメーションを定義 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---------------------------------
    スマホ向けレイアウトの調整 (Media Queries)
--------------------------------- */
@media (max-width: 768px) {
    body {
        background: #ffffff;
    }

    .main-content-container {
        max-width: 960px;
        margin: 0px;
        padding: 0px;
        background-color: #ffffff;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .main-content {
        padding-left: 0px;
        padding-right: 0px;
    }

    /* テーブル要素のスマホ向けスタイル */
    .base-table {
        display: block;
        width: 100%;
        /* ヘッダーの上罫線が太くなるので消す */
        border-top: 0px solid #e0e0e0; /* モバイル表示時の上罫線を追加 */
    }

    .base-table thead {
        display: none;
    }

    .base-table tbody,
    .base-table tr,
    .base-table td {
        display: block;
        width: 100%;
        border: none;
        padding: 0;
    }

    .base-table td {
        border-right: 1px solid #e0e0e0;
        padding: 5px 0;
    }

    .base-table th{
        display: block;
        width: 100%;
        padding: 20px 10px; /* 統一したパディング */
        border: 1px solid #e0e0e0;
        box-sizing: border-box;
    }
    
    .base-table .main-category {
        text-align: center;
        font-size: 14px;
        /* ヘッダーの左罫線が太くなるので消す */
        border-left: 0px;
    }

    .base-table-details {
        border-bottom: 1px solid #e0e0e0;
    }

    /* 画面1番下のテーブルの下辺罫線 */
    .base-table-bottom {
        border-bottom: 1px solid #e0e0e0;
    }

    .label-cell,
    .label-cell-contact,
    .label-cell-request {
        padding-bottom: 5px;
        display: block;
        width: 100%;
        text-align: center;
        font-size: 12px;
        color: #222;
    }

    .label-cell-radio {
        font-size: 14px;
        padding-left: 10px;
        padding-bottom: 5px;
        display: block;
        text-align: left;
        margin: 10px;
    }

    .confirm-value-linebreak {
        padding-left: 0px; 
    }

    /* 入力欄の左側に余白がない問題を解決 */
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea {
        width: 100%;
        box-sizing: border-box; /* パディングを含める */
        padding: 10px 15px; /* 左右に余白を設定 */
    }

    /* ラジオボタンを横並びにする */
    .input-group-radio {
        display: flex;
        justify-content: center;
        margin: 10px 0px;
    }

    .input-textarea {
        /* テキストエリアの高さ調整 */
        min-height: 75px;
    }

    /* ラジオボタン間の余白を作るためのクラス */
    .input-radio-margin {
        width: 30px;
    }

    /* 必須マークの配置を調整 */
    .required::after {
        content: "必須";
        background-color: #e60021;
        color: #fff;
        font-size: 12px;
        padding: 2px 5px;
        border-radius: 4px;
        margin-left: 8px;
        vertical-align: middle;
    }

    /* その他のモバイル向けスタイルは以前のまま */
    .input-row {
        display: flex;
        flex-direction: column;
        gap: 0px;
    }

    .input-row .input-container {
        width: 100%;
        padding: 6px 12px;
        border: none;
        text-align: center;
    }

    .input-name {
        width: 100%;
    }

    .input-cell {
        display: block;
        width: 100%;
    }

    .button-group {
        display: flex;
        flex-direction: column-reverse;
        gap: 15px;
    }

    .button-group button {
        width: 100%;
        margin: 0;
    }

    #submit-reservation {
        width: 100%;
    }
 }