/* Форма «одно сообщение → куда отправить» (29.09.2026). Разметка — _src/oneform.py, логика — js/oneform.js.
   Кнопки .btn, поля .fld, согласие .agree — общие из style.css. */
.mf { align-content: start; }
.mf [hidden] { display: none !important; }
.mf__s { display: grid; gap: 14px; }
.mf--js.mf--1 .mf__s2, .mf--js.mf--2 .mf__s1 { display: none; }
/* без JS: текст + телефон + согласие + «На сайт», остальное не работает — прячем */
.mf:not(.mf--js) .mf__c:not(.mf__c--site):not(.mf__c--call), .mf:not(.mf--js) .mf__bar,
.mf:not(.mf--js) .mf__next, .mf:not(.mf--js) .mf__back, .mf:not(.mf--js) .mf__s2 .mf__t { display: none; }

.mf__t { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 800; font-size: clamp(17px, 1.1vw, 22px); line-height: 1.2; }
.mf__t i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-style: normal; font-size: 15px;
  color: #07080C; background: var(--iri); background-size: 220% 100%; flex: none; }

/* поле сообщения: текст + одна кнопка */
.mf__box { position: relative; display: grid; gap: 0; border-radius: 18px; border: 1px solid var(--line2); background: rgba(5,6,10,.6);
  transition: border-color .25s, box-shadow .25s; }
