* {
    box-sizing: border-box;
}

:root {
    --hotspot-size: 16px;
    --hotspot-color: #0ea5e9;
    --hotspot-active: #f59e0b;
    --hs-scale: 1; /* Default scale */
}

/* Hotspot markers */
.hotspot-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    width: calc(52px * var(--hs-scale));
    height: calc(52px * var(--hs-scale));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
    z-index: 10;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hotspot-marker:hover {
    transform: translate(-50%, -50%) scale(1.15);
    z-index: 100;
}

.hotspot-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: pulse-ring 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: none;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.6);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.3);
        opacity: 0;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.hotspot-core {
    position: relative;
    width: calc(32px * var(--hs-scale));
    height: calc(32px * var(--hs-scale));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.hotspot-core span {
    font-size: calc(16px * var(--hs-scale)) !important;
}

/* Tooltip styles */
.hotspot-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 100;
}

.tooltip-arrow {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
}

/* Smooth popup appear */
.popup-enter {
    animation: popup-in 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popup-in {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(6px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Hide tooltips and lower markers when popup is open */
body.popup-open .hotspot-tooltip {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.popup-open .hotspot-marker {
    z-index: 1 !important;
}

/* Panel slide-in items */
.panel-item {
    animation: item-slide 0.2s ease forwards;
}

@keyframes item-slide {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Custom scrollbar */
.custom-scroll::-webkit-scrollbar {
    width: 4px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
}

/* Floor Select — Apartment Polygons */
.apartment-polygon {
    fill: transparent;
    stroke: transparent;
    stroke-width: 2;
    transition: fill 0.25s ease, stroke 0.25s ease;
}

.apartment-polygon:hover,
.apartment-polygon.active {
    fill: rgba(34, 197, 94, 0.30);
    stroke: rgba(22, 163, 74, 0.8);
    stroke-width: 3;
}

/* Floor Select — Tooltip */
.floor-tooltip {
    position: absolute;
    z-index: 50;
    pointer-events: none;
    background: #0f172a;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    transform: translateY(-50%);
}

/* Floor Select — Title Animation */
.floor-title {
    animation: floor-title-in 0.5s ease-out;
}

@keyframes floor-title-in {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}