/* 右下角联系浮窗（aiweb1） */
.contact-widget {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  font-family: inherit;
}

@media (min-width: 768px) {
  .contact-widget {
    right: 1.5rem;
    bottom: 1.5rem;
  }
}

/* 联系卡片 */
.contact-widget__panel {
  width: min(20rem, calc(100vw - 2.5rem));
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #121212;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem) scale(0.98);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s;
  pointer-events: none;
}

.contact-widget__panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.contact-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-widget__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.contact-widget__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 0.25rem;
  background: transparent;
  color: #9ca3af;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease;
}

.contact-widget__close:hover,
.contact-widget__close:focus-visible {
  color: #fff;
  outline: none;
}

.contact-widget__list {
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
}

.contact-widget__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.contact-widget__item:hover,
.contact-widget__item:focus-visible {
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.contact-widget__icon-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #1c1c1c;
  box-shadow: 0 0 12px rgba(252, 213, 53, 0.25);
}

.contact-widget__icon-wrap .fa {
  font-size: 1rem;
  color: #fcd535;
}

.contact-widget__body {
  flex: 1;
  min-width: 0;
}

.contact-widget__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.contact-widget__value {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: #9ca3af;
  line-height: 1.35;
  word-break: break-all;
}

.contact-widget__chevron {
  flex-shrink: 0;
  color: #6b7280;
  font-size: 0.75rem;
}

/* FAB + 呼吸灯 */
.contact-fab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fcd535;
  color: #121212;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(252, 213, 53, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-fab .fa {
  font-size: 1.35rem;
  position: relative;
  z-index: 1;
}

.contact-fab:hover,
.contact-fab:focus-visible {
  transform: scale(1.04);
  outline: none;
}

.contact-fab::before,
.contact-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.contact-fab::before {
  inset: -6px;
  background: radial-gradient(circle, rgba(252, 213, 53, 0.45) 0%, rgba(252, 213, 53, 0) 70%);
  animation: contact-fab-breathe 2.4s ease-in-out infinite;
  z-index: 0;
}

.contact-fab::after {
  inset: -2px;
  border: 1px solid rgba(252, 213, 53, 0.55);
  opacity: 0.7;
  animation: contact-fab-ring 2.4s ease-in-out infinite;
  z-index: 0;
}

@keyframes contact-fab-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.22);
    opacity: 0.9;
  }
}

@keyframes contact-fab-ring {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-fab::before,
  .contact-fab::after {
    animation: none;
  }
}
