/* ============================================================
   OME AI Floating Action Button
   ============================================================ */

.ome-ai-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 16px;
    background: linear-gradient(135deg, #8b9a6d 0%, #a8b88a 100%);
    border-radius: 28px;
    box-shadow: 0 4px 16px rgba(139, 154, 109, 0.35), 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: ome-ai-fab-appear 0.5s ease-out;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none; /* important for drag on mobile */
}

@keyframes ome-ai-fab-appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ome-ai-fab:hover {
    box-shadow: 0 6px 20px rgba(139, 154, 109, 0.4), 0 3px 8px rgba(0,0,0,0.12);
}

.ome-ai-fab:active {
    transform: scale(0.97);
}

.ome-ai-fab--hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
}

.ome-ai-fab--dragging {
    transition: none !important;
    cursor: grabbing !important;
}

.ome-ai-fab__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    pointer-events: none;
}

.ome-ai-fab__label {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    padding-right: 4px;
    pointer-events: none;
}

/* Close button — bigger and more visible */
.ome-ai-fab__close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.15);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.9;
    transition: opacity 0.2s, background 0.2s, transform 0.2s;
    margin-left: 2px;
}

.ome-ai-fab__close:hover {
    opacity: 1;
    background: rgba(180,60,60,0.7);
    border-color: rgba(255,255,255,0.7);
    transform: scale(1.1);
}

.ome-ai-fab__close:active {
    transform: scale(0.95);
}

/* Drag handle hint */
.ome-ai-fab__drag-hint {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    font-family: 'Manrope', sans-serif;
}

.ome-ai-fab:hover .ome-ai-fab__drag-hint {
    opacity: 1;
}

/* Reopen hint */
.ome-ai-fab-hint {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    background: #2c2c2c;
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-family: 'Manrope', sans-serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: ome-ai-hint-in 0.4s ease-out;
    max-width: 280px;
}

.ome-ai-fab-hint--fade {
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

@keyframes ome-ai-hint-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ome-ai-fab-hint__link {
    color: #a8b88a;
    text-decoration: underline;
    cursor: pointer;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .ome-ai-fab {
        bottom: 16px;
        right: 16px;
        padding: 6px 6px 6px 12px;
        border-radius: 24px;
    }

    .ome-ai-fab__icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .ome-ai-fab__label {
        font-size: 13px;
    }

    .ome-ai-fab__close {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .ome-ai-fab-hint {
        bottom: 16px;
        right: 16px;
        left: 16px;
        text-align: center;
        max-width: none;
    }
}

/* Hide on very small screens in landscape (phones) */
@media (max-height: 400px) and (orientation: landscape) {
    .ome-ai-fab {
        bottom: 8px;
        right: 8px;
        transform: scale(0.85);
    }
}
