/* ============================================================
   DIVOMIR · ВІДЖЕТ «ЗАМОВИТИ ДЗВІНОК»
   Яскрава форма ⇄ пульсуючий телефон (правий нижній кут).
   Месенджери переїжджають у лівий нижній кут, щоб не штовхатись.
   ============================================================ */

/* месенджери — ліворуч */
.float-msg { right: auto; left: 18px; }

/* ---- Контейнер віджета ---- */
.cb { position: fixed; right: 18px; bottom: 18px; z-index: 96; }

/* ---- Кнопка-телефон (FAB) ---- */
.cb-fab {
  position: absolute; right: 0; bottom: 0;
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cork) 0%, var(--walnut) 100%);
  color: #fff; border: none; cursor: pointer;
  display: grid; place-items: center; font-size: 1.7rem;
  box-shadow: 0 10px 26px rgba(110, 74, 48, 0.45);
  transition: transform 0.42s var(--ease), opacity 0.32s;
  transform-origin: bottom right; animation: cb-breathe 2.6s var(--ease) infinite;
}
.cb-fab:hover { transform: scale(1.08); }
/* пульсуюче кільце — «мигання, щоб було помітно» */
.cb-fab::before, .cb-fab::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--cork); animation: cb-ring 2.4s var(--ease) infinite;
}
.cb-fab::after { animation-delay: 1.2s; }
@keyframes cb-ring { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes cb-breathe { 0%, 100% { box-shadow: 0 10px 26px rgba(110,74,48,0.45); } 50% { box-shadow: 0 10px 34px rgba(201,154,99,0.75); } }

/* підказка біля кнопки */
.cb-tip {
  position: absolute; right: 76px; bottom: 17px; white-space: nowrap;
  background: var(--ink); color: var(--on-dark); font-size: 0.85rem; font-weight: 600;
  padding: 9px 14px; border-radius: var(--r-pill); box-shadow: var(--shadow-md);
  opacity: 0; transform: translateX(10px); pointer-events: none;
  transition: opacity 0.35s, transform 0.35s;
}
.cb-tip::after { content: ""; position: absolute; right: -5px; top: 50%; transform: translateY(-50%) rotate(45deg); width: 10px; height: 10px; background: var(--ink); }
.cb-tip.show { opacity: 1; transform: translateX(0); }

/* ---- Картка форми (морф із кнопки) ---- */
.cb-card {
  position: absolute; right: 0; bottom: 0; width: min(330px, calc(100vw - 36px));
  background: var(--cream); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 26px 70px rgba(40, 30, 16, 0.30); border: 1px solid var(--line);
  transform-origin: bottom right; transform: scale(0.2); opacity: 0; pointer-events: none;
  transition: transform 0.42s var(--ease), opacity 0.3s;
}
.cb-head {
  background: linear-gradient(135deg, var(--cork) 0%, var(--walnut) 100%);
  color: #fff; padding: 18px 20px; position: relative; overflow: hidden;
}
.cb-head .flute-bg { position: absolute; inset: 0; opacity: 0.18; }
.cb-head .ttl { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; position: relative; display: flex; align-items: center; gap: 9px; }
.cb-head .sub { font-size: 0.85rem; opacity: 0.92; margin-top: 4px; position: relative; }
.cb-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.2); border: none; color: #fff; cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; transition: background 0.2s; z-index: 3; }
.cb-close:hover { background: rgba(255,255,255,0.35); }
.cb-body { padding: 18px 20px 22px; }
.cb-body .field { margin-bottom: 12px; }
.cb-body input {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: 1rem; background: var(--latte); color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s;
}
.cb-body input:focus { outline: none; border-color: var(--cork); box-shadow: 0 0 0 3px rgba(201,154,99,0.18); }
.cb-body .btn { width: 100%; }
.cb-note { font-size: 0.76rem; color: var(--muted); text-align: center; margin-top: 10px; }

/* стан «відкрито» — морф */
.cb.open .cb-fab { transform: scale(0); opacity: 0; pointer-events: none; }
.cb.open .cb-tip { opacity: 0 !important; }
.cb.open .cb-card { transform: scale(1); opacity: 1; pointer-events: auto; }

/* міні-подяка всередині картки */
.cb-success { display: none; text-align: center; padding: 26px 16px; }
.cb-success.show { display: block; }
.cb-success .ok { width: 56px; height: 56px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto 14px; }
.cb-success strong { font-family: var(--font-display); display: block; margin-bottom: 6px; }
.cb-success span { font-size: 0.88rem; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .cb-fab { animation: none; }
  .cb-fab::before, .cb-fab::after { animation: none; opacity: 0; }
}

/* іконка Viber (вбудований SVG замість шрифтового гліфа) */
.ico-viber { width: 1em; height: 1em; vertical-align: -0.15em; }
.float-msg a .ico-viber { width: 1.5rem; height: 1.5rem; vertical-align: 0; }
.fcontact .ico-viber { margin-right: 2px; }
