/* =========================================================
   SMART LOCATION MAP
   ========================================================= */

.smart-location-section {
    padding: 110px 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(215, 25, 32, 0.08), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
}

.smart-location-section .section-heading {
    max-width: 760px;
    margin: 0 auto 44px;
    text-align: center;
}

.smart-location-section .section-heading h2 {
    margin: 10px 0 18px;
    color: #171719;
    font-size: clamp(2.5rem, 5vw, 5rem);
    letter-spacing: -0.055em;
    line-height: 1;
}

.smart-location-section .section-heading p {
    margin: 0 auto;
    color: #6b7280;
    font-size: 1rem;
}

.smart-map-shell {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid rgba(11, 11, 13, 0.12);
    border-radius: 30px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(11, 11, 13, 0.14);
}

.smart-location-map {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.smart-map-card {
    position: absolute;
    top: 28px;
    left: 28px;
    z-index: 500;
    width: min(360px, calc(100% - 56px));
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 28px 80px rgba(11, 11, 13, 0.18);
    backdrop-filter: blur(18px);
    transition: opacity 300ms ease, transform 300ms ease, visibility 300ms ease;
}

.smart-map-card.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(18px) scale(0.96);
}

.smart-map-card__badge {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(215, 25, 32, 0.1);
    color: #d71920;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.smart-map-card h3 {
    margin: 0 0 8px;
    color: #171719;
    font-size: 2.1rem;
    letter-spacing: -0.04em;
    line-height: 1;
}

.smart-map-card > p {
    margin: 0 0 18px;
    color: #313136;
    font-weight: 800;
}

.smart-map-card__details {
    display: grid;
    gap: 6px;
    margin-bottom: 20px;
    color: #6b7280;
    font-size: 0.88rem;
}

.smart-map-card__close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(11, 11, 13, 0.08);
    color: #171719;
    font-size: 1.6rem;
    line-height: 1;
    transition: 250ms ease;
}

.smart-map-card__close:hover {
    background: #d71920;
    color: #ffffff;
    transform: rotate(90deg);
}

.locate-me-btn {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    background: #d71920;
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 900;
    box-shadow: 0 14px 34px rgba(215, 25, 32, 0.26);
    transition: 250ms ease;
}

.locate-me-btn:hover {
    background: #a50f15;
    transform: translateY(-3px);
}

.locate-me-btn:disabled {
    cursor: wait;
    opacity: 0.68;
    transform: none;
}

.location-toast {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 500;
    width: min(370px, calc(100% - 56px));
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    background: rgba(11, 11, 13, 0.9);
    color: #ffffff;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    backdrop-filter: blur(16px);
    transition: opacity 350ms ease, transform 350ms ease;
}

.location-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.location-toast strong,
.location-toast span {
    display: block;
}

.location-toast strong {
    margin-bottom: 5px;
    font-size: 0.92rem;
}

.location-toast span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
}

.company-marker-shell,
.user-marker-shell {
    background: transparent;
    border: 0;
}

.company-marker {
    position: relative;
    width: 34px;
    height: 34px;
}

.company-marker__core {
    position: absolute;
    inset: 7px;
    z-index: 2;
    border: 4px solid #ffffff;
    border-radius: 50%;
    background: #d71920;
    box-shadow: 0 0 22px rgba(215, 25, 32, 0.72);
}

.company-marker__ring {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(215, 25, 32, 0.72);
    border-radius: 50%;
    animation: company-marker-pulse 2s ease-out infinite;
}

.user-marker {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: rgba(11, 11, 13, 0.18);
    box-shadow: 0 0 0 7px rgba(11, 11, 13, 0.1);
}

.user-marker span {
    width: 12px;
    height: 12px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #171719;
}

.smart-route-line {
    animation: smart-route-dash 1.4s linear infinite;
}

.smart-map-shell .leaflet-control-zoom {
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(11, 11, 13, 0.15);
}

.smart-map-shell .leaflet-control-zoom a {
    border: 0;
    color: #171719;
}

.smart-map-shell .leaflet-popup-content-wrapper {
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(11, 11, 13, 0.18);
}

@keyframes company-marker-pulse {
    0% {
        opacity: 0.9;
        transform: scale(0.65);
    }

    100% {
        opacity: 0;
        transform: scale(1.65);
    }
}

@keyframes smart-route-dash {
    to {
        stroke-dashoffset: -44;
    }
}

@media (max-width: 768px) {
    .smart-location-section {
        padding: 78px 0;
    }

    .smart-map-shell {
        min-height: 680px;
        border-radius: 24px;
    }

    .smart-map-card {
        top: 16px;
        left: 16px;
        width: calc(100% - 32px);
        padding: 22px;
        border-radius: 22px;
    }

    .location-toast {
        right: 16px;
        bottom: 16px;
        width: calc(100% - 32px);
    }
}
