.defex-route-map {
    width: 100%;
}

.defex-marker {
    align-items: center;
    background: var(--defex-marker-gradient, linear-gradient(135deg, #0b62f0, #3fa9f5));
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    font-family: "Montserrat", "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    transition: transform 120ms ease, box-shadow 120ms ease;
    width: 34px;
}

.defex-marker:hover {
    box-shadow: 0 4px 12px rgba(0, 97, 242, 0.35);
    transform: translateY(-2px) scale(1.05);
}

.defex-marker:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.defex-marker-fixed {
    background: linear-gradient(135deg, #757575, #9e9e9e) !important;
}

.defex-marker-home {
    background: linear-gradient(135deg, #ff6b35, #ff8c42) !important;
}

.defex-marker-home svg {
    display: block;
    width: 100%;
    height: 100%;
}

.defex-marker-completed {
    background: linear-gradient(135deg, #16a34a, #22c55e) !important;
}

.defex-marker-active {
    background: linear-gradient(135deg, #0f766e, #14b8a6) !important;
}

.defex-marker-upcoming {
    background: linear-gradient(135deg, #2563eb, #60a5fa) !important;
}

.defex-marker-current {
    background: transparent !important;
    border: 0;
    box-shadow: 0 0 0 10px var(--defex-current-ring, rgba(20, 184, 166, 0.18)), 0 10px 22px rgba(15, 23, 42, 0.16);
    height: 22px;
    width: 22px;
}

.defex-marker-current span {
    background: var(--defex-current-color, #0f766e);
    border: 3px solid #ffffff;
    border-radius: 999px;
    display: block;
    height: 100%;
    width: 100%;
}

.defex-marker-tech {
    background: var(--defex-marker-gradient, linear-gradient(135deg, #0b62f0, #3fa9f5));
}

.defex-marker-job {
    position: relative;
}

.defex-marker-job::after {
    content: "";
    position: absolute;
    inset: 6px;
    background: #ffffff;
    border-radius: 999px;
    z-index: -1;
}

.defex-marker-job::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: var(--defex-marker-color, #2563eb);
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: translateX(-50%) rotate(45deg);
    border-radius: 0 0 3px 0;
    z-index: -1;
}

.defex-marker-job {
    color: #0f172a;
    text-shadow: 0 0 2px #ffffff, 0 0 2px #ffffff;
}

.defex-marker-job-completed {
    box-shadow:
        0 0 0 3px rgba(22, 163, 74, 0.22),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.defex-marker-job-active {
    box-shadow:
        0 0 0 3px rgba(20, 184, 166, 0.24),
        0 2px 10px rgba(15, 118, 110, 0.28);
}

.defex-marker-job-upcoming {
    box-shadow:
        0 0 0 3px rgba(96, 165, 250, 0.24),
        0 2px 8px rgba(0, 0, 0, 0.18);
}

.defex-marker-job:not(.defex-marker-home) {
    border-width: 3px;
    font-size: 13px;
    font-weight: 800;
    isolation: isolate;
    overflow: visible;
    padding-bottom: 2px;
    text-shadow: none;
    z-index: 1;
}

.defex-marker-current-stale span {
    border-style: dashed;
    opacity: 0.75;
}

.defex-marker-job-label {
    width: auto !important;
    min-width: 34px;
    padding: 0 10px;
    border-radius: 18px !important;
    font-size: 12px;
    letter-spacing: 0.2px;
    color: #0f172a !important;
    background: #ffffff !important;
    border: 2px solid var(--defex-marker-color, #2563eb) !important;
    text-shadow: none !important;
}

.defex-marker-job-label::after {
    display: none;
}

.defex-marker-job-cluster {
    width: auto !important;
    min-width: 40px;
    padding: 0 12px;
    border-radius: 18px !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #0f172a !important;
    background: #ffffff !important;
    border: 2px solid var(--defex-marker-color, #0f172a) !important;
    text-shadow: none !important;
    box-shadow:
        3px 3px 0 -1px #ffffff,
        3px 3px 0 1px var(--defex-marker-color, #0f172a),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.defex-marker-job-cluster::after {
    display: none;
}

.defex-marker-job-cluster-mixed {
    --defex-marker-color: #0f172a;
}

.defex-spider-leg-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    visibility: visible;
    z-index: 0;
}

.defex-spider-leg {
    position: absolute;
    left: 50%;
    top: 50%;
    height: 0;
    border-top: 1px dashed #64748b;
    transform-origin: 0 50%;
    opacity: 0.85;
}

/* ===== Map marker styles (extracted from MainLayout) ===== */
.marker {
    border: none;
    cursor: pointer;
    height: 36px;
    width: 28px;
    background-color: #3b82f6;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    position: relative;
}

.marker::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #3b82f6;
}

.marker::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
}

/* Marker tweaks */
.mapboxgl-popup-close-button {
    font-size: 18px;
    padding: 2px 6px;
    color: #6b7280;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.mapboxgl-popup-close-button:hover {
    color: #111827;
}

.mapboxgl-popup-content {
    font: 400 15px/22px 'Source Sans Pro', 'Helvetica Neue', sans-serif;
    padding: 0;
    width: 180px;
    background: #fff;
}

.mapboxgl-popup-content h3 {
    background: #fff;
    color: #333;
    margin: 0;
    padding: 10px;
    border-radius: 3px 3px 0 0;
    font-weight: 700;
}

.mapboxgl-popup-content h4 {
    margin: 0;
    padding: 10px;
    font-weight: 400;
}

.mapboxgl-popup-content div {
    padding: 10px;
}

.mapboxgl-popup-anchor-top > .mapboxgl-popup-content {
    margin-top: 15px;
}

.mapboxgl-popup-anchor-top > .mapboxgl-popup-tip {
    border-bottom-color: #fff;
}
