.wms-map-alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.wms-map-alert span,
.wms-map-alert strong {
    display: block;
}

.wms-map-alert span {
    margin-top: .15rem;
}

.wms-map-filter-card .card-body {
    padding: 1rem 1.15rem;
}

.wms-map-search {
    position: relative;
}

.wms-map-search > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: .85rem;
    color: var(--wms-muted);
    transform: translateY(-50%);
}

.wms-map-search .form-control {
    padding-left: 2.35rem;
}

.wms-map-summary {
    display: grid;
    overflow: hidden;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border: 1px solid var(--wms-border);
    border-radius: var(--wms-radius);
    background: #fff;
    box-shadow: var(--wms-shadow);
}

.wms-map-summary > div {
    display: grid;
    grid-template-columns: 42px 1fr;
    grid-template-rows: auto auto;
    gap: 0 .7rem;
    align-items: center;
    padding: .9rem 1rem;
    border-right: 1px solid var(--wms-border-soft);
}

.wms-map-summary > div:last-child {
    border-right: 0;
}

.wms-map-summary span {
    display: inline-flex;
    width: 40px;
    height: 40px;
    grid-row: 1 / 3;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: .92rem;
}

.wms-map-summary small {
    color: var(--wms-muted);
    font-size: .67rem;
    font-weight: 700;
}

.wms-map-summary strong {
    color: var(--wms-text);
    font-size: 1.08rem;
    line-height: 1.1;
}

.wms-map-summary .is-total { background: var(--wms-primary-soft); color: var(--wms-primary); }
.wms-map-summary .is-empty { background: #f1f5f9; color: #64748b; }
.wms-map-summary .is-occupied { background: var(--wms-success-soft); color: var(--wms-success); }
.wms-map-summary .is-full { background: var(--wms-danger-soft); color: var(--wms-danger); }
.wms-map-summary .is-warning { background: var(--wms-warning-soft); color: var(--wms-warning); }

.wms-map-empty {
    display: flex;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: left;
}

.wms-map-empty > span {
    display: inline-flex;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--wms-primary-soft);
    color: var(--wms-primary);
    font-size: 1.15rem;
}

.wms-map-empty h4 {
    margin-bottom: .3rem;
}

.wms-map-card {
    overflow: hidden;
}

.wms-map-card-header {
    align-items: center;
}

.wms-map-live-indicator {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .72rem;
    border: 1px solid #cae7d4;
    border-radius: 999px;
    background: var(--wms-success-soft);
    color: #176333;
}

.wms-map-live-indicator > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wms-success);
    box-shadow: 0 0 0 4px rgba(21, 128, 61, .12);
}

.wms-map-live-indicator strong,
.wms-map-live-indicator small {
    display: block;
    line-height: 1.05;
}

.wms-map-live-indicator strong { font-size: .68rem; }
.wms-map-live-indicator small { margin-top: .15rem; color: #4c725a; font-size: .57rem; }
.wms-map-live-indicator.is-error { border-color: #f0ccc8; background: var(--wms-danger-soft); color: var(--wms-danger); }
.wms-map-live-indicator.is-error > span { background: var(--wms-danger); box-shadow: 0 0 0 4px rgba(194, 65, 58, .12); }

.wms-map-toolbar {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem .85rem;
    border-top: 1px solid var(--wms-border-soft);
    border-bottom: 1px solid var(--wms-border-soft);
    background: #fbfcfd;
}

.wms-map-toolbar-group {
    display: flex;
    gap: .4rem;
}

.wms-map-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    min-height: 34px;
}

.wms-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem 1rem;
    padding: .55rem .9rem;
    border-bottom: 1px solid var(--wms-border-soft);
    background: #fff;
    color: var(--wms-muted);
    font-size: .65rem;
    font-weight: 700;
}

.wms-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: .36rem;
}

.wms-map-legend i {
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 1px solid rgba(15, 23, 42, .18);
    border-radius: 3px;
}

.wms-map-legend .is-empty { background: rgba(226, 232, 240, .9); }
.wms-map-legend .is-occupied { background: rgba(34, 197, 94, .82); }
.wms-map-legend .is-full { background: rgba(239, 68, 68, .82); }
.wms-map-legend .is-warning { background: rgba(245, 158, 11, .85); }
.wms-map-legend .is-inactive { background: rgba(100, 116, 139, .82); }

