/* LifeDental custom messenger widget - replaces Jivo visually */
html body jdiv,
html body #jivo-iframe-container,
html body #jivo_container,
html body [id^="jivo"],
html body [class*="jivo"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ld-contact-widget,
.ld-contact-widget * { box-sizing: border-box; }

.ld-contact-widget {
  --ld-blue: #5f7fe2;
  --ld-blue-2: #4e6fda;
  --ld-cyan: #20c7c9;
  --ld-ink: #172033;
  --ld-muted: #66738a;
  --ld-line: rgba(108, 130, 170, .18);
  --ld-shadow: 0 24px 70px rgba(25, 42, 77, .22);
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147482600;
  font-family: Poppins, Outfit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ld-ink);
}

.ld-contact-widget.is-open .ld-contact-toggle {
  transform: translateY(0) scale(.94);
  background: #ffffff;
  color: var(--ld-blue);
  border-color: rgba(95, 127, 226, .26);
}

.ld-contact-toggle {
  width: 66px;
  height: 66px;
  border: 0;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--ld-blue) 0%, var(--ld-cyan) 100%);
  box-shadow: 0 18px 44px rgba(37, 171, 201, .36);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease;
  position: relative;
}
.ld-contact-toggle:hover { transform: translateY(-3px); box-shadow: 0 22px 54px rgba(37, 171, 201, .44); }
.ld-contact-toggle:focus-visible { outline: 3px solid rgba(95, 127, 226, .35); outline-offset: 4px; }
.ld-contact-toggle svg { width: 31px; height: 31px; }
.ld-contact-pulse { position: absolute; inset: -8px; border-radius: 28px; border: 1px solid rgba(32,199,201,.45); animation: ldPulse 2.4s ease-out infinite; pointer-events: none; }
@keyframes ldPulse { 0% { transform: scale(.82); opacity: .78; } 70%,100% { transform: scale(1.22); opacity: 0; } }

.ld-contact-panel {
  position: absolute;
  right: 0;
  bottom: 82px;
  width: 354px;
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(95, 127, 226, .16);
  box-shadow: var(--ld-shadow);
  overflow: hidden;
  transform: translateY(14px) scale(.96);
  transform-origin: right bottom;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.ld-contact-widget.is-open .ld-contact-panel { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.ld-contact-head {
  padding: 22px 22px 18px;
  background: radial-gradient(circle at 15% 10%, rgba(32,199,201,.28), transparent 36%), linear-gradient(135deg, rgba(95,127,226,.15), rgba(255,255,255,.96));
  border-bottom: 1px solid var(--ld-line);
}
.ld-contact-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ld-contact-photo {
  width: 66px;
  height: 66px;
  border-radius: 22px;
  object-fit: cover;
  object-position: center 30%;
  border: 3px solid rgba(255,255,255,.92);
  box-shadow: 0 12px 28px rgba(95,127,226,.22);
  background: #fff;
  flex: 0 0 66px;
}
.ld-contact-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; background: rgba(31, 187, 122, .12); color: #0f8f61; font-size: 12px; font-weight: 800; letter-spacing: .01em; }
.ld-contact-status:before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #19c37d; box-shadow: 0 0 0 4px rgba(25,195,125,.14); }
.ld-contact-title { margin: 9px 0 0; font-size: 22px; line-height: 1.18; font-weight: 900; color: var(--ld-ink); }
.ld-contact-subtitle { margin: 14px 0 0; color: var(--ld-muted); font-size: 14px; line-height: 1.48; }
.ld-contact-person { display: flex; align-items: center; gap: 12px; padding: 16px 22px 12px; }
.ld-contact-avatar { width: 48px; height: 48px; border-radius: 17px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(95,127,226,.18), rgba(32,199,201,.22)); color: var(--ld-blue); font-weight: 900; letter-spacing: .02em; }
.ld-contact-person strong { display: block; font-size: 15px; color: var(--ld-ink); }
.ld-contact-person span { display: block; margin-top: 2px; font-size: 12px; color: var(--ld-muted); }
.ld-contact-actions { padding: 14px 14px 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ld-contact-link { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 9px; min-height: 108px; padding: 13px 9px; border-radius: 20px; background: #fff; border: 1px solid var(--ld-line); text-decoration: none !important; color: var(--ld-ink) !important; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.ld-contact-link:hover { transform: translateY(-2px); border-color: rgba(95, 127, 226, .32); background: #f8fbff; }
.ld-contact-icon { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center; color: #fff; }
.ld-contact-icon svg { width: 21px; height: 21px; display: block; }
.ld-contact-wa .ld-contact-icon { background: #25D366; }
.ld-contact-tg .ld-contact-icon { background: #229ED9; }
.ld-contact-viber .ld-contact-icon { background: #7360F2; }
.ld-contact-phone .ld-contact-icon { background: var(--ld-blue); }
.ld-contact-text strong { display: block; font-size: 14px; font-weight: 850; }
.ld-contact-text span { display: none; margin-top: 2px; font-size: 12px; color: var(--ld-muted); }
.ld-contact-foot { padding: 8px 20px 18px; font-size: 12px; color: #8290a6; text-align: center; }

@media (max-width: 767px) {
  .ld-contact-widget { right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .ld-contact-toggle { width: 62px; height: 62px; border-radius: 21px; }
  .ld-contact-panel { position: fixed; left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); width: auto; border-radius: 26px; transform-origin: right bottom; }
  .ld-contact-head { padding: 20px 20px 16px; }
  .ld-contact-title { font-size: 20px; }
  .ld-contact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 12px 16px;
  }

  .ld-contact-link {
    min-height: 96px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 9px;
    padding: 12px 8px;
    border-radius: 20px;
  }

  .ld-contact-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 15px;
  }

  .ld-contact-text strong {
    font-size: 13px;
  }

  .ld-contact-text span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) { .ld-contact-widget *, .ld-contact-pulse { animation: none !important; transition: none !important; } }


.ld-contact-nudge {
  position: absolute;
  right: 78px;
  bottom: 10px;
  width: 250px;
  padding: 13px 15px;
  border-radius: 18px 18px 6px 18px;
  background: #fff;
  color: var(--ld-ink, #171717);
  border: 1px solid rgba(18,18,18,.10);
  box-shadow: 0 16px 42px rgba(0,0,0,.18);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px) scale(.96);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.ld-contact-nudge:after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 18px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-right: 1px solid rgba(18,18,18,.10);
  border-bottom: 1px solid rgba(18,18,18,.10);
  transform: rotate(-45deg);
}
.ld-contact-nudge.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.ld-contact-nudge strong { display:block; margin-bottom:2px; font-weight:700; color:#148a90; }
.ld-contact-nudge button { position:absolute; top:6px; right:7px; width:22px; height:22px; border:0; background:transparent; color:#9b918d; cursor:pointer; font-size:18px; line-height:1; }
.ld-contact-nudge-text { padding-right: 16px; }

@media (max-width: 767px) {
  .ld-contact-nudge { right: 72px; bottom: 8px; width: min(238px, calc(100vw - 108px)); padding: 12px 14px; font-size: 12.5px; }
}
