/* «СТО» — каталог автосервисов, карта и заявки на ремонт (ответ работодателя 84 от 19.10.2026, правка Б24; линия Л5; public/app/sto-ui.js).
   Три вида (classic, minimal, crm): кликабельное — не меньше 44 × 44 px, промежутки — 8 px и больше, без цветных полос слева у карточек;
   цвета — переменные классического оформления (classic.css, skins). На 400 px всё в одну колонку, без прокрутки страницы вбок. */

.sto { min-width: 0; }
:is(#app, body) .kbtn.sto-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 14px; white-space: normal; text-align: center; text-decoration: none; box-sizing: border-box; }
.sto-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.sto-acts > .kmini { flex: 1 1 220px; }
.sto-acts--lead { margin: 12px 0; }
.sto-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.sto-note { margin: 8px 0; }
.sto-why { margin: 4px 0 0; padding-left: 18px; }
.sto-wait { margin: 8px 0; }

/* поля */
.sto-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0 0 8px; }
.sto-f__l { font-size: 12.5px; color: var(--k-muted, #555); }
:is(#app, body) .sto-ctl { min-height: 44px; width: 100%; box-sizing: border-box; padding: 8px 10px; font: inherit; border: 1px solid var(--k-line, #bbb); border-radius: 4px; background: #fff; color: #222; }
:is(#app, body) textarea.sto-ctl { min-height: 72px; resize: vertical; }
:is(#app, body) .sto-ctl:disabled { background: #f2f2f2; color: #888; }
.sto-check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 8px; cursor: pointer; }
.sto-check input { width: 22px; height: 22px; margin: 0; flex: 0 0 auto; }
.sto-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; }
.sto-fs { border: 1px solid var(--k-line-soft, #dcdad5); border-radius: 6px; padding: 8px 12px 4px; margin: 0 0 12px; min-width: 0; }
.sto-fs legend { font-weight: 600; padding: 0 4px; }
.sto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; }
.sto-filter { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 12px; align-items: end; margin: 0 0 8px; }
.sto-filter .sto-acts { grid-column: 1 / -1; }
.sto-form .lead { margin: 0 0 8px; }

/* карточки каталога, заявки */
.sto-list { display: flex; flex-direction: column; gap: 12px; }
.sto-item, .sto-req, .sto-card { display: flex; gap: 12px; border: 1px solid var(--k-line-soft, #dcdad5); border-radius: 8px; padding: 10px 12px; background: #fff; min-width: 0; }
.sto-req, .sto-card { flex-direction: column; gap: 4px; margin: 0 0 12px; }
.sto-item.is-picked, .sto-req.is-picked { outline: 2px solid var(--k-dark, #404040); outline-offset: 2px; }
.sto-item__cover { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.sto-item__main { flex: 1 1 auto; min-width: 0; }
.sto-item__name, .sto-card__name, .sto-req__t { margin: 0 0 4px; font-size: 16px; }
.sto-card__name { font-size: 19px; }
.sto-item__line { margin: 0 0 4px; overflow-wrap: anywhere; }
.sto-req__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sto-req__t { margin: 0; font-size: 15px; }
.sto-req__body { margin-top: 4px; }
.sto-chip { white-space: normal; }
.sto-promo { font-weight: 600; }
.sto-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 6px 0 8px; }
.sto-dl dt { color: var(--k-muted, #555); }
.sto-dl dd { margin: 0; overflow-wrap: anywhere; }
.sto-offers { display: flex; flex-direction: column; gap: 10px; }
.sto-offer-card { border: 1px solid var(--k-line-soft, #dcdad5); border-radius: 6px; padding: 8px 10px; background: var(--k-panel, #fafaf8); min-width: 0; }
.sto-hours, .sto-works { width: 100%; max-width: 520px; }
.sto-hours th { text-align: left; font-weight: 600; width: 60px; }
.sto-promos, .sto-reviews { margin: 4px 0 8px; padding-left: 18px; }
.sto-review { margin: 0 0 8px; }
.sto-photos { margin: 6px 0; }

/* карта */
.sto-map { width: 100%; height: 360px; border: 1px solid var(--k-line-soft, #dcdad5); border-radius: 8px; margin: 8px 0 12px; overflow: hidden; background: #eef0f2; }
.sto-map--small { height: 260px; }

/* онлайн-запись */
.sto-slots { margin: 8px 0; }
.sto-slot-day { margin: 0 0 8px; }
.sto-slot-day__t { font-weight: 600; }

/* переписка */
.sto-thread { margin: 8px 0 0; }
.sto-msgs { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.sto-msg { align-self: flex-start; max-width: 85%; border: 1px solid var(--k-line-soft, #dcdad5); border-radius: 8px; padding: 6px 10px; background: #fff; overflow-wrap: anywhere; }
.sto-msg.is-mine { align-self: flex-end; background: var(--k-accent, #eef5ff); }

/* карточка сервиса в кабинете */
.sto-hrow, .sto-wrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 12px; }
.sto-hrow__d { flex: 0 0 120px; min-height: 44px; display: flex; align-items: center; margin: 0 0 8px; font-weight: 600; }
.sto-f--time { flex: 0 1 130px; }
.sto-f--price { flex: 0 1 140px; }
.sto-f--date { flex: 0 1 170px; }
.sto-wrow > .sto-check { flex: 1 1 220px; }
.sto-wrow > .sto-f:not(.sto-f--price):not(.sto-f--date) { flex: 1 1 220px; }
.sto-wrow > .kbtn { margin: 0 0 8px; }
.sto-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 8px; }
.sto-brand { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--k-line-soft, #dcdad5); border-radius: 6px; padding: 0 0 0 10px; background: #fff; }

/* расписание */
.sto-sched { display: flex; flex-direction: column; gap: 8px; }
.sto-srow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sto-srow.is-past { opacity: .6; }
.sto-srow__t { flex: 0 0 56px; font-weight: 600; }
.sto-srow__cells { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 200px; }
:is(#app, body) .kbtn.sto-cell--busy { background: #e8e8e8; }
.sto-cell { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--k-line, #bbb); border-radius: 4px; background: var(--k-accepted, #e6f4e6); }

@media (max-width: 600px) {
  .sto-item { flex-direction: column; }
  .sto-item__cover { width: 100%; height: 160px; }
  .sto-dl { grid-template-columns: 1fr; }
  .sto-dl dd { margin-bottom: 4px; }
  .sto-hrow__d { flex-basis: 100%; min-height: 0; }
  .sto-map { height: 280px; }
  .sto-acts > .kbtn, .sto-tabs > .kbtn { flex: 1 1 100%; }
  .sto-srow__cells > .kbtn, .sto-srow__cells > .sto-cell { flex: 1 1 100%; }
}
