/* ==========================================================================
   5. モーダル（プラン項目詳細）
   ========================================================================== */
.detail-trigger {
    display: block;
    font-size: 10px;
    color: var(--horizon-cta);
    margin-top: 5px;
    text-decoration: underline;
}

/* 5.1 モーダル内コンテンツ（プラン詳細 .map-modal 専用） */
.map-modal .modal-body.text-left {
    text-align: left;
    line-height: 1.8;
    color: var(--sys-text-secondary);
    font-size: 15px;
    padding: 10px 0;
}

body.modal-open {
    overflow: hidden;
}

/* 5.2 モーダル内画像・ギャラリー（.map-modal 内のみ） */
.map-modal .modal-img-box {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.map-modal .modal-img-box img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.map-modal .modal-gallery {
    margin-bottom: 20px;
}
.map-modal .modal-gallery .modal-gallery-inner {
    overflow: hidden;
}
.map-modal .modal-gallery .modal-gallery-track {
    display: flex;
}
.map-modal .modal-gallery .modal-img-box {
    flex: 0 0 100%;
    min-width: 0;
    margin-bottom: 0;
}
.map-modal .modal-gallery .modal-img-box img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    border-radius: 8px;
}

/* 5.3 カルーセル（複数枚時） */
.map-modal .modal-gallery-carousel {
    position: relative;
    padding: 0 40px;
}
.map-modal .modal-gallery-carousel .modal-gallery-inner {
    overflow: hidden;
    border-radius: 8px;
}
.map-modal .modal-gallery-carousel .modal-gallery-track {
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
}
.map-modal .modal-gallery-carousel .modal-img-box {
    flex: 0 0 100%;
    min-width: 0;
    padding: 0 2px;
}
.map-modal .modal-gallery-carousel .modal-img-box img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    display: block;
}
.map-modal .modal-gallery-prev,
.map-modal .modal-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 1px solid var(--depth-700);
    border-radius: 50%;
    background: #fff;
    color: var(--depth-700);
    font-size: 22px;
    line-height: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* ‹ › のグリフがキャップ高より下に見えるのを、内側の配置で補正 */
    padding: 0 0 3px;
    box-sizing: border-box;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    z-index: 2;
}
.map-modal .modal-gallery-prev:hover,
.map-modal .modal-gallery-next:hover {
    background: var(--depth-700);
    color: #fff;
    border-color: var(--depth-700);
}
.map-modal .modal-gallery-prev {
    left: 0;
}
.map-modal .modal-gallery-next {
    right: 0;
}
.map-modal .modal-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.map-modal .modal-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: var(--mist-600);
    cursor: pointer;
    transition: background 0.2s;
}
.map-modal .modal-gallery-dot:hover {
    background: var(--mist-900);
}
.map-modal .modal-gallery-dot.active {
    background: var(--depth-700);
}

/* 5.4 画像キャプション */
.map-modal .modal-img-caption {
    margin-top: 8px;
    padding: 0 4px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--sys-text-secondary);
}
.map-modal .modal-img-title {
    font-weight: bold;
    color: var(--depth-700);
}
.map-modal .modal-img-caption-text {
    color: var(--sys-text-secondary);
}

/* 5.5 オーバーレイ・ウィンドウ・閉じる */
.map-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: var(--overlay-dark) !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}
.map-modal.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.map-modal.active .modal-content {
    transform: translateY(0);
}

/* 閉じるボタン・タイトル（.map-modal 専用＝08の .ks-modal と重ならない） */
.map-modal .modal-content {
    background: var(--mist-50) !important;
    width: 90% !important;
    max-width: 500px !important;
    padding: 30px !important;
    border-radius: 15px !important;
    border-top: 3px solid var(--sacred-gold) !important;
    position: relative !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.map-modal .modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 15px !important;
    font-size: 32px !important;
    line-height: 1 !important;
    border: none !important;
    background: none !important;
    cursor: pointer !important;
    color: var(--sys-text-tertiary) !important;
    z-index: 10;
}
.map-modal .modal-title {
    font-size: 1.2rem !important;
    font-weight: bold !important;
    color: var(--depth-700) !important;
    margin-bottom: 20px !important;
    border-bottom: 2px solid var(--horizon-light) !important;
    padding-bottom: 10px !important;
    text-align: center;
}

/* --- プランに含まれる内容：ⓘマーク（レイアウトは 03-plan-detail のチップ内 flex で右寄せ） --- */
.plan-contents-grid .info-icon-mark {
    color: var(--horizon-cta);
    opacity: 0.6;
    transition: opacity 0.2s, color 0.2s;
}

.plan-contents-grid .content-item-box.has-modal-trigger:hover .info-icon-mark {
    opacity: 1;
    color: var(--depth-700);
}

.plan-contents-grid .info-icon-mark .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}
