/**
 * VixViu map Projects CSS
 * Visual styling and map surface layers.
 * Loaded in admin and frontend (after vixviu-map.css on frontend).
 */

.vixviu-map-wrapper {
    background: transparent;
}

.vixviu-map-bg-full,
.vixviu-map-bg-inner {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.vixviu-map-bg-full {
    z-index: 0;
}

.vixviu-map-bg-inner {
    z-index: 1;
}

.vixviu-map-svg {
    position: relative;
    z-index: 2;
}

.vixviu-map-svg .vixviu-map-bg-behind {
    pointer-events: none;
}

.vixviu-map-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
}

.vixviu-map-bg-full-mode-static .vixviu-map-bg-full {
    background-attachment: scroll;
}

.vixviu-map-bg-full-mode-fixed .vixviu-map-bg-full {
    background-attachment: fixed;
}

.vixviu-map-bg-full-mode-parallax .vixviu-map-bg-full {
    transform: scale(1.08);
    opacity: 0.9;
}

.vixviu-map-bg-full-mode-drift .vixviu-map-bg-full {
    animation: vixviuMapBackgroundDrift 24s ease-in-out infinite;
}

.vixviu-map-bg-full-mode-cinematic .vixviu-map-bg-full {
    transform: scale(1.08);
    opacity: 0.82;
    filter: blur(2px);
    animation: vixviuMapBackgroundDrift 32s ease-in-out infinite;
}

@keyframes vixviuMapBackgroundDrift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(-1.5%, -1%, 0) scale(1.04); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .vixviu-map-bg-full-mode-drift .vixviu-map-bg-full,
    .vixviu-map-bg-full-mode-cinematic .vixviu-map-bg-full {
        animation: none;
    }
}

.vixviu-map-wrapper .vixviu-map-refresh-btn.button.small {
    border-radius: 8px;
    padding: 8px 12px;
    min-height: 34px;
    line-height: 1.1;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0;
    border: 1.5px solid #d1d5db;
    background: #fff;
    color: #374151;
    box-shadow: none;
    cursor: pointer;
}

.vixviu-map-wrapper .vixviu-map-refresh-btn.button.small:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.vixviu-map-freshness {
    font-size: 12px;
    color: #444;
}

.vixviu-map-freshness.is-stale {
    color: #b71c1c;
}

.vixviu-map-svg path {
    fill: #dcdcdc;
    cursor: default;
    stroke: #ffffff;
    stroke-width: 1;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    transition: fill 0.2s ease, stroke 0.2s ease, stroke-width 0.2s ease;
}

.vixviu-map-svg path.vixviu-map-region {
    stroke: #a0a0a0;
    stroke-width: 1;
}

.vixviu-map-svg path.vixviu-map-region--active {
    fill: #b4e6b6;
    cursor: pointer;
}

.vixviu-map-svg path.vixviu-map-region--demand {
    fill: #ff9800;
    cursor: pointer;
}

.vixviu-map-svg path.vixviu-map-region--inactive {
    fill: #dcdcdc;
    cursor: default;
}

.vixviu-map-wrapper .vixviu-map-svg path.vixviu-map-region--active:hover,
.vixviu-map-wrapper .vixviu-map-svg path.vixviu-map-region--demand:hover {
    fill: #777777;
}

.vixviu-map-wrapper .vixviu-map-svg path.vixviu-map-region--active.active,
.vixviu-map-wrapper .vixviu-map-svg path.vixviu-map-region--demand.active {
    fill: #9ccd9f;
}

.vixviu-map-region-list .vixviu-map-location {
    cursor: pointer;
}

.vixviu-map-list-empty,
.vixviu-map-list-loading {
    margin: 0;
    font-size: 0.9em;
    color: #555;
}

.vixviu-map-wrapper.vixviu-map-error .vixviu-map-error-banner {
    margin-bottom: 0.5em;
    padding: 0.35em 0.5em;
    font-size: 0.85em;
    background: #ffebee;
    color: #b71c1c;
    border-radius: 2px;
}

#vixviu-map-projects-write-status {
    margin: 0;
    font-size: 13px;
}

#vixviu-map-projects-write-status.vixviu-core-status-success {
    color: inherit;
}

#vixviu-map-projects-write-status.vixviu-core-status-error {
    color: inherit;
}