.wms-map-workspace {
    position: relative;
    min-height: 720px;
    background:
        linear-gradient(45deg, #eef2f6 25%, transparent 25%),
        linear-gradient(-45deg, #eef2f6 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eef2f6 75%),
        linear-gradient(-45deg, transparent 75%, #eef2f6 75%),
        #f8fafc;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.wms-map-stage {
    width: 100%;
    height: var(--wms-map-stage-height, min(78vh, 980px));
    min-height: 720px;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    user-select: none;
    transition: height .24s ease;
}

.wms-map-stage.is-dragging { cursor: grabbing; }

.wms-map-svg {
    display: block;
    width: 100%;
    height: 100%;
    background: #fff;
}

.wms-map-background {
    pointer-events: none;
}

.wms-map-group rect {
    fill: transparent;
    stroke: rgba(21, 94, 139, .34);
    stroke-width: 1.6;
    stroke-dasharray: 5 3;
    pointer-events: none;
    vector-effect: non-scaling-stroke;
}

.wms-map-master-location {
    pointer-events: none;
}

.wms-map-master-location-shape {
    fill: rgba(14, 165, 233, .12);
    stroke: rgba(2, 132, 199, .82);
    stroke-width: 1.25;
    vector-effect: non-scaling-stroke;
}

.wms-map-master-location-label {
    fill: #0f172a;
    font-size: 7.3px;
    font-weight: 800;
    pointer-events: none;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .86);
    stroke-width: 1.4px;
    stroke-linejoin: round;
}

.wms-map-location {
    cursor: pointer;
    outline: none;
    transition: opacity .16s ease;
}

.wms-map-location-shape {
    stroke: rgba(15, 23, 42, .48);
    stroke-width: .72;
    vector-effect: non-scaling-stroke;
    transition: fill .15s ease, opacity .15s ease, stroke .15s ease;
}

.wms-map-location-label {
    fill: #0f172a;
    font-size: 7.3px;
    font-weight: 800;
    pointer-events: none;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .82);
    stroke-width: 1.4px;
    stroke-linejoin: round;
}

.wms-map-location.is-loading .wms-map-location-shape { fill: rgba(203, 213, 225, .62); stroke-dasharray: 3 2; }
.wms-map-location.is-empty .wms-map-location-shape { fill: rgba(226, 232, 240, .86); }
.wms-map-location.is-occupied .wms-map-location-shape { fill: rgba(34, 197, 94, .78); }
.wms-map-location.is-full .wms-map-location-shape { fill: rgba(239, 68, 68, .82); }
.wms-map-location.is-warning .wms-map-location-shape { fill: rgba(245, 158, 11, .85); }
.wms-map-location.is-inactive .wms-map-location-shape { fill: rgba(100, 116, 139, .78); }

.wms-map-location:hover .wms-map-location-shape,
.wms-map-location:focus .wms-map-location-shape,
.wms-map-location.is-selected .wms-map-location-shape {
    stroke: #0c4a6e;
    stroke-width: 2.1;
    opacity: 1;
}

.wms-map-location.is-selected .wms-map-location-shape {
    filter: drop-shadow(0 0 2px rgba(14, 116, 144, .62));
}

.wms-map-location.is-dimmed { opacity: .12; }
.wms-map-location.is-match .wms-map-location-shape { stroke: #0f172a; stroke-width: 2.3; opacity: 1; }

.wms-map-detail[hidden] {
    display: none !important;
}

.wms-map-detail {
    position: absolute;
    z-index: 20;
    top: 16px;
    right: 16px;
    width: min(330px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    overflow: auto;
    padding: 1rem;
    border: 1px solid rgba(203, 213, 225, .92);
    border-radius: 14px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
    backdrop-filter: blur(8px);
}

.wms-map-detail-close {
    position: absolute;
    top: .7rem;
    right: .7rem;
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: #f1f5f9;
    color: #64748b;
}

.wms-map-detail-empty {
    display: flex;
    min-height: 180px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--wms-muted);
    text-align: center;
}

.wms-map-detail-empty > span {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: .65rem;
    border-radius: 12px;
    background: var(--wms-primary-soft);
    color: var(--wms-primary);
}

.wms-map-detail-empty strong,
.wms-map-detail-empty small { display: block; }
.wms-map-detail-empty small { margin-top: .28rem; }

.wms-map-detail-content h3 {
    margin: .15rem 2rem .05rem 0;
    color: var(--wms-primary-dark);
    font-size: 1.35rem;
}

.wms-map-detail-content > p {
    margin-bottom: .8rem;
    font-size: .7rem;
    overflow-wrap: anywhere;
}

.wms-map-detail-state {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .65rem;
    border-radius: 10px;
    background: #f8fafc;
    font-size: .72rem;
}

.wms-map-detail-state > span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
}

.wms-map-detail-state[data-state="OCCUPIED"] > span { background: #22c55e; }
.wms-map-detail-state[data-state="FULL"] > span { background: #ef4444; }
.wms-map-detail-state[data-state="WARNING"] > span { background: #f59e0b; }
.wms-map-detail-state[data-state="INACTIVE"] > span { background: #64748b; }

.wms-map-detail-list {
    margin: .8rem 0;
}

.wms-map-detail-list > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: .48rem 0;
    border-bottom: 1px solid var(--wms-border-soft);
}

.wms-map-detail-list > div:last-child { border-bottom: 0; }
.wms-map-detail-list dt, .wms-map-detail-list dd { margin: 0; font-size: .69rem; }
.wms-map-detail-list dt { color: var(--wms-muted); font-weight: 600; }
.wms-map-detail-list dd { color: var(--wms-text); font-weight: 800; text-align: right; }

.wms-map-card:fullscreen {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #fff;
}

.wms-map-card:fullscreen .wms-map-workspace,
.wms-map-card:fullscreen .wms-map-stage {
    min-height: 0;
    flex: 1;
    height: auto;
}

@media (max-width: 1199.98px) {
    .wms-map-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wms-map-summary > div { border-bottom: 1px solid var(--wms-border-soft); }
    .wms-map-stage { min-height: 650px; }
}

@media (max-width: 767.98px) {
    .wms-map-summary { grid-template-columns: 1fr 1fr; }
    .wms-map-summary > div { padding: .7rem; }
    .wms-map-toolbar { align-items: stretch; flex-direction: column; }
    .wms-map-toolbar-group { width: 100%; flex-wrap: wrap; }
    .wms-map-toolbar-group.ms-auto { margin-left: 0 !important; }
    .wms-map-toolbar .btn { flex: 1; }
    .wms-map-stage { height: 70vh; min-height: 520px; }
    .wms-map-detail { top: auto; bottom: 12px; right: 12px; width: calc(100% - 24px); max-height: 52%; }
}

/* Phase 1.7A.L004 - on-demand stock detail inside the map drawer. */
.wms-map-detail {
    width: min(410px, calc(100% - 32px));
}

/* Phase 1.7A.L005
   Keep Detail Lokasi attached to the viewport on desktop.
   The old absolute positioning was anchored to the top of the very tall map
   workspace, so after the operator scrolled down and clicked a lower tile the
   drawer could open above the visible viewport. */
@media (min-width: 768px) {
    .wms-map-detail {
        position: fixed;
        z-index: 1080;
        top: 92px;
        right: 24px;
        bottom: auto;
        width: min(410px, calc(100vw - 48px));
        max-height: calc(100vh - 116px);
    }
}

@media (max-width: 767.98px) {
    .wms-map-detail {
        position: fixed;
        z-index: 1080;
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
        max-height: min(70vh, 640px);
    }
}

.wms-map-inventory {
    margin: .9rem 0;
    padding-top: .85rem;
    border-top: 1px solid var(--wms-border-soft);
}

.wms-map-inventory-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}

.wms-map-inventory-head h4 {
    margin: .08rem 0 0;
    color: var(--wms-primary-dark);
    font-size: .84rem;
    font-weight: 800;
}

.wms-map-inventory-head > small {
    color: var(--wms-muted);
    font-size: .64rem;
    font-weight: 700;
    white-space: nowrap;
}

.wms-map-stock-loading,
.wms-map-stock-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 62px;
    padding: .7rem;
    border: 1px dashed var(--wms-border-soft);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--wms-muted);
    font-size: .7rem;
    text-align: center;
}

.wms-map-stock-message.is-error {
    border-color: rgba(239, 68, 68, .28);
    background: rgba(254, 242, 242, .92);
    color: #b91c1c;
}

.wms-map-stock-list {
    display: grid;
    gap: .65rem;
}

.wms-map-stock-card {
    padding: .72rem;
    border: 1px solid var(--wms-border-soft);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .04);
}

