/**
 * Pan Widget Styles
 * Visual control panel for panning page content
 */

.pan-widget {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #0072ce;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 0;
    display: none;
    flex-direction: column;
    min-width: 150px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pan-widget-visible {
    opacity: 1;
}

/* Header */
.pan-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: linear-gradient(135deg, #0072ce 0%, #005a9e 100%);
    color: white;
    border-radius: 6px 6px 0 0;
}

.pan-widget-title {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.pan-widget-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: background 0.2s;
}

.pan-widget-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Body */
.pan-widget-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Controls Layout */
.pan-widget-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.pan-row {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* Pan Buttons */
.pan-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    user-select: none;
    color: #333;
}

.pan-btn:hover {
    background: linear-gradient(135deg, #e6f2ff 0%, #cce5ff 100%);
    border-color: #0072ce;
    color: #0072ce;
    transform: scale(1.05);
}

.pan-btn:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, #cce5ff 0%, #b3d9ff 100%);
}

/* Center Button (Reset Pan Only) */
.pan-center {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe5cc 100%);
    border-color: #ff9933;
    color: #ff6600;
    font-size: 16px;
}

.pan-center:hover {
    background: linear-gradient(135deg, #ffeecc 0%, #ffdd99 100%);
    border-color: #ff6600;
    color: #cc5200;
}

/* Reset All Button (Full Reset) */
.pan-reset-all {
    width: 100%;
    height: 30px;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border: 1px solid #e57373;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #c62828;
    letter-spacing: 0.3px;
}

.pan-reset-all:hover {
    background: linear-gradient(135deg, #ffcdd2 0%, #ef9a9a 100%);
    border-color: #c62828;
    color: #b71c1c;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pan-widget {
        min-width: 140px;
    }

    .pan-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .pan-widget-body {
        padding: 6px;
    }
}

/* Animation for appearance */
@keyframes pan-widget-appear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.pan-widget-visible {
    animation: pan-widget-appear 0.25s ease;
}
