.fleet-map-container {
    width: 100% !important;
    max-width: 100%;
    height: 70vh;
    min-height: 420px;
}

.fleet-map-container .leaflet-container {
    width: 100% !important;
    height: 100% !important;
}

.fleet-map-wrapper:fullscreen,
.fleet-map-wrapper:-webkit-full-screen {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    background: var(--fi-body-bg, #fff);
}

.fleet-map-wrapper:fullscreen .fleet-map-container,
.fleet-map-wrapper:-webkit-full-screen .fleet-map-container {
    flex: 1 1 auto;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
}

.fleet-map-wrapper:fullscreen .leaflet-container,
.fleet-map-wrapper:-webkit-full-screen .leaflet-container {
    width: 100% !important;
    height: 100% !important;
}

.fleet-map-overlay-toolbar {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.5rem;
    pointer-events: none;
}

.fleet-map-layer-control-group {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 0;
    max-width: min(100%, 720px);
    pointer-events: auto;
}

.fleet-map-layer-control {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: min(280px, 100%);
    pointer-events: auto;
}

.fleet-map-layer-panel {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.5rem 0.625rem 0.625rem;
    border-radius: 0.5rem;
}

.fleet-map-layer-panel__label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.65;
}

.fleet-map-control-surface {
    background-color: #ffffff;
    color: #09090b;
    border: 1px solid #e4e4e7;
}

.dark .fleet-map-control-surface {
    background-color: #09090b;
    color: #ffffff;
    border-color: #27272a;
}

.fleet-map-layer-dropdown {
    position: relative;
    width: 100%;
    min-width: 11rem;
}

.fleet-map-layer-dropdown__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.25rem;
    padding: 0.4375rem 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: inherit;
    background-color: rgb(0 0 0 / 0.04);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.dark .fleet-map-layer-dropdown__trigger {
    background-color: rgb(255 255 255 / 0.06);
    border-color: rgb(255 255 255 / 0.1);
}

.fleet-map-layer-dropdown__trigger:hover {
    background-color: rgb(0 0 0 / 0.07);
    border-color: rgb(0 0 0 / 0.12);
}

.dark .fleet-map-layer-dropdown__trigger:hover {
    background-color: rgb(255 255 255 / 0.1);
    border-color: rgb(255 255 255 / 0.16);
}

.fleet-map-layer-dropdown__trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #00a7e1;
}

.fleet-map-layer-dropdown__value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: start;
}

.fleet-map-layer-dropdown__chevron {
    flex-shrink: 0;
    opacity: 0.65;
    transition: transform 150ms ease;
}

.fleet-map-layer-dropdown__chevron--open {
    transform: rotate(180deg);
}

.fleet-map-layer-dropdown__menu {
    position: absolute;
    top: calc(100% + 0.375rem);
    left: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 12rem;
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.25rem;
    color: #09090b;
    background-color: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    box-shadow: 0 10px 24px rgb(0 0 0 / 0.18);
}

.dark .fleet-map-layer-dropdown__menu {
    color: #ffffff;
    background-color: #09090b;
    border-color: #27272a;
    box-shadow: 0 10px 24px rgb(0 0 0 / 0.45);
}

.fleet-map-layer-dropdown__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: inherit;
    text-align: start;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.fleet-map-layer-dropdown__option:hover {
    background-color: #f4f4f5;
}

.dark .fleet-map-layer-dropdown__option:hover {
    background-color: #18181b;
}

.fleet-map-layer-dropdown__option--selected {
    color: #00a7e1;
}

.fleet-map-layer-dropdown__check {
    flex-shrink: 0;
    color: #00a7e1;
}

.fleet-map-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 9.5rem;
    max-width: min(100%, 220px);
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.25;
}

.fleet-map-legend__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.fleet-map-legend__title {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
}

.fleet-map-legend__unit {
    flex-shrink: 0;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    background: rgb(0 0 0 / 0.06);
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
}

.dark .fleet-map-legend__unit {
    background: rgb(255 255 255 / 0.1);
}

.fleet-map-legend__gradient {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fleet-map-legend__gradient-bar {
    width: 100%;
    height: 0.625rem;
    border-radius: 0.25rem;
    border: 1px solid rgb(0 0 0 / 0.12);
}

.dark .fleet-map-legend__gradient-bar {
    border-color: rgb(255 255 255 / 0.18);
}

.fleet-map-legend__gradient-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    opacity: 0.7;
}

.fleet-map-legend__rows {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fleet-map-legend__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fleet-map-legend__swatch {
    display: block;
    width: 1.25rem;
    height: 0.75rem;
    flex-shrink: 0;
    border: 1px solid rgb(0 0 0 / 0.12);
    border-radius: 2px;
}

.dark .fleet-map-legend__swatch {
    border-color: rgb(255 255 255 / 0.18);
}

.fleet-map-legend__label {
    font-weight: 500;
    font-size: 0.6875rem;
}

.fleet-map-map-actions {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.375rem;
    width: 2.25rem;
    flex-shrink: 0;
    pointer-events: auto;
}

.fleet-map-map-actions .fi-btn.fleet-map-control-surface {
    background-color: #ffffff !important;
    color: #09090b !important;
    box-shadow: none !important;
}

.dark .fleet-map-map-actions .fi-btn.fleet-map-control-surface {
    background-color: #09090b !important;
    color: #ffffff !important;
}

.fleet-map-map-actions .fi-btn.fleet-map-control-surface:hover {
    background-color: #f4f4f5 !important;
}

.dark .fleet-map-map-actions .fi-btn.fleet-map-control-surface:hover {
    background-color: #18181b !important;
}

.fleet-map-map-actions .fi-btn.fleet-map-control-surface > .fi-icon {
    color: currentColor !important;
}

.fleet-map-zoom-control {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
}

.fleet-map-zoom-control > .fi-btn {
    width: 100%;
    border-radius: 0 !important;
    min-height: 2rem;
    padding-inline: 0 !important;
    justify-content: center;
    border: none !important;
}

.fleet-map-zoom-control > .fi-btn + .fi-btn {
    border-top: 1px solid #e4e4e7 !important;
}

.dark .fleet-map-zoom-control > .fi-btn + .fi-btn {
    border-top-color: #27272a !important;
}

.fleet-map-fullscreen-btn {
    width: 100%;
    min-height: 2rem;
    padding-inline: 0 !important;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 0.5rem !important;
}

.fleet-ship-marker {
    background: transparent;
    border: 0;
}

.fleet-ship-marker__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.fleet-ship-marker__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background: #00a7e1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.fleet-ship-marker__icon svg {
    width: 16px;
    height: 16px;
}

.fleet-ship-marker__icon--selected {
    transform: scale(1.08);
}

.fleet-map-container .leaflet-pane.fleetWindVelocityPane canvas,
.fleet-map-container .velocity-overlay {
    z-index: 450 !important;
    pointer-events: none;
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.4));
}

.fleet-map-container .leaflet-control-zoom {
    display: none !important;
}
