.contact-widget {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 1000;
}

.contact-widget__trigger {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.contact-widget__trigger:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.3);
}

.contact-widget__trigger:focus-visible,
.contact-widget__close:focus-visible,
.contact-widget__chat:focus-visible,
.contact-widget__web:focus-visible,
.contact-widget__phone a:focus-visible {
  outline: 3px solid #f2c230;
  outline-offset: 3px;
}

.contact-widget__icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.contact-widget__dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(92vw, 380px);
  max-height: calc(100dvh - 32px);
  margin: 0;
  padding: 28px;
  overflow-y: auto;
  box-sizing: border-box;
  border: 0;
  border-radius: 24px;
  color: #0f172a;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.3);
}

.contact-widget__dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

.contact-widget__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.contact-widget__title {
  margin: 0 36px 8px;
  color: #172554;
  font-size: 22px;
  font-weight: 800;
}

.contact-widget__description {
  margin: 0 0 16px;
  color: #64748b;
  line-height: 1.55;
}

.contact-widget__qr {
  width: min(220px, 70vw);
  height: auto;
  margin: 0 auto 14px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
}

.contact-widget__phone {
  margin: 0 0 16px;
  color: #475569;
  font-weight: 700;
}

.contact-widget__phone a {
  color: #0b4db8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-widget__chat {
  min-height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 12px 22px;
  border-radius: 12px;
  background: #0068ff;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.contact-widget__chat:hover {
  background: #0055d4;
}

.contact-widget__web {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 8px 12px;
  color: #334155;
  font-weight: 700;
  text-underline-offset: 3px;
}

.contact-widget__web:hover {
  color: #0068ff;
}

@media (max-width: 640px) {
  .contact-widget__trigger {
    width: 56px;
    height: 56px;
  }

  .contact-widget__dialog {
    width: min(calc(100vw - 24px), 380px);
    max-height: calc(100dvh - 24px);
    padding: 24px 20px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-widget__trigger {
    transition: none;
  }
}
