/* Плавающие мессенджеры + попап «Напишите нам» */
.contact-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.contact-fab__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #64748B);
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.contact-fab a,
.contact-fab button.contact-fab__open {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.35rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.contact-fab a:hover,
.contact-fab button.contact-fab__open:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
}
.contact-fab__wa { background: #25D366; }
.contact-fab__tg { background: #229ED9; }
.contact-fab__max { background: linear-gradient(135deg, #5B4FE8 0%, #7C3AED 100%); font-size: 0.65rem; font-weight: 900; letter-spacing: -0.02em; font-family: Inter, sans-serif; }
.contact-fab__phone { background: #1E293B; font-size: 1.1rem; }

.contact-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.contact-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}
.contact-popup {
  background: #fff;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  padding: 28px 24px 24px;
  position: relative;
  box-shadow: 0 24px 48px rgba(0,0,0,0.15);
  animation: contactPopIn 0.35s ease;
}
@keyframes contactPopIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.contact-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: #F1F5F9;
  border-radius: 8px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #64748B;
}
.contact-popup__close:hover { background: #E2E8F0; color: #1E293B; }
.contact-popup h3 {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 8px;
  padding-right: 36px;
  color: #1E293B;
}
.contact-popup__lead {
  font-size: 0.95rem;
  color: #64748B;
  margin-bottom: 20px;
  line-height: 1.5;
}
.contact-popup__messengers {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.contact-popup__msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #1E293B;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 72px;
}
.contact-popup__msg-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.contact-popup__msg-icon--wa { background: #25D366; }
.contact-popup__msg-icon--tg { background: #229ED9; }
.contact-popup__msg-icon--max {
  background: linear-gradient(135deg, #5B4FE8, #7C3AED);
  font-size: 0.75rem;
  font-weight: 900;
  font-family: Inter, sans-serif;
}
.contact-popup__row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 12px;
}
.contact-popup__value {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1E293B;
  word-break: break-all;
}
.contact-popup__value a { color: inherit; }
.contact-popup__copy {
  flex-shrink: 0;
  padding: 0 14px;
  border: 1px solid #E2E8F0;
  background: #fff;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  color: #1E293B;
  transition: background 0.15s, border-color 0.15s;
}
.contact-popup__copy:hover { border-color: #F59E0B; background: #FFFBEB; }
.contact-popup__copy.copied {
  background: #ECFDF5;
  border-color: #10B981;
  color: #047857;
}
.contact-popup__call {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  text-align: center;
  background: #F59E0B;
  color: #1E293B;
  font-weight: 800;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
}
.contact-popup__call:hover { background: #D97706; color: #fff; }
.contact-popup__later {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}
@media (max-width: 480px) {
  .contact-fab a,
  .contact-fab button.contact-fab__open { width: 48px; height: 48px; }
}
