﻿.map-column {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 350px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
    position: relative;
    z-index: 0;
}

.map-container {
    flex: 1;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    height: 100%;
    width: 100%;
    padding: 50px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    position: relative;
    background: transparent;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    cursor: default;
    touch-action: none;
}

.map-image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    height: 100%;
    width: auto;
    object-fit: contain;
    transform: scale(var(--zoom, 1)) translate(var(--pan-x, 0px), var(--pan-y, 0px));
    transform-origin: center;
}

.map-image {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    z-index: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

    .map-image.loaded {
        opacity: 1;
    }

    .map-image.dimmed {
        opacity: 0.333;
    }

.map-pin,
.map-pin-wrapper,
.link-label {
    position: absolute;
    transform: translate(-50%, -50%);
    transition: filter 0.2s ease, opacity 0.2s ease;
    z-index: 2;
}

    .map-pin:hover,
/*    .map-pin.highlight,*/
    .map-pin-wrapper:hover,
/*    .map-pin-wrapper.highlight,*/
    .link-label:hover {
        z-index: 3;
    }

    .map-pin.dimmed,
    .map-pin-wrapper.dimmed .map-pin {
        animation: none !important;
        opacity: 0.2;
    }

.map-pin {
    width: auto;
    height: 30px;
    filter: drop-shadow(0 0 2px steelblue);
}

    .map-pin.boss-pin {
        width: 75px;
        height: 75px;
    }

    .map-pin:hover,
    .map-pin.highlight {
        animation: rgbShiftPulse 2s linear infinite;
        transform-origin: center;
    }

    .map-pin.glitch-pin {
        animation: rgbShift 3s linear infinite;
    }

        .map-pin.glitch-pin.glitch-selected {
            animation: rgbShiftPulse 2s linear infinite;
        }

        .map-pin.glitch-pin.glitch-inactive {
            animation: none;
            filter: drop-shadow(0 0 2px steelblue) brightness(0.6);
        }

.map-pin-wrapper .pin-label,
.map-pin-wrapper .chest-label {
    position: absolute;
    left: 65%;
    transform: translateY(50%);
    color: #fff;
    border-radius: 0.25rem;
    opacity: 0;
    width: auto;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 9999;
}

.map-pin-wrapper .pin-label {
    top: -1.6em;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.75);
    white-space: nowrap;
}

.map-pin-wrapper .chest-label {
    top: -3rem;
    width: 75px;
    padding: 0.25rem 0.5rem;
    font-size: 0.6rem;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    gap: 0.25rem;
    z-index: 9999;
}

/*.pin-label.highlight,*/
/*.chest-label.highlight,*/
.map-pin-wrapper:hover .pin-label,
.map-pin-wrapper:hover .chest-label {
    opacity: 1;
}

.map-image-wrapper:has(.pin-anchor:hover) .pin-anchor:not(:hover) .map-pin {
    animation: none !important;
    opacity: 0.4;
}

.zoom-controls {
    position: absolute;
    top: 14px;
    right: 350px;
    z-index: 10;
    display: flex;
    gap: 4px;
}

.zoom-button {
    width: auto;
    min-width: 28px;
    height: 28px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    cursor: pointer;
}

.link-label {
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    width: 120px;
    border-radius: 10px;
    font-size: 0.85rem;
    padding: 0.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

    .link-label span {
        padding: 0.2rem;
    }

    .link-label:hover {
        filter: drop-shadow(0 0 2px black);
        transform: translate(-50%, -50%) scale(1.3);
    }

.pin-anchor {
    position: absolute;
    width: 0;
    height: 0;
}

.pin-scale {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    transform: scale(calc(1 / var(--zoom, 1)));
    transform-origin: 0 0;
}

.map-pin,
.map-pin-wrapper,
.link-label {
    left: 0;
    top: 0;
}

.map-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    max-width: 250px;
    padding: 0.35rem 0.6rem;
    border-radius: 0.3rem;
    font-size: 0.8rem;
    white-space: wrap;
    text-align: center;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.1s ease;
}

.tooltip-row.detail {
    margin-left: 1.5rem;
}

@keyframes rgbShift {
    0% {
        filter: drop-shadow(0 0 5px hsl(0, 100%, 75%));
    }

    16.67% {
        filter: drop-shadow(0 0 5px hsl(60, 100%, 75%));
    }

    33.33% {
        filter: drop-shadow(0 0 5px hsl(120, 100%, 75%));
    }

    50% {
        filter: drop-shadow(0 0 5px hsl(180, 100%, 75%));
    }

    66.67% {
        filter: drop-shadow(0 0 5px hsl(240, 100%, 75%));
    }

    83.33% {
        filter: drop-shadow(0 0 5px hsl(300, 100%, 75%));
    }

    100% {
        filter: drop-shadow(0 0 5px hsl(360, 100%, 75%));
    }
}

@keyframes rgbShiftPulse {
    0% {
        filter: drop-shadow(0 0 5px hsl(0, 100%, 75%));
        transform: translate(-50%, -50%) scale(1);
    }

    16.67% {
        filter: drop-shadow(0 0 5px hsl(60, 100%, 75%));
    }

    33.33% {
        filter: drop-shadow(0 0 5px hsl(120, 100%, 75%));
    }

    50% {
        filter: drop-shadow(0 0 5px hsl(180, 100%, 75%));
        transform: translate(-50%, -50%) scale(1.3);
    }

    66.67% {
        filter: drop-shadow(0 0 5px hsl(240, 100%, 75%));
    }

    83.33% {
        filter: drop-shadow(0 0 5px hsl(300, 100%, 75%));
    }

    100% {
        filter: drop-shadow(0 0 5px hsl(360, 100%, 75%));
        transform: translate(-50%, -50%) scale(1);
    }
}