/* ===========================
   Pan Controls Component
   Modern zoom and navigation controls
   =========================== */

.pan-controls {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pan-controls:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.08);
}

.pan-control-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #2c3e50;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pan-control-btn span {
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
    pointer-events: none;
}

.pan-control-btn.reset span {
    font-size: 22px;
}

.pan-control-btn:hover {
    background: rgba(40, 85, 202, 0.1);
    color: #2855ca;
    transform: scale(1.05);
}

.pan-control-btn:active {
    transform: scale(0.95);
    background: rgba(40, 85, 202, 0.15);
}

.pan-control-btn:focus-visible {
    outline: 2px solid #2855ca;
    outline-offset: 2px;
}

.pan-control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.pan-control-btn:disabled:hover {
    background: transparent;
    color: #2c3e50;
}

/* Divider between zoom and reset */
.pan-controls-divider {
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(0, 0, 0, 0.1) 50%,
            transparent 100%);
    margin: 4px 0;
}

/* Tooltip */
.pan-control-btn::after {
    content: attr(aria-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(28, 28, 28, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.pan-control-btn::before {
    content: '';
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 6px 5px 0;
    border-color: transparent rgba(28, 28, 28, 0.95) transparent transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.pan-control-btn:hover::after,
.pan-control-btn:hover::before {
    opacity: 1;
}

.pan-control-btn:hover::after {
    transform: translateY(-50%) translateX(4px);
}

/* Responsive */
@media (max-width: 768px) {
    .pan-controls {
        left: 16px;
        padding: 6px;
        gap: 6px;
    }

    .pan-control-btn {
        width: 40px;
        height: 40px;
    }

    .pan-control-btn span {
        font-size: 20px;
    }

    .pan-control-btn.reset span {
        font-size: 18px;
    }

    .pan-control-btn::after,
    .pan-control-btn::before {
        display: none;
        /* Hide tooltips on mobile */
    }
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
    .pan-controls {
        background: white;
        border: 2px solid black;
    }

    .pan-control-btn {
        border: 1px solid #666;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    .pan-controls,
    .pan-control-btn,
    .pan-control-btn::after {
        transition: none;
    }
}