.wmp-map-shell {
    --wmp-map-height: 700px;
    --wmp-map-width: 100%;
    --wmp-country-fill: #dfe7f2;
    --wmp-country-hover-fill: #3b82f6;
    --wmp-country-selected-fill: #1d4ed8;
    --wmp-country-border-color: #fff;
    --wmp-country-border-width: 0.6;
    --wmp-country-border-opacity: 1;
    --wmp-map-bg: #f8fafc;
    --wmp-marker-shadow: 0 7px 10px rgba(15, 23, 42, 0.28);
    --wmp-marker-glow: 0 0 0 rgba(245, 158, 11, 0);
    --wmp-marker-opacity: 1;
    --wmp-marker-scale: 1;
    --wmp-marker-hover-scale: 1.12;
    --wmp-tooltip-bg: rgba(15, 23, 42, 0.94);
    --wmp-tooltip-text: #ffffff;
    --wmp-tooltip-font-size: 12px;
    --wmp-tooltip-font-family: inherit;
    --wmp-tooltip-font-weight: 800;
    --wmp-tooltip-padding: 8px 11px;
    --wmp-tooltip-radius: 8px;
    --wmp-tooltip-shadow: 0 14px 32px rgba(15, 23, 42, 0.26);
    --wmp-popup-width: 360px;
    --wmp-popup-radius: 8px;
    --wmp-popup-bg: #fff;
    --wmp-popup-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
    --wmp-popup-padding: 16px;
    --wmp-popup-text: #344054;
    --wmp-popup-title: #111827;
    --wmp-button-bg: #1d4ed8;
    --wmp-button-hover-bg: #1e40af;
    --wmp-button-text: #fff;
    --wmp-button-radius: 7px;
    --wmp-button-border-color: #1d4ed8;
    --wmp-button-padding: 8px 10px;
    --wmp-font-family: inherit;
    --wmp-font-size: 14px;
    --wmp-font-weight: 400;
    --wmp-line-height: 1.55;
    --wmp-letter-spacing: 0;
    position: relative;
    width: 100%;
    max-width: var(--wmp-map-width);
    overflow: hidden;
    font-family: var(--wmp-font-family);
    font-size: var(--wmp-font-size);
    font-weight: var(--wmp-font-weight);
    line-height: var(--wmp-line-height);
    letter-spacing: var(--wmp-letter-spacing);
}

.wmp-map-canvas {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--wmp-map-height);
    min-height: 500px;
    overflow: hidden;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    background: var(--wmp-map-bg);
}

.wmp-theme-dark .wmp-map-canvas {
    border-color: #334155;
    background: #0f172a;
}

.wmp-theme-dark .wmp-country {
    fill: #334155;
    stroke: #0f172a;
}

.wmp-theme-dark .wmp-country:hover,
.wmp-theme-dark .wmp-country:focus,
.wmp-theme-dark .wmp-country.is-active {
    fill: #f59e0b;
}

.wmp-theme-dark .wmp-frontend-search-input,
.wmp-theme-dark .wmp-frontend-filter,
.wmp-theme-dark .wmp-frontend-results,
.wmp-theme-dark .wmp-country-tooltip,
.wmp-theme-dark .wmp-tooltip,
.wmp-theme-dark .wmp-popup,
.wmp-theme-dark .wmp-map-control {
    border-color: rgba(71, 85, 105, 0.85);
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
}

.wmp-theme-dark .wmp-popup h3,
.wmp-theme-dark .wmp-tooltip-body strong {
    color: #f8fafc;
}

.wmp-theme-dark .wmp-tooltip-body span,
.wmp-theme-dark .wmp-tooltip-body p {
    color: #cbd5e1;
}

