body {
    margin: 0;
    padding: 0;
    overflow-x: clip;
}

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.ismmap-wrapper {
    position: relative;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.5;
    overflow: hidden;
}
.ismmap-wrapper h2 { font-size:23px; }
.ismmap-wrapper h3 { font-size:18px; }

/* Ensure the hidden attribute works even if the theme overrides it */
.ismmap-wrapper [hidden] {
    display: none !important;
}

/* ── Map ──────────────────────────────────────────────────────────────────── */
.ismmap-map {
    width: 100%;
    background-color: #f7f7f7;
    display: block;
    touch-action: none;
}

.ismmap-map .leaflet-tile-pane {
    display: none;
}

/* ── Marker types ────────────────────────────────────────────────────────── */
.ismmap-marker {
    background: none;
    border: none;
    cursor: pointer;
}

/* Landmark: invisible hit area */
.ismmap-marker--landmark {
    background: none !important;
    border: none !important;
}

.ismmap-landmark-hit {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

/* Information: poi2.svg */
.ismmap-marker--information {
    background: none !important;
    border: none !important;
}

.ismmap-marker--information img {
    display: block;
}

/* ── Filter bar (top) ────────────────────────────────────────────────────── */
.ismmap-filter-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 10px solid #fff;
    padding: 0;
}

.ismmap-filter-boxes {
    display: flex;
    gap: 10px;
    width: 100%;
}

.ismmap-filter-box {
    flex: 1;
    border: none;
    border-radius: 0;
    padding: 0;
    height: 108px;
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    color: #000 !important;
    transition: opacity 0.15s, box-shadow 0.15s;
    box-shadow: none;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
@media (max-width: 1280px) {
    .ismmap-filter-box {
        font-size:17px;
    }
}

.ismmap-filter-box:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    outline: 3px solid rgba(0,0,0,.25);
    outline-offset: -3px;
    transform: scale(1.03);
    transition: opacity 0.15s, box-shadow 0.15s, transform 0.15s;
}

.ismmap-filter-box--active {
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    outline: 3px solid rgba(0,0,0,.25);
    outline-offset: -3px;
}

/* ── Mobile filter trigger ───────────────────────────────────────────────── */
.ismmap-filter-mobile {
    display: none;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1000;
}

.ismmap-filter-mobile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #333;
}

.ismmap-filter-mobile-btn svg {
    width: 20px;
    height: 20px;
}

.ismmap-filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    overflow: hidden;
    min-width: 220px;
}

.ismmap-filter-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    color: #333;
    border-bottom: 1px solid #eee;
}

.ismmap-filter-dropdown-item:last-child {
    border-bottom: none;
}

.ismmap-filter-dropdown-item:hover {
    background: #f5f5f5;
}

.ismmap-filter-dropdown-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Filter popup (upper left) ───────────────────────────────────────────── */
.ismmap-filter-popup {
    position: absolute;
    top: 130px;
    left: 16px;
    z-index: 1050;
    max-width: 320px;
    border-radius: 0px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    transition: opacity 0.3s;
}

.ismmap-filter-popup-inner {
    display: flex;
    flex-direction: column;
    position: relative;
}

.ismmap-filter-popup-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    padding-right: 28px;
}

.ismmap-filter-popup-close {
    position: absolute;
    top: -4px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,.2);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: inherit;
    transition: background 0.2s;
}

.ismmap-filter-popup-close:hover {
    background: rgba(0,0,0,.35);
}

/* ── Info panel ───────────────────────────────────────────────────────────── */
.ismmap-info-panel,
.ismmap-info-panel h1,
.ismmap-info-panel h2,
.ismmap-info-panel h3,
.ismmap-info-panel p,
.ismmap-info-panel a,
.ismmap-info-panel button,
.ismmap-info-panel span,
.ismmap-info-panel li,
.ismmap-info-panel input {
    font-family: 'Open Sans', sans-serif;
}

.ismmap-info-panel {
    position: absolute;
    top: 118px;
    right: -380px;
    bottom: 0;
    width: 360px;
    background: #fff;
    box-shadow: -3px 0 16px rgba(0,0,0,.15);
    z-index: 1060;
    display: flex;
    flex-direction: column;
    transition: right 0.35s ease;
    overflow: hidden;
}

