/* Конструктор ванной: дополняет app.css (общая раскладка конструктора кухни). */

.rail-badge { position: absolute; top: 5px; right: 7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--tape); color: var(--tape-ink); font: 600 10.5px/17px var(--font); font-style: normal; }
.mobile-tabs .rail-badge { top: 4px; right: 10px; }

/* Левая колонка разделов: подписи в две строки, счётчик у иконки */
.bath-app .rail button { padding: 12px 4px 9px; }
.bath-app .rail button span { white-space: normal; overflow-wrap: break-word; hyphens: auto; max-width: 100%; font-size: 11px; line-height: 1.2; }
.bath-app .rail .rail-badge { top: 6px; right: auto; left: calc(50% + 6px); }

/* Категории каталога */
.bath-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bath-cats .swatch-icon { display: grid; place-items: center; background: var(--plaster); color: var(--ink-2, #3b3d45); }
.bath-cats .mat-tab[aria-selected="true"] .swatch-icon { background: var(--tape-soft); color: var(--tape); }
.bath-cats .swatch-icon svg { width: 22px; height: 22px; }
.bath-cats .mat-tab { min-height: 56px; align-items: center; }
.bath-cats .mat-tab b { white-space: normal; hyphens: manual; overflow-wrap: break-word; line-height: 1.15; }
.bath-cats .mat-tab small { white-space: nowrap; }
.bath-cats .mat-tab .swatch { width: 36px; height: 36px; }

/* Карточки предметов */
.bath-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.bath-item {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .1s;
}
.bath-item:hover { border-color: var(--ink); box-shadow: 0 4px 14px rgba(20, 22, 30, .06); }
.bath-item:active { transform: scale(.99); }
.bath-item.is-placed { background: #fcfcfd; }
.bath-item.is-placed .bath-item-ic { background: var(--tape-soft); color: var(--tape); }
.bath-item-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--plaster); color: var(--ink); flex: none; }
.bath-item-ic svg { width: 22px; height: 22px; }
.bath-item-tx { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.bath-item-tx b { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.bath-item-tx small { font-size: 12px; color: var(--muted); }
.bath-item-tx em { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bath-item-pr { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.bath-item-pr i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: #fff; }
.bath-item-pr i svg { width: 15px; height: 15px; }
.bath-item:hover .bath-item-pr i { background: var(--tape); }

/* Готовые комнаты */
.bath-presets { display: grid; grid-template-columns: 1fr; gap: 8px; }
.bath-preset { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; font: inherit; color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.bath-preset:hover { border-color: var(--tape); box-shadow: 0 4px 14px rgba(255, 77, 77, .1); }
.bath-preset b { font-size: 14.5px; }
.bath-preset span { font-size: 13px; color: var(--ink-2, #4a4d57); line-height: 1.35; }
.bath-preset small { font-size: 12px; color: var(--muted); }
.bath-preset.is-empty { border-style: dashed; }

.bath-area { margin: 10px 0 0; padding: 8px 12px; border-radius: var(--radius); background: var(--plaster); font-size: 13px; color: var(--ink-2, #4a4d57); }

/* Свойства выбранного предмета */
.insp-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: start; margin-bottom: 12px; }
.insp-head .panel-title { margin: 0 0 2px; font-size: 16px; }
.insp-head .panel-hint { margin: 0; }
.bath-insp .segmented { flex-wrap: wrap; }
.bath-insp .segmented button { flex: 1 1 45%; }
.btn-ghost.is-danger { color: var(--error, #c2412d); }
.btn-ghost svg { width: 16px; height: 16px; }

/* Список в смете */
.bath-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bath-list li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; cursor: pointer; font-size: 13.5px; }
.bath-list li:hover { background: var(--plaster); }
.bath-list .bath-item-ic { width: 32px; height: 32px; }
.bath-list .bath-item-ic svg { width: 18px; height: 18px; }
.bath-list b { font-weight: 600; white-space: nowrap; }

/* Подпись над выбранным предметом в 3D */
.bath-tag { padding: 4px 9px; border-radius: 8px; background: var(--ink); color: #fff; font: 600 12px var(--font); white-space: nowrap; pointer-events: none; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.bath-app .stage-tools { max-width: calc(100% - 28px); }
.bath-reset { color: var(--error, #c2412d); }
.bath-reset:hover { background: #fff2f0; }

/* Ссылка «Поделиться» */
.share-row { display: flex; gap: 8px; margin: 12px 0; }
.share-input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: 14px; background: var(--plaster); }
.share-apps { margin-top: 4px; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.project-title { display: flex; align-items: center; gap: 8px; min-width: 0; }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-success { text-align: center; }
.lead-success p { color: var(--ink-2, #4a4d57); margin: 8px 0 18px; }

@media (max-width: 900px) {
  .bath-app .topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; }
  .bath-app .brand-sub, .bath-app .project-title, .bath-app .tool-projects span { display: none; }
  .bath-app .login-btn { padding: 0 10px; }
  .mobile-tabs { display: grid; grid-template-columns: repeat(5, 1fr); }
  .mobile-tabs button { min-width: 0; position: relative; }
  .bath-item { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 8px; }
  .bath-item-ic { width: 36px; height: 36px; }
  .btn-sm { display: none; }
  .bath-reset span { display: none; }
  .bath-reset { width: 36px; justify-content: center; padding: 0; }
}

.bath-stack { flex-direction: column; align-items: stretch; gap: 8px; background: var(--plaster); color: var(--ink); }
.bath-stack.is-ok { background: #e9f6ee; color: #1f5f3a; }
.bath-stack .btn-primary, .bath-stack .btn-ghost { align-self: flex-start; }
