
/* =========================================
   TEAMVIBE — UAE INTERACTIVE MAP
========================================= */

#uae-map.tv-map-section {
    position: relative;
    background: #fff !important;
    background-image: none !important;
    padding: 48px 0 52px;
    overflow: hidden;
}

#uae-map.tv-map-section::before,
#uae-map.tv-map-section::after {
    display: none !important;
    content: none !important;
}

#uae-map .tv-map-container {
    width: min(1320px, calc(100% - 48px));
    max-width: 1320px;
    margin: auto;
}

/* Heading */
#uae-map .tv-map-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 14px;
}

#uae-map .tv-map-eyebrow {
    color: var(--orange-600, #ed6224);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

#uae-map .tv-map-heading h2 {
    color: #142650;
    font-size: clamp(25px, 2.6vw, 36px);
    margin: 8px 0;
    line-height: 1.15;
}

#uae-map .tv-map-heading p {
    font-size: 13px;
    color: #526073;
    margin: 0;
}

#uae-map .tv-map-see-all,
#uae-map .tv-map-highlight-cta {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    padding: 11px 18px;
    background: linear-gradient(105deg, #ff923b, #ed621e);
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

/* =========================================
   MAP CONTAINER
========================================= */

#uae-map .tv-map-content {
    position: relative;
    width: 100%;
    min-height: 510px;
}

#uae-map .tv-map-visual {
    position: relative;
    width: 84%;
    max-width: 1100px;
    margin: 0 0 0 auto;
}

#uae-map .tv-map-illustration {
    position: relative;
    width: 100%;
    aspect-ratio: 1346.21 / 641.84;
}

#uae-map .tv-map-regions {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 17px 9px rgba(105,69,44,.2));
}

/* =========================================
   MAP REGIONS
========================================= */

#uae-map .tv-map-region-link {
    cursor: pointer;
    outline: none;
}

#uae-map .tv-map-region-shape {
    fill: #f3e1c8;
    stroke: #c8a079;
    stroke-width: 2.5;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    transition: fill .2s ease, stroke .2s ease;
}

/* Abu Dhabi lighter orange by default */
#uae-map .tv-map-region-abu .tv-map-region-shape {
    fill: #ffd09a;
    stroke: #f47720;
}

/* Highlight the hovered territory */
#uae-map .tv-map-region-link:hover .tv-map-region-shape,
#uae-map .tv-map-region-link:focus-visible .tv-map-region-shape,
#uae-map .tv-map-region-link.is-active .tv-map-region-shape {
    fill: #ffad63;
    stroke: #ed631b;
    filter: drop-shadow(0 3px 6px rgba(244,119,32,.25));
}

#uae-map .tv-map-region-depth {
    fill: #d5ad85;
    stroke: #b98b62;
    stroke-width: 1.8;
    pointer-events: none;
}

#uae-map .tv-map-region-abu .tv-map-region-depth {
    fill: #ed9a56;
}

/* =========================================
   INFORMATION CARD
   Hidden until hover
========================================= */

#uae-map #tvMapInfoCard {
    position: absolute;
    top: 20px;
    left: 0;
    z-index: 25;

    width: 320px;
    max-width: 320px;
    padding: 12px;
    box-sizing: border-box;

    background: #fff;
    border: 1px solid #f4cba9;
    border-radius: 15px;
    box-shadow: 0 12px 28px rgba(51,44,38,.14);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);

    transition: opacity .2s ease,
                transform .2s ease,
                visibility .2s ease;
}

#uae-map #tvMapInfoCard.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

#uae-map .tv-map-highlight-top {
    display: flex;
    gap: 11px;
    align-items: center;
    margin-bottom: 11px;
}

#uae-map .tv-map-highlight-thumbnail {
    width: 76px;
    height: 73px;
    flex: 0 0 76px;
    border-radius: 10px;
    overflow: hidden;
}

#uae-map .tv-map-highlight-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#uae-map .tv-map-highlight-info {
    flex: 1;
    min-width: 0;
}

#uae-map .tv-map-highlight h3 {
    margin: 0 0 4px;
    color: #12244a;
    font-size: 17px;
}

#uae-map .tv-map-highlight p {
    margin: 0;
    color: #5f6b7f;
    font-size: 12px;
    line-height: 1.5;
}

#uae-map .tv-map-highlight-cta {
    width: 100%;
    min-height: 36px;
    padding: 8px;
    box-sizing: border-box;
}

/* =========================================
   CITY LABELS — IMPORTANT FIX
========================================= */

#uae-map .tv-map-pins {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

/* Every label is positioned relative to the map */
#uae-map .tv-map-pin {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 8px 12px;
    border: 1px solid #e8e0dc;
    border-radius: 999px;

    background: #fff;
    color: #142340;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    line-height: 1.2;

    box-shadow: 0 4px 12px rgba(28,39,49,.16);

    transform: translate(-50%, -50%);
    transition: opacity .2s ease, visibility .2s ease;

    /* Hidden initially */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    cursor: pointer;
}

/* Show only the hovered territory label */
#uae-map .tv-map-pin.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border-color: #f47720;
}

#uae-map .tv-map-pin-symbol {
    color: var(--pin-color, #f47720);
    font-size: 15px;
    line-height: 1;
}

/* City positions relative to the SVG map */
#uae-map .tv-map-pin-abu-dhabi {
    left: 38%;
    top: 72%;
}

#uae-map .tv-map-pin-dubai {
    left: 63%;
    top: 42%;
}

#uae-map .tv-map-pin-sharjah {
    left: 72%;
    top: 30%;
}

#uae-map .tv-map-pin-umm-al-quwain {
    left: 77%;
    top: 18%;
}

#uae-map .tv-map-pin-ras-al-khaimah {
    left: 91%;
    top: 6%;
}

#uae-map .tv-map-pin-ajman {
    left: 91%;
    top: 24%;
}

#uae-map .tv-map-pin-fujairah {
    left: 93%;
    top: 47%;
}

/* Small curved connector */
#uae-map .tv-map-pin.is-active::after {
    content: "";
    position: absolute;
    left: 45%;
    top: 100%;

    width: 18px;
    height: 17px;
    border-left: 2px solid #e6a86e;
    border-bottom: 2px solid #e6a86e;
    border-bottom-left-radius: 18px;

    pointer-events: none;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1050px) {
    #uae-map .tv-map-visual {
        width: 90%;
    }

    #uae-map .tv-map-pin {
        padding: 6px 8px;
        font-size: 11px;
    }
}

@media (max-width: 767px) {
    #uae-map.tv-map-section {
        padding: 32px 0;
    }

    #uae-map .tv-map-container {
        width: calc(100% - 28px);
    }

    #uae-map .tv-map-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    #uae-map .tv-map-content {
        display: flex;
        flex-direction: column;
        min-height: 0;
        gap: 14px;
    }

    #uae-map .tv-map-visual {
        width: 100%;
        max-width: 100%;
        margin: 0;
        overflow-x: auto;
        overflow-y: hidden;
    }

    #uae-map .tv-map-illustration {
        min-width: 680px;
    }

    #uae-map #tvMapInfoCard {
        position: relative;
        top: auto;
        left: auto;
        order: -1;

        width: 100%;
        max-width: 100%;

        display: none;
    }

    #uae-map #tvMapInfoCard.is-visible {
        display: block;
    }

    #uae-map .tv-map-pin {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #uae-map .tv-map-pin,
    #uae-map .tv-map-highlight,
    #uae-map .tv-map-region-shape {
        transition: none;
    }
}
