

.monthly-booking-estimate-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.estimate-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h4 {
    margin-bottom: 15px;
    color: #333;
}

.plan-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.plan-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-option:hover {
    border-color: #007cba;
}

.plan-option input[type="radio"] {
    margin-right: 10px;
}

.plan-option input[type="radio"]:checked+.plan-label {
    color: #007cba;
}

.plan-option:has(input[type="radio"]:checked) {
    border-color: #007cba;
    background-color: #f0f8ff;
}

.plan-label strong {
    display: block;
    margin-bottom: 5px;
}

.plan-label small {
    color: #666;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.required {
    color: #d63638;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-row textarea {
    resize: vertical;
    min-height: 80px;
}

.monthly-booking-estimate-form .button-secondary {
    background: #f0f0f0;
    color: #333;
    padding: 12px 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 10px;
    transition: background 0.3s ease;
}

.button-secondary:hover {
    background: #e0e0e0;
}

.form-actions {
    text-align: center;
    margin-top: 20px;
    /* もしここに opacity や visibility の指定があれば、それを削除 */
}

.monthly-booking-estimate-form .estimate-button {
    background: #007cba;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;

    /* ★★★ もし、以下の行があれば、削除またはコメントアウトしてください ★★★ */
    /* opacity: 0; */
    /* visibility: hidden; */

    /* ★★★ 逆にもし、display: none; があれば、display: inline-block; などに変更 ★★★ */
}

/* ホバー時のスタイルは、そのまま残してOK */
.estimate-button:hover {
    background: #005a87;
}


.estimate-result {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
}

.estimate-table {
    width: 100%;
    border-collapse: collapse;
}