.wms-map-stock-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .65rem;
}

.wms-map-stock-card-head > div {
    min-width: 0;
}

.wms-map-stock-card-head strong,
.wms-map-stock-card-head span {
    display: block;
}

.wms-map-stock-card-head strong {
    color: var(--wms-primary-dark);
    font-size: .76rem;
    overflow-wrap: anywhere;
}

.wms-map-stock-card-head > div > span {
    margin-top: .12rem;
    color: var(--wms-text);
    font-size: .68rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.wms-map-stock-status {
    flex: 0 0 auto;
    padding: .18rem .42rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.wms-map-stock-status[data-status="HOLD"],
.wms-map-stock-status[data-status="BLOCKED"] {
    background: #fff7ed;
    color: #c2410c;
}

.wms-map-stock-status[data-status="NG"] {
    background: #fef2f2;
    color: #b91c1c;
}

.wms-map-stock-spec {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: .45rem;
    margin-top: .55rem;
    padding: .45rem .5rem;
    border-radius: 8px;
    background: #f8fafc;
    font-size: .65rem;
}

.wms-map-stock-spec span {
    color: var(--wms-muted);
    font-weight: 600;
}

.wms-map-stock-spec strong {
    color: var(--wms-text);
    overflow-wrap: anywhere;
}

.wms-map-stock-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem .65rem;
    margin-top: .55rem;
}

.wms-map-stock-meta > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding-bottom: .28rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: .63rem;
}

