:root {
  --ddd-contact-brand: #174b57;
  --ddd-contact-brand-strong: #103943;
  --ddd-contact-accent: #ef6a3a;
  --ddd-contact-ink: #17242a;
  --ddd-contact-muted: #5e6a70;
  --ddd-contact-white: #ffffff;
}

.ddd-contact-layer,
.ddd-contact-layer *,
.ddd-contact-dialog,
.ddd-contact-dialog * {
  box-sizing: border-box;
}

.ddd-contact-rail {
  position: fixed;
  z-index: 20;
  top: 50%;
  right: 0;
  display: grid;
  width: 58px;
  transform: translateY(-50%);
}

.ddd-contact-rail-button {
  display: grid;
  min-height: 88px;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 10px 5px;
  border: 0;
  color: var(--ddd-contact-white);
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}

.ddd-contact-rail-button span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
}

.ddd-contact-rail-button strong {
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  writing-mode: vertical-rl;
}

.ddd-contact-rail-phone {
  background: var(--ddd-contact-brand-strong);
}

.ddd-contact-rail-wechat {
  background: var(--ddd-contact-accent);
}

.ddd-contact-rail-button:hover,
.ddd-contact-rail-button:focus-visible {
  filter: brightness(1.08);
}

.ddd-contact-mobile-bar {
  display: none;
}

.ddd-contact-dialog {
  position: fixed;
  width: min(390px, calc(100% - 32px));
  padding: 30px 28px 24px;
  border: 0;
  border-radius: 8px;
  color: var(--ddd-contact-ink);
  background: var(--ddd-contact-white);
  text-align: center;
}

.ddd-contact-dialog::backdrop {
  background: rgba(10, 24, 29, 0.72);
}

.ddd-contact-dialog-eyebrow {
  margin: 0 0 4px;
  color: var(--ddd-contact-accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
}

.ddd-contact-dialog h2 {
  margin: 0 0 18px;
  color: var(--ddd-contact-brand-strong);
  font-size: 22px;
  line-height: 32px;
}

.ddd-contact-dialog img {
  display: block;
  width: min(250px, 100%);
  height: auto;
  margin: 0 auto;
}

.ddd-contact-dialog > p:last-child {
  margin: 14px 0 0;
  color: var(--ddd-contact-muted);
  font-size: 14px;
  line-height: 24px;
}

.ddd-contact-dialog-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ddd-contact-ink);
  background: transparent;
  font-size: 28px;
  line-height: 34px;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  body {
    padding-bottom: 64px;
  }

  .ddd-contact-rail {
    display: none;
  }

  .ddd-contact-mobile-bar {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 60px;
    box-shadow: 0 -5px 18px rgba(16, 57, 67, 0.15);
  }

  .ddd-contact-mobile-phone,
  .ddd-contact-mobile-wechat {
    display: grid;
    min-width: 0;
    min-height: 60px;
    place-content: center;
    gap: 1px;
    padding: 8px 10px;
    border: 0;
    color: var(--ddd-contact-white);
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
  }

  .ddd-contact-mobile-phone {
    background: var(--ddd-contact-brand-strong);
  }

  .ddd-contact-mobile-wechat {
    background: var(--ddd-contact-accent);
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
  }

  .ddd-contact-mobile-phone span {
    font-size: 13px;
    line-height: 18px;
  }

  .ddd-contact-mobile-phone strong {
    font-size: 15px;
    line-height: 20px;
  }

  .ddd-contact-dialog {
    padding-right: 22px;
    padding-left: 22px;
  }
}
