/*
 * Styles for the Mapino World Map plugin
 */

.custom-world-map-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1326 / 722;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    overflow: visible;
}

@supports not (aspect-ratio: 1 / 1) {
    .custom-world-map-container {
        padding-top: 54.5%;
    }
}

/* Marker pins: red teardrop model with a white center hole. */
.custom-world-map-container .map-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    --marker-color: #e74c3c;
    background: var(--marker-color);
    border-radius: 50% 50% 50% 0;
    cursor: pointer;
    z-index: 4;
    transform: translate(-50%, -100%) rotate(-45deg);
    transform-origin: 50% 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
    outline: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.custom-world-map-container .map-marker::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    left: 50%;
    top: 50%;
    background: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.custom-world-map-container .map-marker:hover,
.custom-world-map-container .map-marker:focus,
.custom-world-map-container .map-marker.is-active {
    transform: translate(-50%, -100%) rotate(-45deg) scale(1.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.30);
}

.custom-world-map-container .map-marker.highlight {
    --marker-color: #3498db;
}

.custom-world-map-container .map-marker .pin-pointer {
    display: none;
}

/* Persistent desktop panel / mobile popup. */
.custom-world-map-container .map-popup {
    position: absolute;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
    z-index: 10;
    font-size: 14px;
    line-height: 1.45;
    color: #333333;
    box-sizing: border-box;
}

.custom-world-map-container .map-popup.is-desktop {
    width: 310px;
    min-height: 280px;
    max-height: 88%;
    right: -7%;
    top: 50%;
    transform: translateY(-50%);
}

.custom-world-map-container .map-popup.is-mobile {
    width: min(86vw, 290px);
    min-height: 230px;
    max-height: 86vh;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.custom-world-map-container .map-popup-scroll {
    max-height: inherit;
    overflow-y: auto;
    padding: 18px;
    box-sizing: border-box;
}

.custom-world-map-container .map-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #333333;
    cursor: pointer;
    font-size: 22px;
    line-height: 26px;
    text-align: center;
    z-index: 2;
}

.custom-world-map-container .map-popup h4 {
    margin: 0 26px 8px 0;
    font-size: 17px;
    font-weight: 700;
    color: #333333;
}

.custom-world-map-container .map-popup .marker-text,
.custom-world-map-container .map-popup p {
    margin: 0 0 10px;
}

.custom-world-map-container .map-popup .protected-content {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eeeeee;
}

.custom-world-map-container .marker-icon-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-world-map-container .marker-icon-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.custom-world-map-container .marker-icon-symbol {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: #e74c3c;
    margin-top: 1px;
}

.custom-world-map-container .marker-icon-symbol svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.custom-world-map-container .marker-icon-copy {
    display: block;
    min-width: 0;
}

.custom-world-map-container .marker-icon-label {
    display: block;
    color: #555555;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 1px;
}

.custom-world-map-container .marker-icon-value {
    display: block;
    color: #333333;
    overflow-wrap: anywhere;
}

.custom-world-map-container .marker-icon-value a {
    color: inherit;
    text-decoration: none;
}

.custom-world-map-container .marker-icon-value a:hover {
    text-decoration: underline;
}

.custom-world-map-container .map-popup .contact-button,
.custom-world-map-container .map-popup .submit-email {
    display: inline-block;
    padding: 7px 13px;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}

.custom-world-map-container .map-popup .contact-button {
    margin-top: 8px;
    background: #21759b;
}

.custom-world-map-container .map-popup .submit-email {
    background: #28a745;
}

.custom-world-map-container .map-popup .contact-form {
    margin-top: 8px;
    display: none;
}

.custom-world-map-container .map-popup input[type="text"],
.custom-world-map-container .map-popup input[type="tel"],
.custom-world-map-container .map-popup input[type="email"] {
    width: 100%;
    padding: 7px;
    margin-bottom: 7px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.custom-world-map-container .map-popup .message {
    margin-top: 7px;
    font-size: 13px;
    color: #555555;
}

.custom-world-map-container .map-popup .success-message {
    color: #28a745;
}

.custom-world-map-container .map-popup {
    padding: 1% 1% 1% 18px !important;
}

@media (max-width: 768px) {
    .custom-world-map-container {
        aspect-ratio: 1326 / 722;
    }

    @supports not (aspect-ratio: 1 / 1) {
        .custom-world-map-container {
            padding-top: 54.5%;
        }
    }

    .custom-world-map-container .map-marker {
        width: 22px;
        height: 22px;
    }

    .custom-world-map-container .map-marker::after {
        width: 9px;
        height: 9px;
    }

    .custom-world-map-container .map-popup {
        font-size: 13px;
        border-radius: 16px;
    }

    .custom-world-map-container .map-popup-scroll {
        padding: 18px 16px 16px;
    }
}
