/* 🆕 Floating Selection Menu (Word-Copilot-style) — v3
   קופץ מתחת לבחירת-טקסט. לבן + צבעי-הפרויקט, שורה-מתחת-לשורה. position:fixed. */

.selection-floating-menu {
    position: fixed;
    z-index: 2000; /* מעל הפאנלים (998/999), מתחת למודלים (10000) */
    display: none;
    flex-direction: column;
    gap: 1px;
    padding: 6px;
    min-width: 210px;
    background: #ffffff;
    color: var(--text-primary, #1e293b);
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
    direction: rtl;
    font-family: 'Galil', sans-serif;
    letter-spacing: 0.4px;
    user-select: none;
    animation: sfmIn 0.13s ease;
}

.selection-floating-menu.visible { display: flex; }

/* כפתור-פעולה — שורה מלאה */
.sfm-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary, #475569);
    font-size: 13.5px;
    font-family: inherit;
    letter-spacing: 0.4px;
    cursor: pointer;
    text-align: right;
    transition: background 0.15s ease, color 0.15s ease;
}
.sfm-btn:hover { background: var(--bg-hover, #f1f5f9); color: var(--accent-primary, #1e3a5f); }
.sfm-btn:active { background: #e8eef6; }
.sfm-btn i {
    font-size: 13px;
    width: 18px;
    text-align: center;
    color: var(--accent-primary, #1e3a5f);
    flex-shrink: 0;
}
.sfm-btn span { flex: 1; }

/* מפריד בין הכפתורים לשורת-ההוראה */
.sfm-divider {
    height: 1px;
    background: var(--border-light, #e2e8f0);
    margin: 5px 4px;
}

/* שורת הוראה-חופשית */
.sfm-custom-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px;
}
.sfm-custom-input {
    flex: 1;
    min-width: 0;
    padding: 5px 2px;
    font-size: 13px;
    font-family: 'Rubik', 'Galil', sans-serif;
    color: var(--text-primary, #1e293b);
    background: transparent;
    border: none;
    border-bottom: 1.5px solid var(--accent-primary, #1e3a5f); /* פס כחול דק */
    border-radius: 0;
    outline: none;
    direction: rtl;
}
.sfm-custom-input::placeholder { color: var(--text-muted, #94a3b8); }
.sfm-custom-go {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary, #1e3a5f);
    border: none;
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: filter 0.15s ease;
}
.sfm-custom-go:hover { filter: brightness(1.12); }

/* אנימציה: ברירת-מחדל נפתח מתחת (מלמעלה) ; .above נפתח מעל (מלמטה) */
@keyframes sfmIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}
.selection-floating-menu.above { animation: sfmInAbove 0.13s ease; }
@keyframes sfmInAbove {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}
