.map-mode-notice {
    --map-notice-accent: #2563eb;
    position: fixed;
    top: calc(var(--header-height, 2.75rem) + 1.25rem);
    left: 50%;
    z-index: 1200;
    display: grid;
    width: min(440px, calc(100vw - 32px));
    grid-template-columns: 38px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    padding: 10px 10px 11px 12px;
    border: 1px solid color-mix(in srgb, var(--map-notice-accent) 38%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--app-surface, #fff) 94%, transparent);
    color: var(--app-text, #172033);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .22);
    backdrop-filter: blur(12px);
    transform: translate(-50%, 0);
    animation: map-mode-notice-enter .22s ease-out both;
}

.map-mode-notice--installation { --map-notice-accent: #d97706; }
.map-mode-notice--success { --map-notice-accent: #16a34a; }
.map-mode-notice--error { --map-notice-accent: #dc2626; }
.map-mode-notice--warning { --map-notice-accent: #d97706; }
.map-mode-notice--info { --map-notice-accent: #0284c7; }

.map-mode-notice__icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--map-notice-accent) 14%, transparent);
    color: var(--map-notice-accent);
    font-size: 1.35rem;
}

.map-mode-notice__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.25;
}

.map-mode-notice__title { font-size: .9rem; }
.map-mode-notice__message { margin-top: 2px; color: var(--app-muted, #64748b); font-size: .76rem; }

.map-mode-notice__close {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--app-muted, #64748b);
    font-size: 1.3rem;
    line-height: 1;
}

.map-mode-notice__close:hover,
.map-mode-notice__close:focus-visible {
    background: color-mix(in srgb, var(--map-notice-accent) 10%, transparent);
    color: var(--map-notice-accent);
}

.map-mode-notice__timer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--map-notice-accent);
    transform-origin: left;
    animation: map-mode-notice-timer 5.0s linear forwards;
}

.map-mode-notice.is-leaving {
    pointer-events: none;
    animation: map-mode-notice-leave .2s ease-in forwards;
}

@keyframes map-mode-notice-enter {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes map-mode-notice-leave {
    to { opacity: 0; transform: translate(-50%, -8px); }
}

@keyframes map-mode-notice-timer {
    to { transform: scaleX(0); }
}

@media (max-width: 767.98px) {
    .map-mode-notice {
        top: calc(var(--header-height, 2.75rem) + .65rem);
        width: min(390px, calc(100vw - 20px));
        grid-template-columns: 34px minmax(0, 1fr) 28px;
        padding: 8px 8px 9px 10px;
    }

    .map-mode-notice__icon { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    .map-mode-notice,
    .map-mode-notice__timer,
    .map-mode-notice.is-leaving { animation: none; }
}