.wms-map-stock-meta span {
    color: var(--wms-muted);
}

.wms-map-stock-meta strong {
    color: var(--wms-text);
    text-align: right;
}

.wms-map-stock-foot,
.wms-map-stock-warning {
    margin-top: .45rem;
    font-size: .61rem;
}

.wms-map-stock-foot {
    color: var(--wms-muted);
}

.wms-map-stock-warning {
    padding: .35rem .45rem;
    border-radius: 7px;
    background: #fffbeb;
    color: #a16207;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .wms-map-detail {
        max-height: 64%;
        border-radius: 16px 16px 10px 10px;
    }

    .wms-map-stock-meta {
        grid-template-columns: 1fr;
    }
}


/* Phase 1.7A.L006 - viewport portal for Detail Lokasi.
   The drawer is moved under <body> by warehouse-map.js on normal pages,
   eliminating clipping/stacking-context issues from the map workspace/card. */
body > .wms-map-detail {
    position: fixed !important;
    z-index: 2147483000 !important;
    top: 92px !important;
    right: 24px !important;
    bottom: auto !important;
    left: auto !important;
    width: min(410px, calc(100vw - 48px)) !important;
    max-height: calc(100vh - 116px) !important;
    overflow: auto;
}

#warehouse-map > .wms-map-detail.is-map-fullscreen {
    position: fixed !important;
    z-index: 2147483000 !important;
    top: 16px !important;
    right: 16px !important;
    bottom: auto !important;
    left: auto !important;
    width: min(410px, calc(100vw - 32px)) !important;
    max-height: calc(100vh - 32px) !important;
}

@media (max-width: 767.98px) {
    body > .wms-map-detail,
    #warehouse-map > .wms-map-detail.is-map-fullscreen {
        top: auto !important;
        right: 12px !important;
        bottom: 12px !important;
        left: 12px !important;
        width: auto !important;
        max-height: min(70vh, 640px) !important;
    }
}

/* Phase 1.7A.L008 - material finder on the warehouse map. */
.wms-map-filter-hint {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: .45rem;
    color: var(--wms-muted);
    font-size: .68rem;
    line-height: 1.35;
}

.wms-map-material-picker {
    position: relative;
}

.wms-map-material-suggestions {
    position: absolute;
    z-index: 1095;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: 330px;
    overflow-y: auto;
    padding: .35rem;
    border: 1px solid var(--wms-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
}

.wms-map-material-suggestion {
    display: block;
    width: 100%;
    padding: .58rem .62rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--wms-text);
    text-align: left;
}

.wms-map-material-suggestion:hover,
.wms-map-material-suggestion:focus {
    background: var(--wms-primary-soft);
    outline: none;
}

.wms-map-material-suggestion + .wms-map-material-suggestion {
    margin-top: .1rem;
}

.wms-map-material-suggestion > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}

.wms-map-material-suggestion strong,
.wms-map-material-suggestion span,
.wms-map-material-suggestion small {
    display: block;
}

.wms-map-material-suggestion strong {
    color: var(--wms-primary-dark);
    font-size: .72rem;
    overflow-wrap: anywhere;
}

.wms-map-material-suggestion > div small {
    flex: 0 0 auto;
    color: var(--wms-primary);
    font-size: .58rem;
    font-weight: 800;
}

