/* ade.messengers — кружок «Мы на связи в мессенджерах». Цвет, шрифт и отступы — переменные из настроек сайта */
.mw {
  --mw-accent: #008aff;
  --mw-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mw-bottom: 24px;
  --mw-bottom-mobile: 16px;
  font-family: var(--mw-font);
}
.mw *, .mw *::before, .mw *::after { box-sizing: border-box; }

.mw__fab {
  position: fixed; right: 24px; bottom: var(--mw-bottom); z-index: 9990;
  width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: var(--mw-accent);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--mw-accent) 40%, transparent);
  transition: transform .2s ease, filter .2s ease;
}
.mw__fab:hover { filter: brightness(.9); transform: scale(1.06); }
.mw__fab::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--mw-accent); animation: mw-pulse 2.4s ease-out infinite;
}
.mw__fab-icon { width: 28px; height: 28px; margin-left: -2px; }
@keyframes mw-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mw__fab::after { animation: none; display: none; } }

.mw__overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(20, 24, 33, .45);
}
.mw__overlay[hidden] { display: none; }
.mw__dialog {
  position: relative; width: 100%; max-width: 860px;
  background: #fff; border-radius: 20px; padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
  animation: mw-in .2s ease-out;
}
@keyframes mw-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.mw__close {
  position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: #5b6170;
  display: flex; align-items: center; justify-content: center;
}
.mw__close:hover { background: #3c414c; }
.mw__close svg { width: 20px; height: 20px; }
.mw__title { font-size: 32px; font-weight: 700; line-height: 1.2; color: #2b2f38; text-align: center; margin-bottom: 32px; }

.mw__body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mw__qr-col, .mw__links {
  background: rgba(231, 237, 246, .5); border-radius: 20px; padding: 32px 28px;
}
.mw__qr-col { position: relative; display: flex; flex-direction: column; align-items: center; }
.mw__qr-label {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: #c9e0fb; color: #2b2f38; font-size: 14px; font-weight: 600; padding: 6px 18px; border-radius: 6px;
}
.mw__qr-frame {
  position: relative; padding: 10px; border-radius: 12px;
  background:
    linear-gradient(#a9cdf5,#a9cdf5) top left / 24px 3px no-repeat,
    linear-gradient(#a9cdf5,#a9cdf5) top left / 3px 24px no-repeat,
    linear-gradient(#a9cdf5,#a9cdf5) top right / 24px 3px no-repeat,
    linear-gradient(#a9cdf5,#a9cdf5) top right / 3px 24px no-repeat,
    linear-gradient(#a9cdf5,#a9cdf5) bottom left / 24px 3px no-repeat,
    linear-gradient(#a9cdf5,#a9cdf5) bottom left / 3px 24px no-repeat,
    linear-gradient(#a9cdf5,#a9cdf5) bottom right / 24px 3px no-repeat,
    linear-gradient(#a9cdf5,#a9cdf5) bottom right / 3px 24px no-repeat;
}
.mw__qr { width: 244px; height: 244px; padding: 12px; background: #fff; border-radius: 10px; }
.mw__qr svg { display: block; width: 100%; height: 100%; }
.mw__qr-hint { margin-top: 14px; font-size: 14px; color: #5b6170; }
.mw__qr-name { font-weight: 600; color: #2b2f38; }

.mw__links { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.mw__btn {
  display: flex; align-items: stretch; height: 64px; border-radius: 10px; overflow: hidden;
  color: #fff !important; text-decoration: none !important; font-size: 20px; font-weight: 600; line-height: 1.2;
  transition: filter .2s ease, transform .2s ease;
}
.mw__btn:hover, .mw__btn:focus-visible { filter: brightness(1.06); transform: translateY(-1px); }
.mw__btn-icon {
  flex: 0 0 64px; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .1);
}
.mw__btn-icon svg { width: 28px; height: 28px; }
.mw__btn-icon img { width: 30px; height: 30px; border-radius: 8px; }
.mw__btn-text { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 12px; text-align: center; }
.mw__btn--whatsapp { background: #5fd36a; }
.mw__btn--telegram { background: #2aa6e8; }
.mw__btn--max { background: linear-gradient(90deg, #3d6bff 0%, #8a3dff 100%); }
.mw__phone { text-align: center; font-size: 14px; color: #5b6170; }
.mw__phone a { color: var(--mw-accent); text-decoration: none; white-space: nowrap; }
.mw__toast { font-size: 14px; line-height: 1.4; color: #2b2f38; text-align: center; }
.mw__toast:not(:empty) { background: #fff; border-radius: 8px; padding: 10px 12px; }

@media (max-width: 767px) {
  .mw__fab { right: 16px; bottom: var(--mw-bottom-mobile); width: 54px; height: 54px; }
  .mw__dialog { padding: 24px 16px 16px; border-radius: 16px; }
  .mw__close { top: 8px; right: 8px; width: 34px; height: 34px; }
  .mw__title { font-size: 22px; margin: 0 32px 20px; }
  .mw__body { grid-template-columns: 1fr; }
  .mw__qr-col { display: none; }
  .mw__links { padding: 20px 16px; gap: 12px; }
  .mw__btn { height: 56px; font-size: 18px; }
  .mw__btn-icon { flex-basis: 56px; }
}
