/* =========================
   バス停写真モーダル
========================= */

.bus-photo-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000000;
}

.bus-photo-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.bus-photo-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.bus-photo-modal__dialog {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 100%;
}

.bus-photo-modal__image {
    display: block;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    width: auto;
    height: auto;
    object-fit: contain;
    background: #fff;
}

.bus-photo-modal__close {
    position: absolute;
    top: -16px;
    right: -16px;
    z-index: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #784315;
    color: #fff;
    font-size: 32px;
    line-height: 36px;
    font-family: Arial, sans-serif;
    text-align: center;
    cursor: pointer;
}

.bus-photo-modal__close:hover,
.bus-photo-modal__close:focus {
    opacity: 0.85;
}

body.bus-photo-modal-open {
    overflow: hidden;
}

@media screen and (max-width: 768px) {
    .bus-photo-modal.is-open {
        padding: 12px;
    }

    .bus-photo-modal__image {
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

    .bus-photo-modal__close {
        top: -10px;
        right: -10px;
    }
}