.wmp-map-canvas svg,
.wmp-svg {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

.wmp-map-canvas svg:active {
    cursor: grabbing;
}

.wmp-map-shell.is-placing-marker .wmp-svg {
    cursor: crosshair;
}

.wmp-map-loading {
    color: #667085;
    font-weight: 600;
}

.wmp-country {
    fill: var(--wmp-country-fill);
    stroke: var(--wmp-country-border-color);
    stroke-opacity: var(--wmp-country-border-opacity);
    stroke-width: var(--wmp-country-border-width);
    cursor: pointer;
    outline: none;
    transition: all 0.25s ease;
    vector-effect: non-scaling-stroke;
}

.wmp-country:hover,
.wmp-country:focus,
.wmp-country.is-active {
    fill: var(--wmp-country-hover-fill);
}

.wmp-country.is-active {
    fill: var(--wmp-country-selected-fill);
}

.wmp-marker {
    cursor: pointer;
    outline: none;
}

.wmp-marker-draft {
    cursor: default;
}

.wmp-marker-icon {
    filter: drop-shadow(var(--wmp-marker-shadow)) drop-shadow(var(--wmp-marker-glow));
    opacity: var(--wmp-marker-opacity);
    transform: scale(var(--wmp-marker-scale));
    transition: transform 0.16s ease, filter 0.16s ease;
}

.wmp-marker:hover .wmp-marker-icon,
.wmp-marker:focus .wmp-marker-icon {
    transform: scale(var(--wmp-marker-hover-scale));
    filter: drop-shadow(0 10px 14px rgba(15, 23, 42, 0.34));
}

.wmp-map-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wmp-map-control {
    min-width: 40px;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    font-weight: 700;
    cursor: pointer;
}

.wmp-map-control:hover,
.wmp-map-control:focus {
    border-color: #94a3b8;
    background: #f8fafc;
}

.wmp-map-control.is-active {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #ffffff;
}

.wmp-frontend-map .wmp-map-toolbar {
    margin-left: auto;
    padding: 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.wmp-frontend-controls {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: calc(100% - 24px);
    pointer-events: none;
}

.wmp-frontend-controls > * {
    pointer-events: auto;
}

.wmp-frontend-search {
    position: relative;
    width: min(360px, 34vw);
    flex: 1 1 320px;
    min-width: 260px;
}

.wmp-frontend-search-input,
.wmp-frontend-filter {
    min-height: 44px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 8px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.wmp-frontend-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
}

.wmp-frontend-search-input {
    width: 100%;
}

.wmp-frontend-filter {
    width: clamp(118px, 11vw, 154px);
    min-width: 0;
}

.wmp-frontend-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: none;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
}

.wmp-frontend-results.is-open {
    display: block;
}

.wmp-frontend-results button {
    display: block;
    width: 100%;
    border: 0;
    padding: 10px 12px;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.wmp-frontend-results button:hover {
    background: #eef4ff;
}

.wmp-frontend-results strong,
.wmp-frontend-results span {
    display: block;
}

.wmp-frontend-results span {
    color: #667085;
    font-size: 12px;
}

.wmp-popup {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 5;
    width: min(450px, var(--wmp-popup-width), calc(100% - 28px));
    max-height: calc(100% - 40px);
    overflow: hidden;
    border-radius: var(--wmp-popup-radius);
    background: var(--wmp-popup-bg);
    box-shadow: var(--wmp-popup-shadow);
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.wmp-tooltip {
    position: absolute;
    z-index: 6;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    width: min(340px, calc(100% - 24px));
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    background: var(--wmp-popup-bg);
    box-shadow: var(--wmp-popup-shadow);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    backdrop-filter: blur(14px);
}

.wmp-tooltip.is-open {
    opacity: 1;
    transform: translateY(0);
}

.wmp-country-tooltip {
    position: absolute;
    z-index: 7;
    width: max-content;
    max-width: calc(100% - 16px);
    overflow: hidden;
    padding: var(--wmp-tooltip-padding);
    border-radius: var(--wmp-tooltip-radius);
    background: var(--wmp-tooltip-bg);
    box-shadow: var(--wmp-tooltip-shadow);
    color: var(--wmp-tooltip-text);
    font-family: var(--wmp-tooltip-font-family);
    font-size: var(--wmp-tooltip-font-size);
    font-weight: var(--wmp-tooltip-font-weight);
    line-height: 1.25;
    opacity: 0;
    pointer-events: none;
    text-overflow: ellipsis;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    white-space: nowrap;
}

.wmp-country-tooltip::after {
    position: absolute;
    bottom: -5px;
    left: 14px;
    width: 10px;
    height: 10px;
    background: var(--wmp-tooltip-bg);
    content: "";
    transform: rotate(45deg);
}

.wmp-country-tooltip.is-open {
    opacity: 1;
    transform: translateY(0);
}

.wmp-tooltip-image {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border-radius: 9px;
}

.wmp-tooltip-body {
    min-width: 0;
}

.wmp-tooltip-body strong,
.wmp-tooltip-body span,
.wmp-tooltip-body em {
    display: block;
}

.wmp-tooltip-body strong {
    color: #111827;
    font-size: 15px;
}

.wmp-tooltip-body span {
    margin-top: 3px;
    color: #475467;
    font-size: 12px;
    font-style: normal;
}

.wmp-tooltip-body em {
    margin-top: 6px;
    color: #1d4ed8;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.wmp-tooltip-body p {
    margin: 6px 0 0;
    color: #344054;
    font-size: 12px;
    line-height: 1.35;
}

.wmp-popup.is-open {
    opacity: 1;
    transform: translate(-50%, 0);
}

.wmp-popup-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 190px;
    object-fit: cover;
}

.wmp-popup-gallery {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px;
    background: #f8fafc;
}

.wmp-popup-gallery img {
    width: 72px;
    height: 54px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 6px;
}

.wmp-popup-body {
    padding: var(--wmp-popup-padding);
    overflow: auto;
    max-height: calc(100vh - 280px);
}

.wmp-popup h3 {
    margin: 0 36px 6px 0;
    color: var(--wmp-popup-title);
    font-size: 18px;
    line-height: 1.25;
}

.wmp-popup-subtitle {
    margin: -2px 0 8px;
    color: #475467;
}

.wmp-popup-meta {
    margin-bottom: 8px;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.wmp-popup-address {
    margin: -2px 0 10px;
    color: #475467;
    font-size: 12px;
    line-height: 1.4;
}

.wmp-popup-category {
    display: inline-flex;
    margin-bottom: 10px;
    border-radius: 999px;
    padding: 4px 8px;
    background: #eef4ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.wmp-popup-description {
    color: var(--wmp-popup-text);
    line-height: 1.55;
}

.wmp-popup-description p {
    margin: 0 0 10px;
}

.wmp-popup-description p:last-child {
    margin-bottom: 0;
}

.wmp-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.78);
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 30px;
}

.wmp-popup-nav {
    position: absolute;
    top: 42%;
    z-index: 2;
    width: 32px;
    height: 42px;
    border: 0;
    border-radius: 7px;
    background: rgba(17, 24, 39, 0.72);
    color: #fff;
    cursor: pointer;
    font-size: 28px;
    line-height: 36px;
}

.wmp-popup-prev {
    left: 8px;
}

.wmp-popup-next {
    right: 8px;
}

.wmp-popup-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.wmp-popup-button,
.wmp-popup-video {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: var(--wmp-button-radius);
    padding: var(--wmp-button-padding);
    text-decoration: none;
    font-weight: 800;
}

.wmp-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 7px;
    padding: 8px 10px;
    background: #f1f5f9;
    color: #1f2937;
    text-decoration: none;
    font-weight: 800;
}