.ismmap-info-panel--open {
    right: 0;
}

.ismmap-panel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #000;
    border: none;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.ismmap-panel-scroll {
    overflow-y: auto;
    flex: 1;
    padding: 0 20px 80px;
}

.ismmap-panel-thumbnail {
    margin: 0 -20px 16px;
    height: 180px;
    overflow: hidden;
}

.ismmap-panel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ismmap-panel-meta {
    margin-bottom: 4px;
}

.ismmap-panel-location-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ismmap-panel-location-type {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    color: #000;
}

.ismmap-panel-title {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.3;
}

.ismmap-panel-description {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

.ismmap-panel-description p {
    margin: 0 0 10px;
}

.ismmap-panel-description h1,
.ismmap-panel-description h2,
.ismmap-panel-description h3,
.ismmap-panel-description h4,
.ismmap-panel-description h5 {
    margin-top: 8px;
}

.ismmap-panel-buttonlink {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 20px;
    background: #009fda;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.ismmap-panel-buttonlink:hover {
    opacity: 0.85;
}

/* ── Button bar ───────────────────────────────────────────────────────────── */
.ismmap-button-bar {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.ismmap-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #009fda;
    background: #fff;
    color: #009fda;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    padding: 0;
}

.ismmap-icon-btn:hover {
    background: currentColor;
}

.ismmap-icon-btn:hover svg {
    stroke: #fff;
}

.ismmap-icon-btn svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

/* ── Video modal ──────────────────────────────────────────────────────────── */
.ismmap-video-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.ismmap-video-modal--open {
    opacity: 1;
    pointer-events: all;
}

.ismmap-video-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.8);
}

.ismmap-video-inner {
    position: relative;
    width: min(900px, 95vw);
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    z-index: 1;
}

.ismmap-video-close {
    position: absolute;
    top: -36px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
}

#ismmap-video-player,
#ismmap-video-player > *,
#ismmap-video-player iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
    display: block;
}

/* ── Marker bounce animation ──────────────────────────────────────────────── */
@keyframes ismmap-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

.ismmap-marker--active {
    z-index: 9999 !important;
}

.ismmap-marker--active svg {
    animation: ismmap-bounce 0.7s ease-in-out infinite;
}

.ismmap-marker--active svg path {
    fill: #009fda;
}

/* Hover bounce — same animation as active */
.ismmap-marker:hover svg {
    animation: ismmap-bounce 0.7s ease-in-out infinite;
}

.ismmap-marker:hover img {
    animation: ismmap-bounce 0.7s ease-in-out infinite;
}

/* ── Intro overlay ────────────────────────────────────────────────────────── */
.ismmap-intro-overlay {
    position: absolute;
    inset: 0;
    z-index: 1200;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.ismmap-intro-overlay--hidden {
    opacity: 0;
}

.ismmap-intro-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.ismmap-intro-hand svg {
    width: 56px;
    height: 56px;
    animation: ismmap-hand-wobble 0.55s ease-in-out 4;
}

.ismmap-intro-hand svg path {
    fill: none;
    stroke: #000;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes ismmap-hand-wobble {
    0%   { transform: rotate(0deg); }
    25%  { transform: rotate(10deg); }
    75%  { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

.ismmap-intro-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin: 0;
    text-shadow: 0 1px 3px rgba(255,255,255,0.8);
}

/* ── Responsive — breakpoint 990px ───────────────────────────────────────── */
@media (max-width: 990px) {
    /* Hide desktop filter bar, show mobile trigger */
    .ismmap-filter-bar {
        display: none;
    }

    .ismmap-filter-mobile {
        display: block;
    }

    .ismmap-filter-popup {
        max-width: calc(100% - 32px);
        top: 60px;
        left: 10px;
    }
}

/* ── Responsive — breakpoint 575px ───────────────────────────────────────── */
@media (max-width: 574px) {
    .ismmap-info-panel {
        top: auto;
        bottom: -100%;
        right: 0;
        left: 0;
        width: 100%;
        max-height: 65vh;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,.15);
        transition: bottom 0.35s ease;
    }

    .ismmap-info-panel--open {
        bottom: 0;
        right: 0;
    }
}
