/* Territory Switcher - плаваюча кнопка зміни території */

.territory-switcher-fab {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #4e73df 0%, #36b9cc 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    box-shadow: 0 4px 12px rgba(78, 115, 223, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    min-height: 44px; /* Мінімальний розмір для touch */
    min-width: 44px;
    touch-action: manipulation; /* Покращена touch взаємодія */
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    max-width: 200px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.territory-switcher-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 115, 223, 0.4);
    background: linear-gradient(135deg, #5a82f7 0%, #40c9ff 100%);
}

.territory-switcher-fab:active {
    transform: translateY(0);
}

.territory-switcher-fab i {
    font-size: 16px;
    animation: pulse 2s infinite;
}

.territory-switcher-fab .territory-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Мобільна адаптація */
@media (max-width: 768px) {
    .territory-switcher-fab {
        top: 60px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
        max-width: 150px;
        border-radius: 20px;
        /* Покращена мобільна взаємодія */
        -webkit-tap-highlight-color: rgba(78, 115, 223, 0.3);
    }
    
    .territory-switcher-fab:active {
        transform: scale(0.98) translateY(1px);
        box-shadow: 0 2px 8px rgba(78, 115, 223, 0.4);
    }
    
    .territory-switcher-fab i {
        font-size: 14px;
    }
    
    .territory-switcher-fab .territory-name {
        max-width: 80px;
    }
}

@media (max-width: 480px) {
    .territory-switcher-fab {
        top: 50px;
        right: 5px;
        padding: 4px 8px;
        font-size: 11px;
        max-width: 120px;
    }
    
    .territory-switcher-fab .territory-name {
        display: none; /* На дуже маленьких екранах показуємо тільки іконку */
    }
}
