/* cab-metrics.css — опрос родителя и смайлик ребёнка (cab-metrics.js).
   Над нижними вкладками кабинета (--tabbar-h, site.css). */

.cm-sheet {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h, 0px) + 12px + env(safe-area-inset-bottom)); z-index: 70;
  width: min(100% - 24px, 460px); max-height: calc(100dvh - 120px); overflow-y: auto;
  padding: 16px 18px 18px; border-radius: 20px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 18px 48px rgba(20, 21, 26, .22);
  transform: translate(-50%, 24px); opacity: 0; transition: transform .25s ease, opacity .25s ease;
}
.cm-sheet.is-open { transform: translate(-50%, 0); opacity: 1; }
.cm-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cm-sheet h2 { margin: 0; font-size: 1.0625rem; }
.cm-x {
  flex: none; width: 44px; height: 44px; margin: -8px -10px -8px 0; border: 0; border-radius: 50%;
  background: none; color: var(--muted); font: inherit; font-size: 1.125rem; cursor: pointer;
}
.cm-sub { margin: 4px 0 10px; color: var(--muted); font-size: .875rem; }
.cm-scale { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.cm-scale legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: .9375rem; }
.cm-scale-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cm-num {
  min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.cm-num[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cm-scale-ends { display: flex; justify-content: space-between; margin-top: 4px; color: var(--muted); font-size: .75rem; }
.cm-lab { display: block; margin: 4px 0 6px; font-size: .875rem; color: var(--muted); }
.cm-text {
  display: block; width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; resize: vertical;
}
.cm-send {
  display: block; width: 100%; min-height: 48px; margin-top: 12px; border: 0; border-radius: 14px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.cm-send:disabled { opacity: .45; cursor: default; }
.cm-thanks { margin: 8px 0; font-weight: 600; text-align: center; }

.cm-mood {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h, 0px) + 12px + env(safe-area-inset-bottom)); z-index: 65;
  display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 14px; border-radius: 999px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(20, 21, 26, .18);
  transform: translate(-50%, 16px); opacity: 0; transition: transform .25s ease, opacity .25s ease;
}
.cm-mood.is-open { transform: translate(-50%, 0); opacity: 1; }
.cm-mood-q { font-weight: 600; font-size: .9375rem; margin-right: 4px; white-space: nowrap; }
.cm-mood-b {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--bg, #faf8f4);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.cm-mood-x { width: 36px; height: 44px; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.cm-sheet button:focus-visible, .cm-mood button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .cm-sheet, .cm-mood { transition: none; } }
