/* ============================================
   DRAGGABLE FLOATING CHAT BUTTON - MATERIAL DESIGN
   ============================================ */

.btn-chat-float {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--hotel-primary-light);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 100;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

    .btn-chat-float:hover {
        box-shadow: 0 6px 12px 0 rgba(0, 0, 0, 0.24), 0 8px 24px 0 rgba(0, 0, 0, 0.22);
        transform: scale(1.05);
    }

    .btn-chat-float:active,
    .btn-chat-float.dragging {
        cursor: grabbing;
        box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.3), 0 12px 40px 0 rgba(0, 0, 0, 0.25);
        transform: scale(1.1);
    }

    .btn-chat-float.dragging {
        transition: none;
    }

.chat-icon {
    width: 28px;
    height: 28px;
    color: white;
    pointer-events: none;
}

.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: #d32f2f;
    color: white;
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    padding: 0 6px;
    border: 2px solid white;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

    .chat-badge:not(:empty) {
        display: flex;
    }

/* Drag Indicator (optional visual feedback) */
.btn-chat-float::before {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px dashed transparent;
    border-radius: 50%;
    transition: border-color 200ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.btn-chat-float.dragging::before {
    border-color: rgba(25, 118, 210, 0.3);
}

/* Snap zones (optional visual indicators) */
.btn-chat-float.snap-left {
    animation: snapPulse 300ms ease-out;
}

.btn-chat-float.snap-right {
    animation: snapPulse 300ms ease-out;
}

@keyframes snapPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* Prevent text selection during drag */
body.dragging-chat {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-chat-float {
        bottom: 90px;
        right: 16px;
    }
}

@media (max-width: 360px) {
    .btn-chat-float {
        width: 48px;
        height: 48px;
    }

    .chat-icon {
        width: 24px;
        height: 24px;
    }

    .chat-badge {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

/* Desktop hover effects */
@media (min-width: 769px) {
    .btn-chat-float:hover .chat-icon {
        animation: bounce 600ms ease-in-out;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* Accessibility - Focus visible */
.btn-chat-float:focus-visible {
    outline: 2px solid #1976d2;
    outline-offset: 4px;
}