.estimate-table td {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.estimate-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.total-row td {
    font-size: 18px;
    padding-top: 15px;
    border-top: 2px solid #007cba;
    border-bottom: none;
}

.campaign-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.campaign-details h5 {
    margin-bottom: 10px;
    color: #007cba;
}

.error-message {
    color: #d63638;
    font-weight: 600;
}

.form-help {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.option-item input[type="checkbox"] {
    margin-right: 10px;
}

.option-item.discount-eligible {
    border-color: #007cba;
    background: #f0f8ff;
}

.option-label {
    flex: 1;
}

.option-name {
    font-weight: 600;
    display: block;
}

.option-price {
    color: #007cba;
    font-size: 14px;
}

.options-discount-info {
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    margin-top: 10px;
}

.options-discount-display {
    margin-top: 10px;
    padding: 8px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
}

.options-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.person-fee-row,
.options-row,
.options-discount-row {
    color: #007cba;
}

.options-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.options-details h5 {
    margin-bottom: 10px;
    color: #007cba;
}

.option-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.option-detail-item:last-child {
    border-bottom: none;
}

.auto-plan-info {
    background: #f0f8ff;
    padding: 15px;
    border: 1px solid #007cba;
    border-radius: 6px;
    margin-bottom: 15px;
}

.plan-duration-list {
    margin: 10px 0;
    padding-left: 20px;
}

.plan-duration-list li {
    margin-bottom: 5px;
}

.selected-plan-display {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-weight: 600;
}

.selected-plan-display.valid-plan {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.selected-plan-display.error-plan {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.cost-subitem {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 0.9em;
    color: #666;
    border-bottom: none;
}

.cost-subitem span:first-child {
    padding-left: 10px;
}

.discount-eligible {
    font-size: 0.8em;
    color: #28a745;
    font-weight: bold;
}

.tax-note {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

.booking-action-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #007cba;
    border-radius: 8px;
}

.booking-confirmation {
    text-align: center;
    margin-bottom: 20px;
}

.booking-notice {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 10px;
}

.booking-details {
    color: #666;
    font-size: 0.9em;
}

.booking-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.booking-submit-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.booking-submit-btn:hover:not(:disabled) {
    background: #218838;
}

.booking-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.booking-modify-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.booking-modify-btn:hover:not(:disabled) {
    background: #5a6268;
}

.booking-success {
    text-align: center;
    padding: 30px;
}

.success-header {
    margin-bottom: 30px;
}

.success-header h3 {
    color: #28a745;
    font-size: 2em;
    margin-bottom: 10px;
}

.success-message {
    font-size: 1.2em;
    color: #333;
}

.booking-details-section,
.next-steps-section,
.contact-section {
    margin: 25px 0;
    padding: 20px;
    background: white;
    border-radius: 6px;
    text-align: left;
}

.booking-info p {
    margin: 8px 0;
    font-size: 1.1em;
}

.next-steps-list {
    padding-left: 20px;
}

.next-steps-list li {
    margin: 10px 0;
    line-height: 1.5;
}

.campaign-badge {
    background: #ff6b6b;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 5px;
}

.campaign-badge.early {
    background: #4ecdc4;
}

.campaign-badge.last_minute {
    background: #ff6b6b;
}





.form-preview-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.preview-table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    vertical-align: top;
}

.preview-table td:first-child {
    background: #f8f9fa;
    width: 200px;
}

.preview-actions {
    margin-top: 20px;
    text-align: center;
}

.estimate-details {
    padding: 15px;
}

.estimate-details h4 {
    margin-top: 15px;
    margin-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 5px;
}

.estimate-details h4:first-child {
    margin-top: 0;
}

.estimate-details p {
    margin: 5px 0;
}

.estimate-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.estimate-breakdown-table td {
    padding: 8px 5px;
    border-bottom: 1px dotted #ccc;
}

.estimate-breakdown-table td.amount {
    text-align: right;
    font-weight: bold;
}

.estimate-breakdown-table tr.sub-item td {
    font-size: 0.9em;
    color: #555;
    padding-left: 20px;
}

.subtotal-row,
.campaign-row,
.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 5px;
    font-size: 1.1em;
}

.total-row {
    font-size: 1.4em;
    font-weight: bold;
    border-top: 2px solid #333;
    margin-top: 10px;
    padding-top: 10px;
}

.discount-item {
    color: #d9534f;
}


/* ===============================================================
 * 見積もりフォーム上部 アクションバー
 * =============================================================== */

/* ===============================================================
 * 見積もりフォーム上部 アクションバー (高優先度版)
 * =============================================================== */

/* ラッパーIDを指定して優先度を上げる */
[id^="mrb-estimate-wrapper-"] .estimate-actions-bar {
    max-width: 600px;
    margin: 0 auto 15px;
    display: flex;
    justify-content: flex-end; /* ボタンを右寄せにする */
    align-items: center;      /* ← この一行を追加 */
    gap: 10px; /* ボタン同士の間隔 */
}

/* ラッパーIDを指定 + 高さ・幅を固定してスタイル崩れを完全に防ぐ */
[id^="mrb-estimate-wrapper-"] .estimate-actions-bar .button {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* ボタン内のコンテンツを中央揃え */
    gap: 8px;
    padding: 0 16px; /* 高さを固定するため、上下paddingは0に */
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f6f6f6;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    /* 高さ・幅を固定するためのスタイルを追加 */
    height: 40px;
    min-width: 150px;
    box-sizing: border-box;
    line-height: 1;
}

[id^="mrb-estimate-wrapper-"] .estimate-actions-bar .button:hover {
    background-color: #e9e9e9;
    border-color: #999;
}

[id^="mrb-estimate-wrapper-"] .estimate-actions-bar .button .icon {
    font-size: 1.2em;
    transition: color 0.2s ease-in-out;
}

/* --- お気に入りボタン用のスタイル (高優先度版) --- */

[id^="mrb-estimate-wrapper-"] .estimate-actions-bar .favorite-button .icon {
    color: #b0b0b0; /* 薄いグレー */
}

[id^="mrb-estimate-wrapper-"] .estimate-actions-bar .favorite-button.is-favorite .icon {
    color: #007cba; /* サイトのキーカラー（青） */
}

/* --- お気に入りボタンの強制スタイルリセット (高優先度版) --- */
/* 他のCSSの影響を打ち消し、シェアボタンとデザインを統一します */

[id^="mrb-estimate-wrapper-"] .estimate-actions-bar .favorite-button.favbtn {
    /* シェアボタンと同じスタイルを!importantで強制的に適用 */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-image: none !important;
    background-color: #f6f6f6 !important;
    border: 1px solid #ccc !important;
    color: #333 !important;
    font-weight: bold !important;
    padding: 0 16px !important;
    /* 横幅や影、テキスト装飾などをすべてリセット */
    width: auto !important;
    min-width: 150px !important;
    height: 40px !important;
    box-shadow: none !important;
    text-shadow: none !important;
    outline: none !important;
    /* 他のボタンとの縦位置を揃える */
    vertical-align: middle;

    /* ▼▼▼ 以下の2行を追加 ▼▼▼ */
    align-self: center !important; /* 外部からのalign-selfを上書き */
    margin: 0 !important;          /* 外部からの不要なmarginもリセット */    
}

/* ホバー時のスタイルも強制的に上書き */
[id^="mrb-estimate-wrapper-"] .estimate-actions-bar .favorite-button.favbtn:hover {
    background-color: #e9e9e9 !important;
    border-color: #999 !important;
    color: #333 !important;
}
/* --- ▲▲▲ 強制スタイルリセットここまで ▲▲▲ --- */
/* --- ▲▲▲ お気に入りボタン用のスタイルここまで ▲▲▲ --- */
/* ===============================================================
 * シェアモーダル（ポップアップ）用のCSS【修正版】
 * =============================================================== */

/* モーダルコンテナ全体：画面全体を覆い、最前面に表示 */
#share-modal {
    /* ★★★ 変更点 ★★★ */
    /* display: flex; を削除し、子要素で中央揃えを行う方式に変更 */
    position: fixed; /* 画面に対して固定 */
    top: 0;
    left: 0;
    width: 100vw; /* 画面全体の幅 */
    height: 100vh; /* 画面全体の高さ */
    z-index: 99999; /* サイト内の他のどの要素よりも手前に表示 */
}

/* hidden属性がついている場合は非表示 */
#share-modal[hidden] {
    display: none !important;
}