.wms-map-material-suggestion > span {
    margin-top: .12rem;
    font-size: .67rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.wms-map-material-suggestion > small {
    margin-top: .14rem;
    color: var(--wms-muted);
    font-size: .59rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.wms-map-material-suggestion-empty {
    padding: .75rem .65rem;
    color: var(--wms-muted);
    font-size: .66rem;
    text-align: center;
}

.wms-map-material-suggestion-empty.is-error {
    color: #b91c1c;
}

.wms-map-material-legend i {
    background: #e0f2fe !important;
    border: 2px solid #0284c7 !important;
}

.wms-map-material-focus {
    display: grid;
    grid-template-columns: minmax(210px, .9fr) minmax(260px, 1.4fr) auto;
    gap: .8rem 1rem;
    align-items: center;
    padding: .72rem .9rem;
    border-bottom: 1px solid #bae6fd;
    background: linear-gradient(90deg, #f0f9ff 0%, #fff 72%);
}

.wms-map-material-focus[hidden] {
    display: none !important;
}

.wms-map-material-focus-main strong,
.wms-map-material-focus-main span,
.wms-map-material-focus-main small {
    display: block;
}

.wms-map-material-focus-main strong {
    margin-top: .04rem;
    color: #075985;
    font-size: .82rem;
}

.wms-map-material-focus-main > span:not(.wms-section-kicker) {
    margin-top: .08rem;
    color: var(--wms-text);
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.35;
}

.wms-map-material-focus-main small {
    margin-top: .08rem;
    color: var(--wms-muted);
    font-size: .6rem;
    line-height: 1.3;
}

.wms-map-material-focus-totals {
    display: flex;
    flex-wrap: wrap;
    gap: .28rem;
    align-items: center;
    margin-top: .38rem;
}

.wms-map-material-focus-totals[hidden] { display: none !important; }

.wms-map-material-focus-totals > span {
    color: var(--wms-muted);
    font-size: .58rem;
    font-weight: 700;
}

.wms-map-material-focus-totals > strong {
    display: inline-flex;
    padding: .18rem .42rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: .59rem;
    line-height: 1.2;
}

.wms-map-material-focus-locations > strong {
    display: block;
    margin-bottom: .35rem;
    color: #0369a1;
    font-size: .69rem;
}

.wms-map-material-location-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

.wms-map-material-location-chip {
    padding: .23rem .48rem;
    border: 1px solid #7dd3fc;
    border-radius: 999px;
    background: #fff;
    color: #075985;
    font-size: .61rem;
    font-weight: 800;
}

.wms-map-material-location-chip:hover,
.wms-map-material-location-chip:focus,
.wms-map-material-location-chip.is-active {
    border-color: #0284c7;
    background: #e0f2fe;
    outline: none;
}

.wms-map-material-location-chip.is-active {
    box-shadow: 0 0 0 2px rgba(2, 132, 199, .16);
    color: #0c4a6e;
}

.wms-map-material-unmapped {
    display: inline-flex;
    align-items: center;
    padding: .23rem .45rem;
    color: var(--wms-muted);
    font-size: .58rem;
}

.wms-map-location.is-material-match .wms-map-location-shape {
    stroke: #0284c7;
    stroke-width: 4;
    opacity: 1;
    filter: drop-shadow(0 0 3.4px rgba(2, 132, 199, .82));
}

.wms-map-location.is-material-match.is-selected .wms-map-location-shape {
    stroke: #075985;
    stroke-width: 4.6;
    filter: drop-shadow(0 0 4.2px rgba(3, 105, 161, .9));
}

.wms-map-location.is-material-pulse .wms-map-location-shape {
    animation: wms-map-material-pulse .8s ease-out 2;
}

@keyframes wms-map-material-pulse {
    0% { stroke-width: 4; filter: drop-shadow(0 0 2px rgba(2, 132, 199, .5)); }
    50% { stroke-width: 5.6; filter: drop-shadow(0 0 7px rgba(14, 165, 233, .95)); }
    100% { stroke-width: 4; filter: drop-shadow(0 0 3.4px rgba(2, 132, 199, .82)); }
}

.wms-map-location.is-material-match .wms-map-location-label {
    fill: #082f49;
}

.wms-map-material-focus-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .38rem;
    justify-content: flex-end;
}

.wms-map-material-focus-actions .btn {
    white-space: nowrap;
}

.wms-map-card.is-overview-expanded .wms-map-workspace {
    min-height: 860px;
}

@media (prefers-reduced-motion: reduce) {
    .wms-map-stage { transition: none; }
    .wms-map-location.is-material-pulse .wms-map-location-shape { animation: none; }
}

@media (max-width: 991.98px) {
    .wms-map-material-focus {
        grid-template-columns: 1fr auto;
    }

    .wms-map-material-focus-locations {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .wms-map-material-focus-actions {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 575.98px) {
    .wms-map-material-focus {
        grid-template-columns: 1fr;
    }

    .wms-map-material-focus-locations {
        grid-column: auto;
        grid-row: auto;
    }

    .wms-map-material-focus-actions {
        grid-column: auto;
        grid-row: auto;
        justify-content: stretch;
    }

    .wms-map-material-focus-actions .btn {
        flex: 1 1 100%;
        width: 100%;
    }
}

.wms-map-filter-card {
    overflow: visible;
}
