/* Чат-бот СломПро — оформление виджета на slompro.ru.
   Позиции выверены относительно кнопки MAX (низ справа) и баннера cookie. */

#slomprobot, #slomprobot * { box-sizing: border-box; }
#slomprobot { --bot-accent: #c84d22; --bot-accent-dark: #a83c18; --bot-ink: #202823; z-index: 54; font: 15px/1.45 Arial, Helvetica, sans-serif; color: var(--bot-ink); }

#slomprobot .launch {
  position: fixed; right: 20px; bottom: 92px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bot-accent); color: #fff; border: 0; border-radius: 999px;
  padding: 14px 20px; font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(200, 77, 34, .38);
  transition: transform .15s ease, box-shadow .15s ease;
}
#slomprobot .launch:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(200, 77, 34, .48); }
#slomprobot .launch:focus-visible { outline: 3px solid var(--bot-accent); outline-offset: 3px; }

#slomprobot .panel {
  display: none; position: fixed; right: 20px; bottom: 160px; z-index: 61;
  width: min(400px, calc(100vw - 24px));
  height: min(580px, calc(100dvh - 210px));
  background: #fff; border: 1px solid #dedbd7; border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(30, 30, 30, .22);
  flex-direction: column;
}
#slomprobot .panel.open { display: flex; animation: bot-rise .18s ease; }
@keyframes bot-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

#slomprobot header { background: #202b25; color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
#slomprobot .logo { background: var(--bot-accent); color: #fff; border-radius: 9px; padding: 8px 9px; font-weight: 900; font-size: 13px; }
#slomprobot header div:nth-child(2) { flex: 1; min-width: 0; }
#slomprobot header small { display: block; opacity: .75; font-size: 12px; }
#slomprobot header button { background: none; border: 0; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }

#slomprobot .msgs { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: #faf9f6; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
#slomprobot .bubble { max-width: 92%; white-space: pre-wrap; overflow-wrap: anywhere; padding: 11px 13px; border-radius: 13px; font-size: 14px; }
#slomprobot .bot { background: #fff; border: 1px solid #e5e3de; align-self: flex-start; }
#slomprobot .user { background: #f7ece7; border: 1px solid #ecd6cc; align-self: flex-end; }

#slomprobot .controls { flex-shrink: 0; max-height: 40%; overflow-y: auto; padding: 10px; background: #fff; border-top: 1px solid #eee; display: flex; flex-direction: column; gap: 8px; }
#slomprobot .choices { display: flex; flex-wrap: wrap; gap: 7px; }
#slomprobot button.opt, #slomprobot a.opt { background: #fff; border: 1px solid #ddd; border-radius: 20px; padding: 9px 12px; cursor: pointer; font-size: 13px; color: var(--bot-ink); text-decoration: none; }
#slomprobot button.opt:hover, #slomprobot a.opt:hover { border-color: var(--bot-accent); color: var(--bot-accent-dark); }
#slomprobot a.opt.link { background: #f7ece7; border-color: #ecd6cc; font-weight: 700; }

#slomprobot .row { display: flex; gap: 7px; }
#slomprobot input[type=text], #slomprobot input[type=tel] { min-width: 0; flex: 1; border: 1px solid #ddd; border-radius: 10px; padding: 11px; font-size: 14px; color: var(--bot-ink); }
#slomprobot .send { background: var(--bot-accent); border: 0; border-radius: 10px; color: #fff; font-weight: 700; padding: 10px 14px; cursor: pointer; }
#slomprobot .send:disabled { opacity: .5; cursor: default; }
#slomprobot .send:focus-visible { outline: 3px solid var(--bot-accent); outline-offset: 2px; }

#slomprobot .consent { display: flex; flex-direction: column; gap: 9px; }
#slomprobot .consent-label { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.4; color: #3b423d; }
#slomprobot .consent-label input { width: 17px; height: 17px; margin: 1px 0 0; flex: none; accent-color: var(--bot-accent); }
#slomprobot .consent-label a, #slomprobot .policy { color: var(--bot-accent-dark); }
#slomprobot .policy { font-size: 11.5px; }

@media (max-width: 700px) {
  #slomprobot .launch { right: 12px; bottom: calc(152px + env(safe-area-inset-bottom, 0px)); }
  #slomprobot .panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  #slomprobot header { padding-top: max(12px, env(safe-area-inset-top)); }
  #slomprobot .controls { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
