/* Shared social-contact Popover. Markup lives in site-components.js. */
.social-contact-component {
  --social-popover-bg: #f2f2f2;
  --social-popover-border: #ffffff;
  --social-background-subtle: #e1e5e5;
  --social-border-default: #e1e5e5;
  --social-border-subtle: #d9dede;
  --social-text-default: #151716;
  --social-text-subtle: #696e6c;
  --social-text-subtler: #969c99;
  --social-text-subtlest: #acb2af;
  --social-popover-filter:
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06))
    drop-shadow(0 -6px 6px rgba(0, 0, 0, 0.03))
    drop-shadow(0 14px 14px rgba(0, 0, 0, 0.08));
}

:root[data-theme="dark"] .social-contact-component {
  --social-popover-bg: #141414;
  --social-popover-border: rgba(255, 255, 255, 0.18);
  --social-background-subtle: #141414;
  --social-border-default: #191a1a;
  --social-border-subtle: #282929;
  --social-text-default: #ffffff;
  --social-text-subtle: #aeb0af;
  --social-text-subtler: #838584;
  --social-text-subtlest: #727372;
  --social-popover-filter: none;
}

.social-contact-component .social-preview {
  --popover-surface-bg: var(--social-popover-bg);
  --popover-surface-border: var(--social-popover-border);
  --popover-surface-filter: var(--social-popover-filter);
  position: absolute;
  z-index: 10;
  bottom: calc(100% + 2px);
  left: 0;
  display: flex;
  visibility: hidden;
  box-sizing: border-box;
  width: 270px;
  flex-direction: column;
  align-items: flex-start;
  padding: 15px 17px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: var(--social-text-default);
  font-family: "Manrope", "PingFang SC", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transform-origin: bottom left;
  transition: opacity 160ms ease, transform 180ms cubic-bezier(0.2, 0, 0, 1), visibility 160ms;
}

.social-contact-component .social-preview::before,
.social-contact-component .social-preview::after {
  content: none;
}

.social-contact-component .contact-link:hover .social-preview,
.social-contact-component .contact-link:focus-visible .social-preview {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.social-contact-component .social-preview-top {
  display: flex;
  width: 100%;
  height: 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--social-text-subtle);
  font-family: "Manrope", "PingFang SC", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.social-contact-component .social-preview-platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--social-text-subtle);
  text-transform: none;
}

.social-contact-component .social-preview-icon {
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 12px 12px;
  mask-size: 12px 12px;
}

.social-contact-component .social-preview-icon--x {
  -webkit-mask-image: url("./assets/social/icon-x.svg");
  mask-image: url("./assets/social/icon-x.svg");
}

.social-contact-component .social-preview-icon--telegram {
  -webkit-mask-image: url("./assets/social/icon-telegram.svg");
  mask-image: url("./assets/social/icon-telegram.svg");
}

.social-contact-component .social-preview-icon--instagram {
  -webkit-mask-image: url("./assets/social/icon-instagram.svg");
  mask-image: url("./assets/social/icon-instagram.svg");
}

.social-contact-component .social-preview-icon--email {
  -webkit-mask-image: url("./assets/social/icon-email.svg");
  mask-image: url("./assets/social/icon-email.svg");
}

.social-contact-component .social-preview-divider {
  width: 100%;
  height: 1px;
  margin-bottom: 12px;
  background: var(--social-border-default);
}

.social-contact-component .social-preview-body {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.social-contact-component .social-preview-label {
  display: block;
  padding-bottom: 3px;
  color: var(--social-text-subtler);
  font-family: "PingFang SC", "MiSans VF", "Noto Sans SC", sans-serif;
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.social-contact-component .social-preview strong {
  display: flex;
  min-height: 19px;
  flex-direction: column;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 18.2px;
}

.social-contact-component .social-preview-handle {
  display: flex;
  min-height: 17px;
  flex-direction: column;
  justify-content: center;
  color: var(--social-text-subtler);
  font-family: "Geist Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.social-contact-component .social-preview-action {
  width: 100%;
  min-height: 25px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 0;
  background-image: repeating-linear-gradient(to right, var(--social-border-subtle) 0 1px, transparent 1px 2px);
  background-position: left top;
  background-repeat: repeat-x;
  background-size: auto 1px;
  color: var(--social-text-subtle);
  font-family: "PingFang SC", "MiSans VF", "Noto Sans SC", sans-serif;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
}

.social-contact-component .social-preview-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  min-width: 42px;
  max-width: 42px;
  min-height: 42px;
  max-height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 9999px;
  background: var(--social-background-subtle);
}

.social-contact-component .social-preview-avatar img {
  position: absolute;
  inset: 0;
  display: block;
  width: 42px;
  height: 42px;
  max-width: none;
  border-radius: 9999px;
  object-fit: cover;
}

.social-contact-component .social-preview--x,
.social-contact-component .social-preview--instagram {
  height: 145px;
}

.social-contact-component .social-preview--telegram {
  height: 153px;
}

.social-contact-component .social-preview--email {
  height: 158px;
}

.social-contact-component .social-preview-identity,
.social-contact-component .social-preview-message,
.social-contact-component .social-preview-recipient {
  display: flex;
  min-width: 0;
  flex: 1 0 0;
  flex-direction: column;
}

.social-contact-component .social-preview-identity {
  gap: 2px;
}

.social-contact-component .social-preview-message,
.social-contact-component .social-preview-recipient {
  gap: 1px;
}

.social-contact-component .social-preview--x .social-preview-body {
  gap: 10px;
}

.social-contact-component .social-preview--telegram,
.social-contact-component .social-preview--email {
  padding-block: 12px;
}

.social-contact-component .social-preview--telegram .social-preview-label {
  color: var(--social-text-subtlest);
}

.social-contact-component .social-preview--email .social-preview-top {
  height: 14px;
}

.social-contact-component .social-preview--email .social-preview-body {
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.social-contact-component .social-preview-stamp {
  display: flex;
  width: 52px;
  height: 58px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 0;
  border-radius: 2px;
  background-image:
    repeating-linear-gradient(to right, var(--social-border-subtle) 0 3px, transparent 3px 5px),
    repeating-linear-gradient(to right, var(--social-border-subtle) 0 3px, transparent 3px 5px),
    repeating-linear-gradient(to bottom, var(--social-border-subtle) 0 3px, transparent 3px 5px),
    repeating-linear-gradient(to bottom, var(--social-border-subtle) 0 3px, transparent 3px 5px);
  background-position: left top, left bottom, left top, right top;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-size: auto 1px, auto 1px, 1px auto, 1px auto;
  color: var(--social-text-subtle);
  font-family: "PingFang SC", "MiSans VF", "Noto Sans SC", sans-serif;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.social-contact-component .social-preview-stamp-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: currentColor;
  -webkit-mask: url("./assets/social/icon-email-send.svg") center / 18px 18px no-repeat;
  mask: url("./assets/social/icon-email-send.svg") center / 18px 18px no-repeat;
}

.social-contact-component .social-preview--telegram .social-preview-body {
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.social-contact-component .social-preview-bubble {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--social-border-default);
  color: var(--social-text-subtle);
}

.social-contact-component .social-preview-bubble-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background: currentColor;
  -webkit-mask: url("./assets/social/icon-telegram-send.svg") center / 20px 20px no-repeat;
  mask: url("./assets/social/icon-telegram-send.svg") center / 20px 20px no-repeat;
}

@media (hover: none) and (pointer: coarse), (max-width: 520px) {
  .social-contact-component .social-preview {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-contact-component .social-preview {
    transition-duration: 0.01ms;
  }
}