.wmp-marker.is-highlighted .wmp-marker-icon {
    animation: wmp-highlight 0.6s ease-in-out 3;
}

.wmp-popup-button {
    border: 1px solid var(--wmp-button-border-color);
    background: var(--wmp-button-bg);
    color: var(--wmp-button-text);
}

.wmp-popup-button:hover,
.wmp-popup-button:focus {
    background: var(--wmp-button-hover-bg);
    color: var(--wmp-button-text);
}

.wmp-popup-video {
    background: #eef2f7;
    color: #111827;
}

.wmp-animation-pulse .wmp-marker-icon {
    animation: wmp-pulse 1.8s ease-in-out infinite;
}

.wmp-animation-bounce .wmp-marker-icon {
    animation: wmp-bounce 1.4s ease-in-out infinite;
}

.wmp-animation-glow .wmp-marker-icon {
    filter: drop-shadow(0 0 10px currentColor) drop-shadow(0 8px 12px rgba(15, 23, 42, 0.26));
}

@keyframes wmp-pulse {
    50% {
        transform: scale(1.16);
    }
}

@keyframes wmp-bounce {
    50% {
        transform: translateY(-8px);
    }
}

@keyframes wmp-highlight {
    50% {
        transform: scale(1.35);
        filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.85));
    }
}

