/**
 * Image Modal Window Styles
 */

/* モーダルオーバーレイ */
.map-image-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.map-image-modal-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

/* モーダルコンテンツ */
.map-image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 画像 */
.map-image-modal-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 閉じるボタン */
.map-image-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.map-image-modal-close:hover {
    background-color: rgba(255, 255, 255, 1);
}

.map-image-modal-close:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.map-image-modal-close span {
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #333;
}

.map-image-modal-close span:first-child {
    transform: rotate(45deg);
}

.map-image-modal-close span:last-child {
    transform: rotate(-45deg);
}

/* ナビゲーションボタン */
.map-image-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
    width: auto;
    height: auto;
}

.map-image-modal-nav:hover {
    transform: translateY(-50%) scale(1.15);
}



.map-image-modal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.map-image-modal-prev {
    left: 15px;
}

.map-image-modal-next {
    right: 15px;
}

/* Chevronアイコン */
.map-image-modal-nav .arrow {
    display: inline-block;
    position: relative;
    width: 16px;
    height: 16px;
    border-top: 3px solid #fff;
    border-right: 3px solid #fff;
    font-size: 0;
}

.map-image-modal-prev .arrow {
    transform: rotate(-135deg);
}

.map-image-modal-next .arrow {
    transform: rotate(45deg);
}

/* タッチデバイス対応 */
@media (hover: none) and (pointer: coarse) {
    .map-image-modal-nav {
        width: auto;
        height: auto;
    }

    .map-image-modal-nav .arrow {
        width: 20px;
        height: 20px;
        border-top: 4px solid #fff;
        border-right: 4px solid #fff;
    }

}

/* 小画面対応 */
@media (max-width: 768px) {
    .map-image-modal-content {
        max-width: 95vw;
        max-height: 85vh;
    }

    .map-image-modal-nav .arrow {
        width: 14px;
        height: 14px;
        border-top: 2.5px solid #fff;
        border-right: 2.5px solid #fff;
    }


    .map-image-modal-close span {
        width: 18px;
        height: 2px;
    }

    .map-image-modal-prev {
        left: 10px;
    }

    .map-image-modal-next {
        right: 10px;
    }
}

/* 超小画面対応 */
@media (max-width: 480px) {
    .map-image-modal-content {
        border-radius: 0;
    }

    .map-image-modal-nav .arrow {
        width: 12px;
        height: 12px;
        border-top: 2px solid #fff;
        border-right: 2px solid #fff;
    }

    .map-image-modal-close {
        width: 32px;
        height: 32px;
        top: -40px;
        right:0;
    }

    .map-image-modal-close span {
        width: 16px;
        height: 2px;
    }

    .map-image-modal-prev {
        left: 5px;
    }

    .map-image-modal-next {
        right: 5px;
    }
}
