/* アコーディオン開閉ボタン */
.accordion-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #002B62; /* 濃い紺色 (画像のイメージ) */
    font-weight: bold;
    font-size: 0.95rem;
    padding: 15px 0;
    border-bottom: 1px dotted #ccc; /* 下点線 */
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.2s;
}

.accordion-trigger:hover {
    opacity: 0.8;
}

/* アイコンのスタイル */
.trigger-icon {
    font-size: 1.2rem;
    font-weight: normal;
    line-height: 1;
    transition: transform 0.3s ease;
}

/* 開いている状態のスタイル（＋を×に回転させるなど） */
.accordion-trigger.is-open .trigger-icon {
    transform: rotate(45deg); /* 45度回転して×っぽく見せる */
}

/* textareaの確認画面(divタグ)のデザイン */
.display-textarea {
    /* --- .textarea-fieldの基本デザイン --- */
    width: 100%;
    padding: 15px;
    border: 1px solid #8C8C8C;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Noto Sans JP', sans-serif;
    box-sizing: border-box;

    /* --- readonlyデザイン --- */
    background-color: #f0f0f0;
    
    /* --- 追加デザイン --- */
    min-height: 110px; /* rows="3"相当の高さ */
    line-height: 1.6;
    word-break: break-word; /* 折り返し */
}

/* カレンダーを表示するエリアの修正 */
#timerex_widget_container {
    width: 100%;
    height: auto;
    min-height: 500px;
    overflow: visible; /* 親で隠さない */
}

/* 【重要】iframe自体の高さ固定を解除 */
#timerex_widget_container iframe {
    /* height: auto !important; ← これを削除 */
    min-height: 600px; 
    width: 100% !important;
    border: none !important;
    /* TimeRexのスクリプトが計算したheight属性を活かすため、heightは指定しない */
}

/* PC版での横幅拡張の調整 */
@media screen and (min-width: 768px) {
    #timerex_widget_container {
        width: 710px;
        max-width: calc(100vw - 40px);
        margin-left: 50%;
        transform: translateX(-50%);
        position: relative;
        background-color: #fff;
        border-radius: 8px;
        /* z-indexやpointer-eventsの干渉を防ぐ */
        pointer-events: auto;
    }
}

/* スマホ版：スクロールを円滑にする */
@media screen and (max-width: 768px) {
    #timerex_widget_container {
        -webkit-overflow-scrolling: touch; /* iOSでのスクロールを滑らかにする */
        min-height: 800px;
    }
}

/* --- 電話番号 (freeCall) --- */
.mapCol .freeCall {
    color: #0e0166;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    padding-left: 35px;
    background: url('../img/tel_icon.png') no-repeat;
    background-position: left center;
    background-size: 25px auto;
    pointer-events: none; /* 基本はクリック不可 */
}

/* --- ポップアップ共通デザイン --- */
.map-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); /* キャプチャに近い暗さ */
    z-index: 9998;
}

.mapArea {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    box-sizing: border-box;
}

/* モーダル本体 (Frame 2723基準) */
.mapCol {
    display: flex;
    flex-direction: column;
    align-items: center; /* タイトルと閉じるリンクを中央寄せに */
    padding: 20px 15px;
    gap: 15px;
    isolation: isolate;
    width: 315px; /* SP版サイズ */
    min-height: 150px;
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.mapTitle {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
    text-align: center;
    line-height: 1.4;
}

.mapBody {
    width: 100%;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
    text-align: left; /* 本文は左寄せ */
}

.mapBody p { margin-bottom: 8px; }

/* 閉じるリンク */
.close-link {
    text-decoration: underline;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: auto;
}

/* PC版サイズ調整 */
@media screen and (min-width: 768px) {
    .mapCol {
        width: 450px; /* PC版サイズ */
        min-height: 240px;
        padding: 30px;
    }
    .mapCol .freeCall {
        padding-left: 30px;
        background-size: 23px auto;
        pointer-events: auto; /* PCはクリック可 */
    }
}

/* 住所はこちらトリガー */
.address-trigger {
    font-size: 0.85rem;
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 10px;
}