@media (max-width: 1024px) {
    .wmp-map-canvas {
        height: min(var(--wmp-map-height), 600px);
        min-height: 600px;
    }

    .wmp-frontend-controls {
        flex-wrap: wrap;
    }

    .wmp-frontend-search {
        flex: 1 1 100%;
        width: 100%;
    }

    .wmp-frontend-filters {
        flex: 1 1 auto;
        flex-wrap: wrap;
    }

    .wmp-frontend-filter {
        width: min(180px, calc(50vw - 28px));
    }

    .wmp-popup {
        width: min(90%, 450px);
    }
}

@media (max-width: 767px) {
    .wmp-map-canvas {
        height: max(500px, min(72vh, 640px));
        min-height: 500px;
        border-radius: 8px;
    }

    .wmp-frontend-map .wmp-map-toolbar {
        position: absolute;
        right: 12px;
        bottom: 12px;
        z-index: 4;
        display: grid;
        grid-template-columns: 44px;
        width: max-content;
        margin-left: 0;
        padding: 8px;
    }

    .wmp-map-control {
        width: 44px;
        height: 44px;
    }

    .wmp-popup {
        position: fixed;
        left: 50%;
        right: auto;
        bottom: 0;
        z-index: 9999;
        width: 95%;
        max-width: 450px;
        max-height: min(82vh, 720px);
        border-radius: 18px 18px 0 0;
        transform: translate(-50%, 100%);
        transition: opacity 0.18s ease, transform 0.22s ease;
    }

    .wmp-popup.is-open {
        transform: translate(-50%, 0);
    }

    .wmp-popup-image {
        max-height: 220px;
        aspect-ratio: 16 / 9;
    }

    .wmp-popup-gallery {
        padding: 10px 12px;
        scroll-snap-type: x proximity;
    }

    .wmp-popup-gallery img {
        width: 86px;
        height: 64px;
        scroll-snap-align: start;
    }

    .wmp-popup-body {
        max-height: calc(min(82vh, 720px) - 220px);
        padding: 18px 20px 22px;
        -webkit-overflow-scrolling: touch;
    }

    .wmp-popup h3 {
        margin-right: 48px;
        font-size: 22px;
    }

    .wmp-popup-close {
        position: sticky;
        top: 10px;
        float: right;
        width: 44px;
        height: 44px;
        margin: 10px 10px -54px 0;
        line-height: 42px;
    }

    .wmp-popup-nav {
        top: 46%;
        width: 42px;
        height: 52px;
    }

    .wmp-popup-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .wmp-popup-button,
    .wmp-popup-video,
    .wmp-share {
        width: 100%;
        min-height: 48px;
        padding: 10px 12px;
        text-align: center;
    }

    .wmp-frontend-controls {
        display: grid;
        grid-template-columns: 1fr;
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
        align-content: start;
        gap: 8px;
        max-width: calc(100% - 16px);
    }

    .wmp-frontend-search,
    .wmp-frontend-filter,
    .wmp-frontend-filters {
        width: 100%;
    }

    .wmp-frontend-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .wmp-tooltip {
        display: none;
    }

    .wmp-map-shell.is-popup-open .wmp-frontend-map .wmp-map-toolbar,
    .wmp-map-shell.is-popup-open .wmp-map-toolbar {
        bottom: min(calc(82vh + 16px), calc(100% - 64px));
    }

    .wmp-tooltip-image {
        width: 58px;
        height: 58px;
    }
}

@media (max-width: 420px) {
    .wmp-popup-actions {
        grid-template-columns: 1fr;
    }
}
