﻿/* ===================================================================
   HOMEBEAR · генератор анкеты, приёмка, настройки | legume
   Цвета — переменные ниже; правится свободно, скрипт только
   расставляет классы.
=================================================================== */

.hba-panel, .hba-modal, .hba-settings {
  --hba-paper:  rgba(255,255,255,.85);
  --hba-field:  #fff;
  --hba-text:   var(--text1, #323232);
  --hba-muted:  var(--text2, #7d7d7d);
  --hba-accent: var(--links, #8a6f9e);
  --hba-line:   rgba(50,50,50,.15);
  --hba-bad:    #a33a2a;

  font: 400 12px/1.45 Verdana, Arial, sans-serif;
  color: var(--hba-text);
  text-align: left;
  box-sizing: border-box;
}
.hba-panel *, .hba-modal *, .hba-settings * { box-sizing: border-box; }

.hba-panel, .hba-settings {
  background: var(--hba-paper);
  border: 1px solid var(--hba-line);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 0 0 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.hba-head { font-size: 16px; font-weight: 700; color: var(--hba-accent); }
.hba-head small { display: block; font-size: 11px; font-weight: 400; color: var(--hba-muted); }
.hba-sec, .hba-sub {
  margin: 8px 0 0; padding-bottom: 3px;
  border-bottom: 1px solid var(--hba-line);
  font-weight: 700; text-transform: lowercase; color: var(--hba-accent);
}
.hba-sub small { font-weight: 400; color: var(--hba-muted); }

.hba-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 12px; }
.hba-grid.is-off { opacity: .4; pointer-events: none; }
.hba-f { display: flex; flex-direction: column; gap: 3px; position: relative; }
.hba-f > span { font-size: 11px; color: var(--hba-muted); }
.hba-f > span b { color: var(--hba-bad); }
.hba-in {
  width: 100%; padding: 6px 8px;
  border: 1px solid var(--hba-line); border-radius: 6px;
  background: var(--hba-field); color: inherit; font: inherit;
}
textarea.hba-in { resize: vertical; }
.hba-code-in { font: 11px/1.4 Consolas, monospace; }
.hba-in:focus { outline: none; border-color: var(--hba-accent); }

.hba-radios, .hba-twinkrow { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hba-radios label, .hba-check { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.hba-radios i, .hba-check i { font-style: normal; }
.hba-mainf { flex: 1; min-width: 220px; }

/* панель оформления ЛЗ */
.hba-tb { display: flex; gap: 4px; flex-wrap: wrap; position: relative; }
.hba-tb > button, .hba-tb-btns button, .hba-tb-sug button {
  padding: 2px 8px; border: 1px solid var(--hba-line); border-radius: 5px;
  background: var(--hba-field) !important; color: var(--hba-text) !important;
  font: inherit; cursor: pointer; text-transform: none !important;
}
.hba-tb > button:hover { border-color: var(--hba-accent); }
.hba-tb-pop {
  display: none; position: absolute; z-index: 20; top: 100%; left: 0; margin-top: 4px;
  width: 280px; padding: 8px; border: 1px solid var(--hba-line); border-radius: 8px;
  background: var(--hba-field); box-shadow: 0 6px 18px rgba(0,0,0,.15);
  flex-direction: column; gap: 6px;
}
.hba-tb-pop.is-open { display: flex; }
.hba-tb-sug { display: flex; flex-wrap: wrap; gap: 4px; }
.hba-tb-sug em { color: var(--hba-muted); font-size: 11px; }
.hba-tb-btns { display: flex; justify-content: flex-end; gap: 6px; }

.hba-lzprev, .hba-fprev {
  padding: 8px; border: 1px dashed var(--hba-line); border-radius: 6px;
  min-height: 24px; overflow: auto; max-height: 260px;
}
.hba-fprev em { color: var(--hba-muted); }

.hba-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.hba-btn {
  padding: 6px 14px; border: 1px solid var(--hba-accent); border-radius: 6px;
  background: transparent !important; color: var(--hba-accent) !important;
  font: inherit; cursor: pointer; text-transform: none !important;
}
.hba-btn.hba-main { background: var(--hba-accent) !important; color: #fff !important; }
.hba-btn:disabled { opacity: .5; cursor: default; }
.hba-status { font-size: 11px; color: var(--hba-muted); }
.hba-bad { color: var(--hba-bad) !important; }
.hba-note { margin: 0; font-size: 11px; color: var(--hba-muted); }
.hba-note code { font-size: 10.5px; word-break: break-word; }

/* приёмка */
.hba-acceptbar { margin-top: 12px; }
.hba-accepted { font-size: 11px; color: var(--hba-muted); }
.hba-ov {
  position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 40px 16px;
}
.hba-modal {
  width: 460px; max-width: 100%; padding: 16px 20px; border-radius: 10px;
  background: var(--hba-field); box-shadow: 0 12px 40px rgba(0,0,0,.3);
  display: flex; flex-direction: column; gap: 8px;
}
.hba-modal.hba-wide { width: 760px; }
.hba-mh { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; color: var(--hba-accent); }
.hba-x { border: 0; background: none !important; font-size: 20px; cursor: pointer; color: var(--hba-muted) !important; }
.hba-fld { padding: 6px 0; }

/* настройки */
.hba-fldset { display: flex; flex-direction: column; gap: 5px; padding: 10px; border: 1px solid var(--hba-line); border-radius: 8px; }
.hba-fldset.is-off textarea { opacity: .5; }
.hba-fldhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hba-fldhead label { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--hba-muted); }
.hba-fldno { width: 64px; }
.hba-imgprev { max-width: 100%; max-height: 90px; object-fit: contain; align-self: flex-start; margin-top: 4px; }
.hba-imgprev:not([src]), .hba-imgprev[src=""] { display: none; }

/* ---- читабельность (18.10.2026): тема форума перебивает поля ввода ---- */
.hba-panel [hidden], .hba-modal [hidden], .hba-settings [hidden] { display: none !important; }
.hba-panel, .hba-settings { background: #fff; padding: 22px 26px; gap: 12px; font-size: 13px; }
.hba-head { font-size: 18px; }
.hba-head small { font-size: 12px; margin-top: 2px; }
.hba-sec, .hba-sub { font-size: 13px; margin-top: 12px; }
.hba-f > span { font-size: 12px; color: var(--hba-text); font-weight: 600; }
.hba-f > span small { font-weight: 400; color: var(--hba-muted); }
.hba-grid { gap: 12px 16px; }
.hba-in, .hba-panel input.hba-in, .hba-panel textarea.hba-in, .hba-settings input.hba-in, .hba-settings textarea.hba-in, .hba-modal .hba-in {
  background: #fafafa !important;
  border: 1px solid #cfcfd6 !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  color: #222 !important;
  font-size: 13px !important;
  box-shadow: none !important;
  height: auto !important;
}
.hba-in:focus { background: #fff !important; border-color: var(--hba-accent) !important; box-shadow: 0 0 0 3px rgba(138,111,158,.15) !important; }
.hba-in::placeholder { color: #b4b4bc !important; font-style: italic; opacity: 1; }
.hba-code-in, .hba-settings textarea.hba-code-in, .hba-modal textarea.hba-code-in { font: 12px/1.45 Consolas, monospace !important; }
.hba-radios label, .hba-check { font-size: 13px; }
.hba-lzprev:empty { display: none; }
.hba-lzprev, .hba-fprev { background: #fcfbfd; }
.hba-note { font-size: 12px; }
.hba-fldset { background: #fcfcfd; }
.hba-fldhead b { font-size: 13px; }
.hba-settings .hba-grid { align-items: start; }
.hba-settings .hba-f > span small { display: block; }
.hba-settings .hba-f > span { min-height: 32px; }

/* ---- кнопка «принять анкету» в посте — под тег форума (чёрная плашка, капс, Jost) ---- */
.hba-acceptbar { margin-top: 14px; text-align: left; }
.hba-acceptbar .hba-btn, .hba-acceptbar .hba-btn.hba-main {
  display: inline-block !important;
  background: #000 !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 6px 12px !important;
  font: 900 10px/1.4 Jost, sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background .15s;
}
.hba-acceptbar .hba-btn:hover { background: rgba(0,0,0,.72) !important; }
.hba-acceptbar .hba-accepted {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(0,0,0,.04);
  color: rgba(0,0,0,.6);
  font: 500 11px/1.4 Jost, sans-serif;
  text-transform: lowercase;
}

/* ---- поля профиля в окне приёмки: строка на поле, код по «✎» ---- */
.hba-flds { display: flex; flex-direction: column; border: 1px solid var(--hba-line); border-radius: 8px; overflow: hidden; }
.hba-fld { padding: 0 !important; border-bottom: 1px solid var(--hba-line); }
.hba-fldrow { display: flex; align-items: center; gap: 10px; padding: 6px 10px; min-height: 40px; }
.hba-fldrow .hba-check { flex: 0 0 150px; font-weight: 600; }
.hba-fldno-l { flex: 0 0 auto; font: 11px Consolas, monospace; color: var(--hba-muted); background: rgba(0,0,0,.05); padding: 1px 6px; border-radius: 4px; }
.hba-thumb { flex: 1; min-width: 0; height: 28px; display: flex; align-items: center; overflow: hidden; }
.hba-thumb img { height: 28px; max-width: 120px; object-fit: cover; border-radius: 3px; }
.hba-thumb em { font-size: 11px; color: var(--hba-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hba-fedit { flex: 0 0 auto; border: 0 !important; background: none !important; color: var(--hba-accent) !important; font: inherit; font-size: 11px; cursor: pointer; padding: 2px 4px; text-transform: none !important; }
.hba-fbody { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.hba-fld:has(.hba-dofld:not(:checked)) .hba-fldrow > :not(.hba-check) { opacity: .4; }
.hba-keepl { padding: 7px 10px; background: rgba(0,0,0,.025); font-size: 12px; }
/* превью держим в рамке: стикеры форума позиционируются абсолютно и разлетались по окну */
.hba-fprev { position: relative; overflow: hidden; contain: layout paint; max-height: 160px; }