/* 背景（backdrop）：半透明の暗い背景 */
#share-modal .share-backdrop {
    position: fixed; /* ★★★ 変更点: absoluteからfixedに変更 ★★★ */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

/* ダイアログ本体：モーダルのコンテンツボックス */
#share-modal .share-dialog {
    /* ★★★ 変更点：中央揃えのロジックを transform を使った確実な方法に変更 ★★★ */
    position: fixed; /* 画面に対して固定 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 要素の半分のサイズだけ戻して完全に中央揃え */

    z-index: 100000; /* backdropよりもさらに手前に表示 */
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

/* 閉じるボタン */
#share-modal .share-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    line-height: 1;
}

/* 共有リスト */
#share-modal .share-list {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#share-modal .share-item {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f8f8;
    cursor: pointer;
    width: 100%;
}


/* ===============================================================
 * アコーディオン（オプションセット用）
 * =============================================================== */

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0; /* 上下の余白を少し調整 */
}

.accordion-header h4 {
    margin: 0;
    font-weight: bold;  /* 太字にする (600よりも bold の方が明確です) */
    font-size: 1.2rem;  /* 1.1remだと少し控えめなので、1.2rem推奨 */
    color: #333;        /* 必要であれば色も指定 */
}
.accordion-icon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

/* アコーディオンが開いている時のアイコンのスタイル */
.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg); /* アイコンを180度回転させる */
}

/* アコーディオンのコンテンツ部分 */
.accordion-content {
    /* 開閉時のアニメーション */
    overflow: hidden;
    transition: max-height 0.4s ease-out, visibility 0.4s ease-out;
    max-height: 0; /* 初期状態では高さを0にして隠す */
    visibility: hidden;
}

.accordion-content[hidden] {
    display: none; /* JSが動かない環境用のフォールバック */
}


/* ===============================================================
 * フォームの横並びレイアウト
 * =============================================================== */

/* 横並びにするための親コンテナ */
.form-row-group {
    display: flex; /* ★ display: grid から flex に変更 */
    gap: 20px; /* Flexboxのgapで要素間の隙間を指定 */
}

/* 横並びグループ内の各要素は、均等に幅を分ける */
.form-row-group .form-row {
    flex: 1; /* ★ この行を追加 */
}

/* 画面が狭い場合（スマートフォンなど）は、縦並びに戻す */
@media (max-width: 600px) {
    .form-row-group {
        grid-template-columns: 1fr; /* カラムを1つにして縦並びにする */
        gap: 15px; /* 縦の隙間を少し狭める */
    }
}

.fixed-room-header h4 {
    font-size: 1.2rem;   /* 文字の大きさを1.2remに設定 */
    font-weight: bold;   /* 文字を太字に設定 */
    text-align: center; /* 中央揃えにすると、より見出しらしくなります（任意） */
    margin-bottom: 0;    /* h4タグが持つデフォルトの下余白をリセット */
}

/* キャンペーン内訳のスタイル */
.campaign-sub-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em; /* 文字を少し小さく */
    padding-left: 10px; /* インデント */
    margin-bottom: 4px;
    color: #d9534f; /* 赤文字（discount-itemと同じ色） */
}


/* キャンペーン説明文ボックス */
.campaign-description-box {
    background-color: #fff3cd; /* 薄い黄色 */
    border: 1px solid #ffeeba; /* 枠線 */
    color: #856404; /* 文字色 */
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 0.9em;
    line-height: 1.5;
}

.campaign-description-box strong {
    display: block;
    margin-bottom: 5px;
    color: #d9534f; /* 赤っぽい色で強調 */
}

.campaign-description-box .campaign-text {
    white-space: pre-wrap; /* 改行を維持しつつ、必要なら折り返す */
}

/* ===============================================================
 * 上部キャンペーンバナー（常時表示用）
 * =============================================================== */
.top-campaign-banner {
    background-color: #fff5f5; /* 薄い赤背景 */
    border: 2px solid #e02424; /* 赤い枠線 */
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    animation: fadeIn 0.5s ease-in-out;
}

.top-campaign-banner .banner-title {
    color: #e02424;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.top-campaign-banner .banner-desc {
    color: #333;
    font-size: 0.95em;
    line-height: 1.6;
    white-space: pre-wrap; /* 改行を反映 */
    font-weight: bold; /* 本文も太字にして目立たせる */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}