/* Онлайн-консультант: боковая кнопка у правого края и окно записи. Цвета — из переменных main.css. */
.adkc { font-family: inherit; }

/* боковая кнопка-вкладка */
.adkc-launcher {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 1000;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 11px 18px; border: 0; border-radius: 14px 0 0 14px; cursor: pointer;
  background: var(--grad, linear-gradient(135deg, #e63946, #f4a261)); color: #fff;
  box-shadow: -6px 8px 26px rgba(230, 57, 70, .4);
  transition: padding .2s, box-shadow .2s;
}
.adkc-launcher:hover { padding-right: 15px; box-shadow: -8px 10px 30px rgba(230, 57, 70, .55); }
.adkc-launcher svg { width: 24px; height: 24px; flex: none; }
.adkc-launcher__text {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 14px; font-weight: 700; letter-spacing: .03em; white-space: nowrap;
}
.adkc-launcher__close { display: none; }
.adkc.is-open .adkc-launcher__chat { display: none; }
.adkc.is-open .adkc-launcher__close { display: block; }
.adkc-dot {
  position: absolute; top: -5px; left: -5px; width: 14px; height: 14px; border-radius: 50%;
  background: #22c55e; border: 2px solid #0f0f1a; animation: adkc-pulse 2s infinite;
}
.adkc.is-open .adkc-dot { display: none; }
@keyframes adkc-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 100% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } }

.adkc-hint {
  position: fixed; right: 62px; top: 50%; transform: translateY(-50%); z-index: 1000;
  width: 230px; padding: 12px 34px 12px 14px;
  background: #fff; color: #14141f; border-radius: 14px 4px 14px 14px; font-size: 14px; line-height: 1.35;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); cursor: pointer;
}
.adkc-hint b { display: block; margin-bottom: 2px; }
.adkc-hint__x {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: #eef0f4; color: #555; cursor: pointer; font-size: 15px; line-height: 1;
}
.adkc-hint[hidden] { display: none; }

/* окно */
.adkc-panel {
  position: fixed; right: 64px; top: 50%; transform: translateY(-50%); z-index: 1001;
  width: 370px; height: min(600px, calc(100vh - 40px));
  display: none; flex-direction: column; overflow: hidden;
  background: var(--bg2, #0f0f1a); color: var(--text, #fff);
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.adkc-panel.is-open { display: flex; }

.adkc-head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; background: #15151f; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.adkc-ava {
  width: 38px; height: 38px; border-radius: 50%; flex: none; position: relative;
  background: var(--grad, #e63946); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; letter-spacing: .02em;
}
.adkc-ava::after { content: ''; position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; border: 2px solid #15151f; }
.adkc-title { flex: 1; min-width: 0; line-height: 1.25; }
.adkc-title b, .adkc-title span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adkc-title b { font-size: 15px; }
.adkc-title span { color: var(--text2, #9899a6); font-size: 12px; }
.adkc-icon {
  width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: #c8c9d4;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.adkc-icon:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.adkc-icon svg { width: 18px; height: 18px; }

.adkc-bots { display: flex; align-items: center; gap: 6px; padding: 8px 12px 8px 14px; background: #121219; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 12.5px; color: var(--text2, #9899a6); }
.adkc-bots span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adkc-bot { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; color: #fff; font-weight: 600; font-size: 12.5px; text-decoration: none; flex: none; }
.adkc-bot svg { width: 14px; height: 14px; }
.adkc-bot--tg { background: #229ed9; }
.adkc-bot--max { background: linear-gradient(135deg, #3b6cff, #8b3dff); }

/* переписка: сообщения и варианты ответа — в одной прокрутке */
.adkc-feed {
  flex: 1; position: relative; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 7px;
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
.adkc-feed::-webkit-scrollbar { width: 4px; }
.adkc-feed::-webkit-scrollbar-track { background: transparent; }
.adkc-feed::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); }
.adkc-msg { display: flex; }
.adkc-msg--me { justify-content: flex-end; }
.adkc-bubble {
  max-width: 85%; padding: 8px 12px 16px; border-radius: 14px 14px 14px 4px; position: relative;
  background: #1d1d2a; font-size: 14px; line-height: 1.4; word-wrap: break-word;
}
.adkc-msg--me .adkc-bubble { background: var(--red, #e63946); border-radius: 14px 14px 4px 14px; }
.adkc-bubble a { color: #ffb4b9; }
.adkc-msg--me .adkc-bubble a { color: #fff; }
.adkc-time { position: absolute; right: 9px; bottom: 3px; font-size: 10px; color: rgba(255, 255, 255, .45); }
.adkc-typing { padding: 11px 13px; display: flex; gap: 4px; }
.adkc-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9899a6; animation: adkc-dots 1s infinite; }
.adkc-typing i:nth-child(2) { animation-delay: .15s; }
.adkc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes adkc-dots { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.adkc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px; }
.adkc-chips[hidden] { display: none; }
.adkc-chip {
  padding: 6px 12px; border-radius: 999px; border: 1.5px solid rgba(230, 57, 70, .75); background: rgba(230, 57, 70, .06);
  color: #fff; font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: none; line-height: 1.25;
}
.adkc-chip:hover { background: rgba(230, 57, 70, .2); border-color: var(--red, #e63946); }
.adkc-chip--primary { background: var(--grad, #e63946); border-color: transparent; font-weight: 700; padding: 8px 18px; }
.adkc-chip--ghost { border-color: rgba(255, 255, 255, .18); background: transparent; color: #c8c9d4; }
.adkc-consent { width: 100%; margin: 2px 0 0; font-size: 11px; color: var(--text2, #9899a6); }

.adkc-input { display: flex; gap: 8px; padding: 8px 10px; border-top: 1px solid rgba(255, 255, 255, .06); background: #15151f; }
.adkc-input[hidden] { display: none; }
.adkc-input input {
  flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12);
  background: #0c0c14; color: #fff; font: inherit; font-size: 14.5px; outline: none;
}
.adkc-input input:focus { border-color: var(--red, #e63946); }
.adkc-send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--grad, #e63946); color: #fff; cursor: pointer; flex: none; display: flex; align-items: center; justify-content: center; }
.adkc-send svg { width: 18px; height: 18px; }

.adkc-foot { display: flex; justify-content: center; gap: 10px; padding: 7px 12px 9px; font-size: 12px; color: var(--text2, #9899a6); background: #15151f; }
.adkc-foot a { color: #c8c9d4; text-decoration: underline; text-underline-offset: 2px; }
.adkc-foot a:hover { color: #fff; }

@media (max-width: 720px) {
  .adkc-launcher { padding: 12px 8px 14px; gap: 8px; }
  .adkc-launcher svg { width: 20px; height: 20px; }
  .adkc-launcher__text { font-size: 12.5px; }
  .adkc-hint { right: 50px; width: 190px; }
  .adkc-panel { inset: 0; transform: none; width: auto; height: auto; border-radius: 0; border: 0; }
  .adkc-input input { font-size: 16px; }   /* меньше 16px — iPhone увеличивает страницу при вводе */
  .adkc.is-open .adkc-launcher, .adkc.is-open .adkc-hint { display: none; }
}
