/* Round flag translate button — shared across all pages */
.lang-float-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2.5px solid #fbc24b;
    background: #fff;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 3px 14px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    font-family: inherit;
}
.lang-float-btn:hover {
    box-shadow: 0 6px 24px rgba(251,194,75,0.3);
    transform: translateY(-2px) scale(1.05);
}
.lang-float-flag {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    pointer-events: none;
    transition: opacity 0.2s;
}
.lang-float-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: #fff;
    border: 1.5px solid #ece6da;
    border-radius: 12px;
    padding: 12px 32px 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3d2e14;
    box-shadow: 0 4px 18px rgba(0,0,0,0.1);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}
.lang-float-btn:hover .lang-float-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
.lang-tooltip-flag {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    object-fit: cover;
}
.lang-float-btn.translated {
    border-color: #22c55e;
}
@media (max-width: 768px) {
    .lang-float-btn {
        bottom: 74px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
    .lang-float-flag { width: 38px; height: 38px; }
    .lang-float-tooltip { display: none; }
}

/* Chat pages: move button to top-left to avoid send button conflict */
.lang-float-top-left .lang-float-btn {
    bottom: auto;
    right: auto;
    top: 130px;
    left: 16px;
}
.lang-float-top-left .lang-float-tooltip {
    right: auto;
    left: calc(100% + 12px);
    transform: translateY(-50%) translateX(-6px);
}
.lang-float-top-left .lang-float-btn:hover .lang-float-tooltip {
    transform: translateY(-50%) translateX(0);
}
@media (max-width: 768px) {
    .lang-float-top-left .lang-float-btn {
        top: 120px;
        left: 10px;
    }
}

/* Hide old translate-float-btn if both exist during migration */
.translate-float-btn { display: none !important; }
