/* ==========================================
   ローディング表示 ＆ インジケーター
   ========================================== */

/* 全面ローディングオーバーレイ */
.loading_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading_text {
    margin-top: 15px;
    font-size: 13px;
    color: #555;
    font-weight: bold;
}

/* 3つドットのローディングアニメーション */
.dots_spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dots_spinner div {
    width: 12px;
    height: 12px;
    background-color: var(--blue05-color, #0066cc);
    border-radius: 50%;
    animation: dots_bounce 1.4s infinite ease-in-out both;
}

.dots_spinner div:nth-child(1) {
    animation-delay: -0.32s;
}

.dots_spinner div:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dots_bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.3;
    }
    40% {
        transform: scale(1.0);
        opacity: 1;
    }
}

#referrerDisplay {
    text-align: right;
}

.required_mark {
    color: #d33542;             /* 赤字 */
    font-size: 9px;          /* 少し小さめにして見やすく */
    font-weight: bold;
    margin-right: 4px;          /* 項目名との間の余白 */
    display: inline-block;
}

/* ==========================================
   連打防止（disabled時のスタイル）
   ========================================== */
button:disabled,
.ticket_submit:disabled {
    background-color: #cccccc !important;
    border-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
    pointer-events: none; /* クリックイベントを完全に遮断 */
}

/*ボタン*/
button {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    margin-top: 15px;
}

/*テーブル全体のレイアウト固定*/
.ticket_reservation_box {
    margin: auto;
    table-layout: fixed;
    border-collapse: collapse;
    width: 100%;
}

.ticket_reservation_box tr th, 
.ticket_reservation_box tr td {
    padding: 5px;
    text-align: left;
    box-sizing: border-box; /* paddingとborderを含めて幅計算する */
}

/* ★ 全入力要素のボックスモデルを統一 */
.ticket_selectbox,
.ticket_textbox_label,
.ticket_textbox,
.ticket_textarea {
    color: #444;
    box-sizing: border-box; /* 追加 */
}

/* ★ ラバー（親<label>）と入力欄の幅制御 */
.ticket_selectbox {
    display: inline-flex;
    align-items: center;
    position: relative;
    width: 100%;       /* 幅いっぱいに広げる */
    min-width: 170px;  /* 最小幅を統一 */
}

.ticket_selectbox select {
    width: 100%;       /* stretch から 100% に変更して安全化 */
    appearance: none;
    min-width: 170px;
    height: 2.8em;
    padding: .4em calc(.8em + 30px) .4em .8em;
    border: 0.5px solid var(--box-color);
    border-radius: 3px;
    background-color: #fff;
    color: #333333;
    font-size: 12px;
    cursor: pointer;
    box-sizing: border-box; /* 追加 */
}

.ticket_selectbox::after {
    position: absolute;
    right: 15px;
    width: 10px;
    height: 7px;
    background-color: var(--box-color);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    content: '';
    pointer-events: none;
}

.ticket_textbox_label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
}

/* テキストボックスの幅統一 */
.ticket_textbox {
    width: 100%;       /* stretch から 100% に変更 */
    min-width: 170px;
    height: 2.8em;
    padding: 0 .8em;
    border: 0.5px solid var(--box-color);
    border-radius: 3px;
    font-size: 12px;
    line-height: 1.5;
    box-sizing: border-box; /* 追加 */
}

.ticket_textbox::placeholder {
    color: #999;
}

/* テキストエリアの幅統一 */
.ticket_textarea {
    width: 100%;       /* stretch から 100% に変更 */
    min-width: 170px;
    height: 15em;
    padding: .4em .8em;
    border: 0.5px solid var(--box-color);
    border-radius: 3px;
    font-size: 12px;
    line-height: 1.5;
    resize: none;
    box-sizing: border-box; /* 追加 */
}

.ticket_submit {
    padding: .4em .8em;
    font-size: 12px;
    background-color: var(--blue05-color);
    border-radius: 3px;
    border: 1px solid var(--blue05-color);
    cursor: pointer;
}

.ticket_submit:hover {
    background-color: #fff;
    border: 1px solid var(--blue05-color);
}

@media only screen and (max-width: 599px){
    /* 1. テーブル構造をブロック要素に変更して横並びを解除 */
    .ticket_reservation_box,
    .ticket_reservation_box tbody,
    .ticket_reservation_box tr,
    .ticket_reservation_box tr th,
    .ticket_reservation_box tr td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* 2. スマホでの余白と配置の微調整 */
    .ticket_reservation_box tr {
        margin-bottom: 12px; /* 項目ごとの間隔を開ける */
    }

    .ticket_reservation_box tr th {
        padding: 4px 0;
        font-size: 13px;
    }

    .ticket_reservation_box tr td {
        padding: 2px 0 8px 0;
    }

    /* 3. スマホ画面に合わせて最小幅を柔軟に縮小 */
    .ticket_selectbox,
    .ticket_selectbox select,
    .ticket_textbox,
    .ticket_textarea {
        min-width: 0 !important; /* はみ出し防止のため最小幅の制限を解除 */
        width: 100% !important;  /* 親要素いっぱいに広げる */
    }
}

@media only screen and (min-width: 600px){
    .ticket_reservation_box {
        width: 90%;
    }
}

.res_box {
    background: #f9f9f9; 
    padding: 15px; 
    display: inline-block; 
    margin: 20px 0; 
    border: 1px solid #ccc;
}

.res_id {
    margin: 0;
}

.a_to_index {
    display: inline-block; 
    margin-top: 20px; 
    text-decoration: none; 
    padding: 10px 20px; 
    background: #444; 
    color: #fff;
}

/* モーダルの基本CSS */
#confirmModal {
  display: none; /* 初期状態は非表示 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* 背景を暗く */
  z-index: 9999; /* 他の要素より前面に表示 */
}