/* text-edit.css */

/* ============================================================
   INLINE TEXT EDITOR — плавающая панель форматирования текста
   ============================================================ */
.inline-text-editor {
  position: absolute;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: rgba(15,17,26,.98);
  border: 1px solid var(--neon);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,.7), 0 0 24px var(--neon-glow);
  min-width: 260px;
  max-width: min(420px, 90%);
  overflow: hidden;
  animation: popIn .15s ease both;
}

.ite-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  background: rgba(0,0,0,.35);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.ite-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .15s;
  padding: 0;
  flex-shrink: 0;
}
.ite-btn:hover {
  background: rgba(var(--neon-rgb),.2);
  border-color: var(--neon-border);
}
.ite-btn.active {
  background: var(--neon);
  border-color: var(--neon);
  color: #fff;
}

.ite-bold { font-weight: 900; }
.ite-italic { font-style: italic; font-family: Georgia, serif; font-size: 13px; }
.ite-underline { text-decoration: underline; }

.ite-color {
  border: 2px solid rgba(255,255,255,.4);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
  background: #e11d48;
}
.ite-color:hover { border-color: #fff; }

.ite-sep {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,.12);
  margin: 0 2px;
  flex-shrink: 0;
}

.ite-size-select {
  height: 26px;
  padding: 0 20px 0 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 10.5px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  flex-shrink: 0;
  margin-left: auto;
}
.ite-size-select:focus { border-color: var(--neon-border); }
.ite-size-select option { background: #0f111a; color: #fff; }

.ite-textarea {
  display: block;
  width: 100%;
  min-height: 32px;
  max-height: 200px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.4;
  outline: none;
  resize: none;
  overflow-y: auto;
  caret-color: var(--neon);
  white-space: pre-wrap;
  word-break: break-word;
}
.ite-textarea::selection {
  background: rgba(var(--neon-rgb),.35);
  color: #fff;
}