/* ==================================================================
   ПАНЕЛЬ ФОРМАТИРОВАНИЯ НАД ПОЛЕМ ВВОДА
   ================================================================== */
.selection-menu {
  position: fixed;
  z-index: 3500;
  display: none;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  padding: 4px;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  animation: sel-pop 0.14s ease-out;
  box-sizing: border-box;
}
.selection-menu::-webkit-scrollbar { display: none; }
.selection-menu.active { display: flex; }

@keyframes sel-pop {
  from { opacity: 0; transform: translateY(4px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.sel-btn {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1rem;
  flex-shrink: 0;
  transition: background 0.12s, transform 0.1s;
  padding: 0 !important;
  margin: 0 !important;
  font-family: inherit;
}
.sel-btn:hover { background: var(--bg-hover); }
.sel-btn:active { background: var(--accent-soft); transform: scale(0.94); }

.sel-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 7px 4px;
  flex-shrink: 0;
}

/* ---- Мобильная версия ---- */
@media (max-width: 768px) {
  .selection-menu {
    padding: 3px;
    gap: 1px;
    border-radius: 10px;
  }
  .sel-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .sel-sep {
    height: 22px;
    margin: 8px 2px;
  }
}