/* =========================================================
   modal.css — Version 1.7.3
   ========================================================= */

.wl-modal {
    --wl-border: #0b5cff;
    /* ตัวแปรนี้ยังเก็บไว้เผื่อใช้กับจุดอื่น แต่ขอบ modal ไม่ใช้แล้ว */
}

.wl-modal .modal-dialog {
    max-width: 980px;
    width: min(980px, calc(100vw - 40px));
}

.wl-modal .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;

    /* [REMOVED] เอาขอบสีออก */
    border: 0;

    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 20px 80px rgba(0, 0, 0, .35);
    max-height: calc(100vh - 90px);
}

.wl-modal-x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 0;
    background: rgba(0, 0, 0, .06);
    display: grid;
    place-items: center;
    z-index: 5;
    cursor: pointer;
}

.wl-modal-x:hover {
    background: rgba(0, 0, 0, .10);
}

.wl-modal-x i {
    font-size: 14px;
    color: rgba(0, 0, 0, .65);
}

.wl-modal-scroll {
    flex: 1 1 auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.wl-modal-body {
    padding: 24px;
    color: #111;
}

.wl-modal-header-group {
    border-left: 5px solid var(--wl-border);
    padding-left: 16px;
    margin-bottom: 0px;
}

.wl-modal-cat {
    font-size: 12px;
    font-weight: 650;
    color: rgba(0, 0, 0, .45);
    margin-bottom: 8px;
}

.wl-modal-title {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 12px;
    padding-right: 54px;
    color: #111;
}

.wl-modal-tagline {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
    color: rgba(0, 0, 0, .82);
}

.wl-modal-desc {
    font-size: 14px;
    line-height: 1.65;
    margin: 0 0 16px;
    color: rgba(0, 0, 0, .72);
}

.wl-modal-section {
    margin-top: 18px;
}

.wl-modal-h {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
    color: rgba(0, 0, 0, .88);
}

.wl-modal-gallery {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Gallery Images: จัตุรัส 100x100 */
.wl-modal-gallery img {
    width: 100px;
    height: 100px;
    min-width: 100px;
    min-height: 100px;
    object-fit: cover !important;
    border-radius: 12px;
    border: 0;
    padding: 0;
    display: block;
    background: #f2f2f2;
    cursor: zoom-in;
    transition: transform 180ms ease, filter 180ms ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.wl-modal-gallery img:hover {
    transform: scale(1.05);
    filter: brightness(.95);
    z-index: 1;
}

.wl-modal-address {
    font-size: 14px;
    color: rgba(0, 0, 0, .72);
    margin: 0 0 12px;
}

/* Map: สูง 270px */
.wl-modal-map {
    width: 100%;
    height: 270px !important;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .08);
    background: #f5f5f5;
    margin-bottom: 12px;
    position: relative;
}

.wl-modal-map iframe,
.wl-modal-map img {
    width: 100%;
    height: 100%;
    border: 0;
    display: none;
}

.wl-modal-map iframe[style*="display: block"],
.wl-modal-map img[style*="display: block"] {
    display: block !important;
}

.wl-modal-map img {
    object-fit: cover;
}

.wl-modal-kv {
    font-size: 14px;
    color: rgba(0, 0, 0, .78);
    display: grid;
    gap: 8px;
}

.wl-modal-kv a {
    color: rgba(0, 0, 0, .72);
    text-decoration: underline;
    word-break: break-word;
}

.wl-modal-kv a:hover {
    color: rgba(0, 0, 0, .95);
}

.wl-modal-footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    padding: 14px 24px;
    border-top: 1px solid rgba(0, 0, 0, .08);
    background: #fff;
}

.wl-modal-closebtn {
    border-radius: 10px;
    padding: 8px 18px;
}

body:not(.modal-open) .modal-backdrop {
    display: none !important;
}

/* --- LIGHTBOX --- */
.wl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.wl-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.wl-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.wl-lightbox-panel {
    position: relative;
    width: min(1100px, 92vw);
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 22px 90px rgba(0, 0, 0, .55);
    transform: translate3d(0, 8px, 0) scale(.98);
    transition: transform 240ms cubic-bezier(.2, .8, .2, 1);
    z-index: 1;
}

.wl-lightbox.is-open .wl-lightbox-panel {
    transform: translate3d(0, 0, 0) scale(1);
}

.wl-lightbox-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wl-lightbox-x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, .14);
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 2;
}

.wl-lightbox-x:hover {
    background: rgba(255, 255, 255, .20);
}

.wl-lightbox-x i {
    font-size: 14px;
    color: rgba(255, 255, 255, .92);
}

@media (max-width: 768px) {
    .wl-modal-body {
        padding: 18px;
    }

    .wl-modal-title {
        font-size: 20px;
        padding-right: 54px;
    }

    .wl-modal-map {
        height: 220px;
    }

    .wl-modal-kv,
    .wl-modal-address,
    .wl-modal-desc,
    .wl-modal-tagline {
        font-size: 13.5px;
    }

    .wl-modal-h {
        font-size: 16px;
    }

    .wl-modal-footer {
        padding: 12px 18px;
    }

    .wl-lightbox-panel {
        width: min(980px, 94vw);
    }

    .wl-modal .modal-content {
        max-height: calc(100vh - 140px);
    }
}