/* Scoped to dynamic RTO pages only. Do not reuse generic .map / .marker / .popup. */

.dynamic-rto-page .dynamic-rto-howto-img {
    margin-top: 40px;
    width: 100%;
    height: auto;
    display: block;
}

.dynamic-rto-map {
    position: relative;
    max-width: 100%;
    text-align: center;
}

/*
 * Cap map visual height so tall portrait maps (e.g. Chhattisgarh) stay
 * close to the Maharashtra section proportion. Aspect ratio is preserved
 * via max-height + width:auto — no scaleY distortion.
 */
.dynamic-rto-map-inner {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 520px;
    vertical-align: top;
    overflow: visible;
}

.dynamic-rto-map-img {
    display: block;
    max-width: 100%;
    max-height: 520px;
    width: auto;
    height: auto;
    margin: 0 auto;
}

.dynamic-rto-marker {
    position: absolute;
    min-width: 1px;
    min-height: 1px;
    width: 30px;
    height: 30px;
    z-index: 10;
    cursor: pointer;
    pointer-events: auto;
}

.dynamic-rto-marker.is-active {
    z-index: 40;
}

.dynamic-rto-pulse {
    border: 3px solid rgba(255, 255, 255, 0.5);
    width: 30px;
    height: 30px;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 50%;
    background: #1250CD;
    opacity: 0.2;
    pointer-events: none;
    animation: dynamic-rto-pulse 2.5s ease-out infinite;
}

.dynamic-rto-pin {
    position: absolute;
    z-index: 11;
    top: -8.5px;
    left: -7px;
    width: auto;
    height: auto;
    max-width: inherit !important;
    display: block;
    border: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.dynamic-rto-popup {
    display: none;
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    background: #fff;
    border: 2px solid #1250CD;
    padding: 10px 12px;
    width: max-content;
    max-width: none;
    min-width: 0;
    z-index: 50;
    color: #000;
    text-align: left;
    white-space: nowrap;
    box-shadow: none;
    pointer-events: auto;
}

.dynamic-rto-popup::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border: 8px solid transparent;
    border-top-color: #1250CD;
}

.dynamic-rto-popup p {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.3;
    color: #000;
    white-space: nowrap;
}

.dynamic-rto-popup p:last-child {
    margin-bottom: 0;
}

.dynamic-rto-marker.is-active .dynamic-rto-popup {
    display: block;
}

.dynamic-rto-book-btn {
    display: inline-block !important;
    white-space: nowrap !important;
    padding: 6px 14px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    width: auto !important;
    max-width: none !important;
    text-decoration: none;
}

@keyframes dynamic-rto-pulse {
    0% {
        transform: scale(1);
        opacity: 0.25;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.12;
    }
    100% {
        transform: scale(1);
        opacity: 0.25;
    }
}

@media (max-width: 991px) {
    .dynamic-rto-map-inner,
    .dynamic-rto-map-img {
        max-height: 460px;
    }
}

@media (max-width: 767px) {
    .dynamic-rto-map {
        margin-top: 24px;
    }
    .dynamic-rto-map-inner,
    .dynamic-rto-map-img {
        max-height: 380px;
    }
    .dynamic-rto-popup {
        padding: 8px 10px;
    }
    .dynamic-rto-book-btn {
        padding: 5px 12px !important;
        font-size: 13px !important;
    }
}