.mf__box:focus-within { border-color: var(--c2, #8C7BFF); box-shadow: 0 0 0 3px rgba(140,123,255,.22); }
.mf__lbl { padding: 14px 16px 0; font-size: 13.5px; font-weight: 600; color: var(--mu); }
.mf__box textarea { width: 100%; min-height: 118px; padding: 8px 16px 12px; border: 0; background: none; color: var(--tx); font: inherit;
  font-size: 16px; line-height: 1.45; resize: vertical; }
.mf__box textarea:focus { outline: none; }
.mf__box textarea::placeholder { color: #6F788B; }
.mf__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px 12px;
  border-top: 1px solid var(--line); }
.mf__add { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px 0 8px; border-radius: 999px;
  border: 1px solid transparent; background: linear-gradient(160deg, rgba(34,40,56,.95), rgba(16,19,28,.95)) padding-box, var(--iri) border-box;
  color: var(--tx); font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1; cursor: pointer; transition: transform .2s; }
.mf__add .ic { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--iri); background-size: 220% 100%; stroke: #07080C; }
.mf__add:hover { transform: translateY(-1px); }
.mf__add[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(140,123,255,.25); }
.mf__hint { font-size: 13px; color: var(--mu); font-variant-numeric: tabular-nums; }
.mf__hint.err { color: var(--no, #FF8A8A); }

.mf__menu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
.mf__menu button { display: grid; justify-items: start; gap: 2px; min-height: 64px; padding: 10px 12px; border-radius: 14px; text-align: left;
  border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--tx); font: inherit; cursor: pointer; transition: background .2s, border-color .2s; }
.mf__menu button:hover, .mf__menu button:focus-visible { background: rgba(140,123,255,.12); border-color: rgba(140,123,255,.5); outline: none; }
.mf__menu .ic { width: 22px; height: 22px; margin-bottom: 2px; }
.mf__menu b { font-size: 15px; }
.mf__menu small { font-size: 12.5px; color: var(--mu); line-height: 1.25; }

/* запись */
.mf__rec { display: grid; gap: 10px; padding: 0 12px 12px; }
.mf__video { width: 100%; max-height: 320px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #05060A; border: 1px solid var(--line2); }
.mf__live { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.mf__lim { color: var(--mu); font-weight: 600; }
.mf__dot { width: 10px; height: 10px; border-radius: 50%; background: #6F788B; }
.mf--rec .mf__dot { background: #FF3B3B; animation: mfPulse 1.2s ease-out infinite; }
@keyframes mfPulse { from { box-shadow: 0 0 0 0 rgba(255,59,59,.6); } to { box-shadow: 0 0 0 10px rgba(255,59,59,0); } }
.mf__rbtn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mf--rec .mf__bar, .mf--rec .mf__menu { display: none; }

/* вложения */
.mf__files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0; padding: 0 12px; list-style: none; }
.mf--files .mf__files { padding-bottom: 12px; }
.mf__f { position: relative; display: grid; gap: 6px; padding: 8px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(255,255,255,.035); min-width: 0; }
.mf__f--audio { grid-column: span 2; }
.mf__pv { display: block; width: 100%; border-radius: 10px; background: #05060A; }
img.mf__pv, video.mf__pv { aspect-ratio: 4 / 3; object-fit: cover; }
audio.mf__pv { height: 44px; background: none; }
.mf__fc { font-size: 13px; color: var(--mu); padding-right: 34px; overflow-wrap: anywhere; }
.mf__del { position: absolute; right: 6px; bottom: 4px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line2); background: rgba(5,6,10,.85); color: var(--tx); cursor: pointer; }
.mf__del .ic { width: 16px; height: 16px; }
.mf__f--photo .mf__del, .mf__f--video .mf__del { top: 12px; bottom: auto; right: 12px; }

/* необязательные поля */
.mf__more { border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.mf__more summary { display: flex; align-items: center; min-height: 48px; padding: 0 16px; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--mu); list-style: none; }
.mf__more summary::-webkit-details-marker { display: none; }
.mf__more summary::before { content: '+'; display: grid; place-items: center; width: 22px; height: 22px; margin-right: 10px; border-radius: 50%;
  border: 1px solid var(--line2); font-weight: 700; color: var(--tx); }
.mf__more[open] summary::before { content: '−'; }
.mf__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 14px 14px; }
.mf__wide { grid-column: 1 / -1; }

/* шаг 2 — каналы */
.mf__sum { margin: 0; font-size: 14.5px; color: var(--mu); overflow-wrap: anywhere; }
.mf__site { display: grid; gap: 12px; }
.mf__or { margin: 4px 0 -4px; font-size: 14px; color: var(--mu); }
.mf__ch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mf__c { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  min-height: 74px; padding: 12px 14px; border-radius: 16px; text-align: left; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line2); background: rgba(255,255,255,.045); color: var(--tx); font: inherit; transition: transform .2s, background .2s, border-color .2s; }
.mf__c .ic { grid-row: span 2; width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.07); }
.mf__c b { font-size: 16px; line-height: 1.2; }
.mf__c small { font-size: 12.5px; color: var(--mu); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf__c:hover, .mf__c:focus-visible { transform: translateY(-2px); border-color: rgba(140,123,255,.55); background: rgba(140,123,255,.1); outline: none; }
.mf__c--site { min-height: 80px; border-color: transparent;
  background: linear-gradient(160deg, rgba(34,40,56,.95), rgba(16,19,28,.95)) padding-box, var(--iri) border-box; }
.mf__c--site .ic { background: var(--iri); background-size: 220% 100%; stroke: #07080C; }
.mf__c--site b { font-size: 18px; }
.mf__c--wa .ic { background: rgba(37,211,102,.16); stroke: #4EE08A; }
.mf__c--tg .ic { background: rgba(42,171,238,.16); stroke: #5CC3F5; }
.mf__c--max .ic { background: rgba(140,123,255,.18); stroke: #B3A8FF; }
.mf.sent .mf__c, .mf.sent .mf__nb .btn { opacity: .6; pointer-events: none; }

.mf__note { display: grid; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(255,201,138,.4); background: rgba(255,201,138,.07); }
.mf__note p { margin: 0; font-size: 15px; line-height: 1.45; }
.mf__nb { display: flex; flex-wrap: wrap; gap: 10px; }
.mf__nb .btn { flex: 1 1 220px; }
.mf__back { justify-self: start; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--mu); font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mf .form__msg { margin: 0; }
.mf--done .mf__site, .mf--done .mf__ch, .mf--done .mf__or { display: none; }

@media (max-width: 1100px) { .mf__menu { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .mf__ch { grid-template-columns: 1fr 1fr; }
  .mf__c { grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: 6px; min-height: 96px; }
  .mf__c .ic { grid-row: auto; }
  .mf__c--site { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; min-height: 76px; }
  .mf__c--site .ic { grid-row: span 2; }
  .mf__grid { grid-template-columns: 1fr; }
  .mf__add { flex: 1 1 auto; justify-content: flex-start; }
  .mf__files { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .mf--rec .mf__dot { animation: none; } .mf__c, .mf__add { transition: none; } }

/* ═════ СВЕТЛАЯ ТЕМА формы (30.09.2026) ═════ */
html[data-theme="light"] .mf__box { background: #fff; border-color: rgba(18,28,22,.16); box-shadow: 0 12px 30px -26px rgba(20,40,30,.5); }
html[data-theme="light"] .mf__box:focus-within { border-color: #00A651; box-shadow: 0 0 0 3px rgba(0,166,81,.16); }
html[data-theme="light"] .mf__box textarea::placeholder { color: #737A76; }
html[data-theme="light"] .mf__add { background: linear-gradient(#fff, #F7F6F2) padding-box, var(--iri) border-box; color: #121714; }
html[data-theme="light"] .mf__add .ic { stroke: #fff; }
html[data-theme="light"] .mf__add[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(0,166,81,.18); }
html[data-theme="light"] .mf__menu button, html[data-theme="light"] .mf__c { background: #fff; box-shadow: 0 10px 24px -22px rgba(20,40,30,.55); }
html[data-theme="light"] .mf__menu button:hover, html[data-theme="light"] .mf__menu button:focus-visible,
html[data-theme="light"] .mf__c:hover, html[data-theme="light"] .mf__c:focus-visible { background: rgba(0,166,81,.06); border-color: rgba(0,166,81,.5); }
html[data-theme="light"] .mf__c .ic { background: rgba(18,28,22,.05); }
html[data-theme="light"] .mf__c--site { background: linear-gradient(#fff, #F7F6F2) padding-box, var(--iri) border-box; }
html[data-theme="light"] .mf__c--site .ic { background: var(--iri); background-size: 220% 100%; stroke: #fff; }
html[data-theme="light"] .mf__c--wa .ic { background: rgba(31,175,85,.12); stroke: #16924A; }
html[data-theme="light"] .mf__c--tg .ic { background: rgba(42,171,238,.12); stroke: #1B86C4; }
html[data-theme="light"] .mf__c--max .ic { background: rgba(107,52,238,.10); stroke: #5B3FD6; }
html[data-theme="light"] .mf__f { background: #fff; }
html[data-theme="light"] .mf__del { background: rgba(255,255,255,.92); }
html[data-theme="light"] .mf__more { background: rgba(255,255,255,.6); }
html[data-theme="light"] .mf__note { background: rgba(165,90,7,.07); border-color: rgba(165,90,7,.35); }
html[data-theme="light"] .rec__msg.ok { color: #0F7F43; }
html[data-theme="light"] .rec__msg.err { color: #C22E3C; }
