﻿/* <!-- быстрая правка постов | legume --> */
/* Мягкий вариант под Ноту: без рамок-обводок, всё на полупрозрачных
 * заливках от цвета текста, акцент — из темы форума (--acc2, тройка чисел).
 * Без темы и без color-mix откатывается на нейтральные значения. */
.nqe-hidden { display: none !important; }

.nqe {
  --nqe-acc: 168 129 122;
  --nqe-fill: rgba(127,127,127,.07);
  --nqe-fill-hi: rgba(127,127,127,.12);
  --nqe-ring: rgba(127,127,127,.18);
  display: flex; flex-direction: column; gap: 10px;
  margin: 6px 0 14px;
  animation: nqe-in .22s ease-out;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .nqe {
    --nqe-acc: var(--acc2, 168 129 122);
    --nqe-fill: color-mix(in srgb, currentColor 5%, transparent);
    --nqe-fill-hi: color-mix(in srgb, currentColor 9%, transparent);
    --nqe-ring: color-mix(in srgb, rgb(var(--nqe-acc)) 35%, transparent);
  }
}
@keyframes nqe-in { from { opacity: 0; transform: translateY(-3px); } }

/* поля */
.nqe-subject, .nqe-text {
  width: 100%; box-sizing: border-box;
  font: inherit; color: inherit;
  background: var(--nqe-fill);
  border: 0; border-radius: 12px;
  padding: 12px 14px; outline: none;
  box-shadow: inset 0 0 0 1px transparent;
  transition: background .2s, box-shadow .2s;
}
.nqe-subject { font-weight: 600; padding: 9px 14px; }
.nqe-text { min-height: 120px; resize: vertical; line-height: 1.6; overflow-y: auto; }
.nqe-subject:hover, .nqe-text:hover { background: var(--nqe-fill-hi); }
.nqe-subject:focus, .nqe-text:focus {
  background: var(--nqe-fill-hi);
  box-shadow: inset 0 0 0 1px var(--nqe-ring);
}
.nqe-text::placeholder, .nqe-subject::placeholder { color: inherit; opacity: .4; }

/* нижняя строка */
.nqe-bar { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: .88em; }
.nqe-silent { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; opacity: .65; transition: opacity .15s; }
.nqe-silent:hover { opacity: .9; }
.nqe-silent input { accent-color: rgb(var(--nqe-acc)); margin: 0; }
.nqe-hint { opacity: .38; margin-right: auto; font-size: .92em; letter-spacing: .01em; }
.nqe-adv { opacity: .55; text-decoration: none !important; transition: opacity .15s; }
.nqe-adv:hover { opacity: .9; }

.nqe-btn {
  font: inherit; cursor: pointer; color: inherit;
  padding: 7px 16px; border-radius: 999px; border: 0;
  background: transparent;
  transition: background .18s, opacity .18s, transform .1s;
}
.nqe-btn:active:not(:disabled) { transform: scale(.97); }
.nqe-btn:disabled { opacity: .45; cursor: default; }
.nqe-cancel { opacity: .7; }
.nqe-cancel:hover:not(:disabled) { opacity: 1; background: var(--nqe-fill); }
.nqe-save {
  font-weight: 600;
  background: rgba(var(--nqe-acc) / .16);
}
.nqe-save:hover:not(:disabled) { background: rgba(var(--nqe-acc) / .26); }

/* сохранение */
.nqe-busy .nqe-save { position: relative; color: transparent; }
.nqe-busy .nqe-save::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgb(var(--nqe-acc)); border-right-color: transparent;
  animation: nqe-spin .75s linear infinite;
}
@keyframes nqe-spin { to { transform: rotate(360deg); } }
.nqe-busy .nqe-text { opacity: .6; }

/* ошибка */
.nqe-error {
  padding: 9px 14px; border-radius: 10px; font-size: .9em;
  background: rgba(200, 90, 80, .1);
  color: inherit;
}
.nqe-error::before { content: "•"; color: #c85a50; margin-right: 8px; }

/* скелетон при загрузке */
.nqe-skel { display: flex; flex-direction: column; gap: 9px; padding: 6px 0; }
.nqe-skel span {
  height: 11px; border-radius: 6px; background: var(--nqe-fill-hi);
  animation: nqe-pulse 1.1s ease-in-out infinite alternate;
}
.nqe-skel span:nth-child(2) { width: 82%; }
.nqe-skel span:nth-child(3) { width: 55%; }
@keyframes nqe-pulse { to { opacity: .35; } }

/* подсветка поста после сохранения */
.post.nqe-flash .post-content { animation: nqe-flash 1.6s ease-out; border-radius: 10px; }
@keyframes nqe-flash {
  from { background: rgba(var(--acc2, 168 129 122) / .14); }
  to   { background: transparent; }
}

/* тост */
.nqe-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 99999;
  transform: translate(-50%, 12px); opacity: 0;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(28, 27, 30, .88); color: #ece9e6;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font: 13px/1.3 var(--font3, inherit);
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  transition: opacity .25s, transform .25s;
}
.nqe-toast.nqe-show { opacity: 1; transform: translate(-50%, 0); }
.nqe-undo {
  font: inherit; font-weight: 600; cursor: pointer;
  color: rgb(var(--acc2, 201 164 157)); background: none; border: 0; padding: 0;
  filter: brightness(1.35);
}
.nqe-undo:hover { text-decoration: underline; }

/* одолженная панель BB-кнопок формы ответа */
.nqe-tools:empty { display: none; }
.nqe-tools { position: relative; }
.nqe-tools > .container { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .nqe, .nqe-toast, .post.nqe-flash .post-content, .nqe-skel span { animation: none; transition: none; }
}
