/*! Copyright (c) 2025-2026 Markus Schüssler. All rights reserved.
 * SPDX-License-Identifier: LicenseRef-Markus-Schuessler-Proprietary; see repository LICENSE.
 */
/* A mode toolbar is one segmented button group, including its fullscreen action. */
:is(.ol-map-view-switch,.xc-planner__map-mode,.task-replay-layers__mode) { display:inline-flex; align-items:center; gap:0; padding:0; border:1px solid var(--ui-color-border); border-radius:var(--ui-radius-md,6px); color:var(--ui-color-text); background:var(--ui-color-surface); box-shadow:none; backdrop-filter:none; }
.ol-map-view-switch > button,
.xc-planner__map-mode > .ol-map-view-switch__button,
.task-replay-layers__mode > button { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; flex:none; min-width:44px; height:44px; min-height:44px; margin:0; padding:0 12px; border:0; border-radius:0; color:var(--ui-color-text-muted); background:transparent; box-shadow:none; backdrop-filter:none; font:600 14px/1 var(--ui-font-family,Barlow,sans-serif); cursor:pointer; }
:is(.ol-map-view-switch,.xc-planner__map-mode,.task-replay-layers__mode) > button:not([hidden]) ~ button:not([hidden]) { border-left:1px solid var(--ui-color-border); }
:is(.ol-map-view-switch,.xc-planner__map-mode,.task-replay-layers__mode) > button:first-child { border-radius:var(--ui-radius-md,6px) 0 0 var(--ui-radius-md,6px); }
:is(.ol-map-view-switch,.xc-planner__map-mode,.task-replay-layers__mode) > button:last-child { border-radius:0 var(--ui-radius-md,6px) var(--ui-radius-md,6px) 0; }
:is(.ol-map-view-switch,.xc-planner__map-mode,.task-replay-layers__mode) > [hidden] { display:none!important; }
:is(.ol-map-view-switch,.xc-planner__map-mode,.task-replay-layers__mode) > select { min-height:44px; }
:is(.ol-map-view-switch,.xc-planner__map-mode,.task-replay-layers__mode) > button:hover:not(:disabled) { background:var(--ui-color-surface-hover); }
:is(.ol-map-view-switch,.xc-planner__map-mode,.task-replay-layers__mode) > button:is(.is-active,[aria-pressed="true"]) { color:var(--flight-map-control-active,var(--ui-color-success)); background:var(--ui-color-surface-hover); }
:is(.ol-map-view-switch,.xc-planner__map-mode,.task-replay-layers__mode) > button:focus-visible { outline:2px solid var(--ui-color-primary); outline-offset:-2px; }

/* Equivalent tools share a surface without changing which tools each map offers. */
.map-controls-layout :is(.flightmap-v2-map-control,.task-replay-layers__control,.replay-weather__toggle),
body.layout-default .analyzer-map-controls .analyzer-map-control,
.live-tracking .flightmap-v2-map-controls .flightmap-v2-map-control,
.xc-planner .xc-planner__map-control { box-sizing:border-box; width:44px; min-width:44px; height:44px; min-height:44px; border:1px solid var(--ui-color-border); border-radius:var(--ui-radius-md,6px); color:var(--ui-color-text-muted); background:var(--ui-color-surface); box-shadow:none; backdrop-filter:none; }
.map-controls-layout :is(.flightmap-v2-map-control,.task-replay-layers__control,.replay-weather__toggle):hover:not(:disabled),
body.layout-default .analyzer-map-controls .analyzer-map-control:hover:not(:disabled),
.live-tracking .flightmap-v2-map-controls .flightmap-v2-map-control:hover:not(:disabled),
.xc-planner .xc-planner__map-control:hover:not(:disabled) { background:var(--ui-color-surface-hover); }
.map-controls-layout :is(.flightmap-v2-map-control,.task-replay-layers__control,.replay-weather__toggle):is(.is-active,[aria-pressed="true"],[aria-expanded="true"],[data-active="true"]),
body.layout-default .analyzer-map-controls .analyzer-map-control:is(.is-active,[aria-pressed="true"],[aria-expanded="true"]),
.live-tracking .flightmap-v2-map-controls .flightmap-v2-map-control:is(.is-active,[aria-pressed="true"],[aria-expanded="true"]),
.xc-planner .xc-planner__map-control:is(.is-active,[aria-pressed="true"],[aria-expanded="true"]),
.task-replay-layers .task-replay-layers__control:is(.is-active,[aria-pressed="true"],[aria-expanded="true"]) { border-color:var(--ui-color-border); color:var(--flight-map-control-active,var(--ui-color-success)); background:var(--ui-color-surface-hover); }
.task-replay-layers .task-replay-layers__control[data-layer-error="true"] { color:var(--ui-color-warning); }
.map-controls-layout :is(.flightmap-v2-map-control,.task-replay-layers__control,.replay-weather__toggle):focus-visible,
body.layout-default .analyzer-map-controls .analyzer-map-control:focus-visible,
.live-tracking .flightmap-v2-map-controls .flightmap-v2-map-control:focus-visible,
.xc-planner .xc-planner__map-control:focus-visible { outline:2px solid var(--ui-color-primary); outline-offset:2px; }
body.layout-default :is(.analyzer-map-menu,.analyzer-color-menu),
.live-tracking .flightmap-v2-map-menu,
.xc-planner .xc-planner__map-menu,
.task-replay-layers .task-replay-layers__panel { border:1px solid var(--ui-color-border); border-radius:var(--ui-radius-md,6px); color:var(--ui-color-text); background:var(--ui-color-surface); box-shadow:var(--ui-shadow-overlay); backdrop-filter:none; }

/* Keep the SDK's information icon at 24px inside an unobstructed 44px target. */
.maplibregl-map .maplibregl-ctrl-attrib.maplibregl-compact { box-sizing:border-box; min-width:44px; min-height:44px; border-radius:var(--ui-radius-md,6px); }
.maplibregl-map .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) { width:44px; height:44px; padding:0; border:0; background:transparent; box-shadow:none; }
.maplibregl-map .maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button { box-sizing:border-box; width:44px; min-width:44px; height:44px; min-height:44px; margin:0; padding:10px; border:0; border-radius:16px; background-color:#fff; background-clip:content-box; background-origin:content-box; background-position:center; background-repeat:no-repeat; background-size:24px; box-shadow:none; }
.maplibregl-map .maplibregl-ctrl-attrib.maplibregl-compact-show { padding:8px 44px 8px 8px; color:var(--ui-color-text); background:var(--ui-color-surface); }
.maplibregl-map :is(.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-top-left) > .maplibregl-ctrl-attrib.maplibregl-compact-show { padding:8px 8px 8px 44px; }
.maplibregl-map .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner { overflow-wrap:anywhere; }
.maplibregl-map .maplibregl-ctrl-attrib.maplibregl-compact-show a { color:var(--ui-color-primary-strong); text-decoration:underline; }
.maplibregl-map .maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button:focus-visible { outline:2px solid var(--ui-color-primary); outline-offset:-2px; }
