/* Dedicated live-map layout. Keeps the map inside the usable viewport on mobile. */
.map-screen{padding-bottom:0!important;overflow:hidden;background:#dce8ec}
.map-content{padding:0!important;height:calc(100dvh - 72px);min-height:0!important;max-width:none!important}
.equii-live-map-wrap{position:relative;width:100%;height:100%;overflow:hidden;background:#dce8ec}
#equii-live-map{position:absolute;inset:0;width:100%;height:100%;z-index:1}
/* Leaflet uses pane z-index values up to ~700. Product controls must sit above them. */
.map-topbar{position:absolute;z-index:1200;top:max(10px,env(safe-area-inset-top));left:12px;right:12px;height:48px;display:flex;align-items:center;justify-content:space-between;pointer-events:none}.map-topbar>*{pointer-events:auto}.map-brand{height:44px;padding:0 14px;background:#fffffff2;border:1px solid #dce9ee;border-radius:22px;box-shadow:0 4px 18px #29333d2b;display:flex;align-items:center;gap:8px;color:var(--navy);font-weight:800;text-decoration:none;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.map-brand .horsemark{color:var(--teal);font-size:22px}.map-avatar{width:44px;height:44px;border-radius:50%;background:#fffffff2;border:1px solid #dce9ee;box-shadow:0 4px 18px #29333d2b;display:grid;place-items:center;color:var(--navy);font-size:12px;font-weight:800;text-decoration:none;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.map-toolbar{position:absolute;z-index:1190;top:70px;left:14px;right:14px;display:grid;grid-template-columns:minmax(0,1fr) auto 46px;gap:8px;align-items:center;pointer-events:none}
.map-toolbar>*{pointer-events:auto}
.map-horse-picker{position:relative;min-width:0;height:46px;background:#fff;border-radius:23px;box-shadow:0 4px 18px #29333d2b;display:flex;align-items:center;padding-left:13px;overflow:hidden}
.map-horse-picker:before{display:none}
.map-horse-picker select{appearance:none;-webkit-appearance:none;border:0;background:transparent;margin:0;padding:0 28px 0 8px;min-height:46px;width:100%;font:700 13px/1.2 inherit;color:var(--navy);outline:0;white-space:nowrap;text-overflow:ellipsis}
.map-horse-picker:after{content:'⌄';position:absolute;right:12px;top:12px;font-size:16px;color:#6a8291;pointer-events:none}
.map-type-switch{height:46px;border-radius:23px;background:#fff;box-shadow:0 4px 18px #29333d2b;padding:4px;display:flex;align-items:center}
.map-type-switch button{height:38px;border:0;background:transparent;border-radius:19px;padding:0 12px;color:#557080;font:700 12px/1 inherit;cursor:pointer}
.map-type-switch button.active{background:#e6f3f6;color:var(--teal)}
.map-centre-button{width:46px;height:46px;border:0;border-radius:50%;background:#fff;color:var(--navy);box-shadow:0 4px 18px #29333d2b;font-size:22px;display:grid;place-items:center;cursor:pointer}
.map-status-sheet{position:absolute;z-index:1190;left:12px;right:12px;bottom:12px;min-height:76px;background:#fff;border:1px solid #dce9ee;border-radius:20px;box-shadow:0 8px 30px #29333d30;padding:11px 13px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;text-decoration:none;color:var(--navy)}
.map-status-icon{width:42px;height:42px;border-radius:13px;background:#e7f4f6;color:var(--teal);display:grid;place-items:center;font-size:23px}
.map-status-copy{min-width:0}.map-status-title{display:flex;align-items:center;gap:7px;min-width:0}.map-status-title b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.map-status-dot{width:7px;height:7px;border-radius:50%;background:#97a8b2;flex:none}.map-status-dot.online{background:var(--green)}.map-status-dot.offline{background:var(--amber)}
.map-status-primary{font-size:12px;color:#496779;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.map-status-secondary{font-size:11px;color:var(--muted);margin-top:2px;white-space:normal;line-height:1.35}.map-status-chevron{font-size:28px;color:#67818f;padding:0 2px}
.map-empty-note{position:absolute;z-index:1180;left:50%;top:50%;transform:translate(-50%,-50%);background:#fffffff2;border-radius:14px;padding:12px 16px;box-shadow:0 4px 18px #29333d20;font-size:12px;font-weight:700;color:var(--navy);display:none}
.equii-map-marker{background:transparent;border:0}.equii-map-marker>div{width:42px;height:42px;border:3px solid #fff;border-radius:50%;display:grid;place-items:center;background:var(--teal);color:#fff;font-size:22px;box-shadow:0 2px 6px #0005}.equii-map-marker>div.offline{background:#71828b}.equii-map-marker small{display:block;width:max-content;max-width:110px;margin:3px auto 0;background:#fff;color:var(--navy);padding:3px 7px;border-radius:10px;font-size:10px;font-weight:800;box-shadow:0 1px 4px #0004;overflow:hidden;text-overflow:ellipsis}
@media(max-width:380px){.map-topbar{left:10px;right:10px}.map-brand{padding:0 11px}.map-toolbar{grid-template-columns:minmax(0,1fr) auto 42px;gap:6px;left:10px;right:10px}.map-type-switch button{padding:0 9px}.map-centre-button{width:42px;height:42px}.map-horse-picker,.map-type-switch{height:42px}.map-horse-picker select{min-height:42px;font-size:12px}.map-horse-picker:after{top:10px}}
@media(min-width:900px){.map-content{height:100vh}.map-topbar{left:28px;right:28px;top:24px}.map-toolbar{left:28px;right:28px;top:82px;grid-template-columns:220px auto 46px;justify-content:start}.map-centre-button{margin-left:0}.map-status-sheet{left:auto;right:28px;bottom:28px;width:390px}.map-type-switch{justify-self:start}}

.map-picker-avatar{width:30px;height:30px;flex:0 0 30px;border-radius:10px;background:#e7f4f6;color:var(--teal);display:grid;place-items:center;background-size:cover;background-position:center;overflow:hidden;font-size:12px;font-weight:900}
.map-picker-avatar.has-photo{border:1px solid #fff;box-shadow:0 1px 4px #29333d25}
.map-picker-avatar.has-initial{background:#f4e7e9;color:var(--burgundy)}
.map-picker-avatar .equii-device-glyph{width:12px;height:18px;border-width:1.5px;border-radius:4px}
.map-status-icon{background-size:cover;background-position:center;overflow:hidden;font-weight:900}
.map-status-icon.has-photo{border:2px solid #fff;box-shadow:0 2px 7px #29333d24}
.map-status-icon.has-initial{background:#f4e7e9;color:var(--burgundy);font-size:15px}
.map-status-icon .equii-device-glyph{width:16px;height:23px;border-width:1.7px;border-radius:5px}
.map-screen .equii-map-marker>div.has-photo img{width:100%;height:100%;display:block;object-fit:cover;border-radius:50%;transform:none!important}
.map-screen .equii-map-marker .map-marker-fallback{transform:none!important;font-size:14px;font-weight:900;color:#fff}

.map-centre-button .equii-icon{width:24px;height:24px}
.map-picker-avatar .equii-icon{width:17px;height:21px}
.map-status-icon .equii-icon{width:20px;height:25px}
.map-avatar .equii-icon{width:20px;height:20px}
