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

.gw-contact-widget {
  position: fixed;
  right: 20px;
  top: 55%;
  z-index: 70;
  width: 56px;
  transform: translateY(-50%);
  color: #fff;
  font-family: inherit;
}

.gw-contact-widget__rail {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  overflow: visible;
  background: #a7adb4;
  box-shadow: 0 16px 36px rgba(0, 30, 64, 0.2);
}

.gw-contact-widget__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  align-items: center;
  width: 56px;
  max-width: min(216px, calc(100vw - 32px));
  min-height: 56px;
  border: 0;
  color: inherit;
  background: #a7adb4;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: width 240ms ease, background-color 180ms ease, border-radius 180ms ease;
}

.gw-contact-widget__item + .gw-contact-widget__item {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.gw-contact-widget__item:first-child {
  border-radius: 999px 999px 0 0;
}

.gw-contact-widget__item:last-child {
  border-radius: 0 0 999px 999px;
}

.gw-contact-widget__item:is(:hover, :focus-visible) {
  width: 156px;
}

.gw-contact-widget__item[data-gw-contact-action="wechat"]:is(:hover, :focus-visible) {
  width: 156px;
}

.gw-contact-widget__item[data-gw-contact-action="mail"]:is(:hover, :focus-visible) {
  width: 216px;
}

.gw-contact-widget__item[data-gw-contact-action="phone"]:is(:hover, :focus-visible) {
  width: 184px;
}

.gw-contact-widget__item:is(:hover, :focus-visible) {
  border-radius: 999px;
  background: #003366;
}

.gw-contact-widget__icon {
  display: inline-flex;
  width: 56px;
  min-width: 56px;
  min-height: 56px;
  align-items: center;
  justify-content: center;
}

.gw-contact-widget__icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.gw-contact-widget__panel {
  display: flex;
  min-height: 56px;
  align-items: center;
  min-width: 0;
  padding: 0 0 0 6px;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.gw-contact-widget__item:is(:hover, :focus-visible) .gw-contact-widget__panel {
  opacity: 1;
  transform: translateX(0);
}

.gw-contact-widget__label,
.gw-contact-widget__hint {
  display: none;
}

.gw-contact-widget__label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.96);
}

.gw-contact-widget__value {
  display: block;
  margin-top: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.96);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gw-contact-widget__hint {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.62);
}

.gw-contact-widget__toast {
  position: fixed;
  right: 20px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 95;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(0, 51, 102, 0.18);
  border-radius: 10px;
  background: #fff;
  color: #001e40;
  box-shadow: 0 14px 36px rgba(0, 30, 64, 0.18);
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.gw-contact-widget__toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.gw-contact-mobile-button {
  display: none;
  position: fixed;
  right: 16px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 74;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: #003366;
  color: #fff;
  box-shadow: 0 14px 28px rgba(0, 30, 64, 0.22);
}

.gw-contact-mobile-button svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.gw-contact-widget__overlay {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: none;
  background: rgba(0, 0, 0, 0.38);
}

.gw-contact-widget__overlay.is-open {
  display: block;
}

.gw-contact-widget__sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: none;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: #fff;
  color: #001e40;
  box-shadow: 0 -18px 40px rgba(0, 30, 64, 0.18);
}

.gw-contact-widget__sheet.is-open {
  display: block;
}

html.gw-contact-widget-sheet-open body {
  overflow: hidden;
}

.gw-contact-widget__sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.gw-contact-widget__sheet-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.gw-contact-widget__close {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid #c3c6d1;
  border-radius: 999px;
  background: #f9f9f9;
  color: #001e40;
}

.gw-contact-widget__close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.gw-contact-widget__sheet-list {
  display: grid;
  gap: 10px;
}

.gw-contact-widget__sheet-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 12px;
  border: 1px solid #c3c6d1;
  border-radius: 10px;
  background: #fff;
  color: #001e40;
  text-align: left;
  text-decoration: none;
}

.gw-contact-widget__sheet-item:focus-visible,
.gw-contact-mobile-button:focus-visible,
.gw-contact-widget__close:focus-visible,
.gw-contact-widget__item:focus-visible {
  outline: 3px solid rgba(0, 51, 102, 0.28);
  outline-offset: 2px;
}

.gw-contact-widget__sheet-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #003366;
  color: #fff;
}

.gw-contact-widget__sheet-icon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
}

.gw-contact-widget__sheet-label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.gw-contact-widget__sheet-value {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.35;
  color: #43474f;
}

@media (max-width: 768px) {
  .gw-contact-widget {
    display: none;
  }

  .gw-contact-mobile-button {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gw-contact-widget__item,
  .gw-contact-widget__panel,
  .gw-contact-widget__toast {
    transition: none;
  }
}
