/* Canonical share sheet — profile / project / campaign (no shadows) */
.pkd2-share-modal[hidden] {
  display: none !important;
}

.pkd2-share-modal {
  --sm-ink: #1E242E;
  --sm-muted: #6B7280;
  --sm-border: #EBECEE;
  --sm-hover-border: #D7DAE0;
  --sm-surface: #F8F9FB;
  --sm-radius: 16px;
  --sm-icon: 48px;
  --sm-glyph: 22px;
  --sm-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.pkd2-share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.52);
  backdrop-filter: blur(8px);
}

.pkd2-share-modal__panel {
  position: relative;
  width: min(440px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  box-shadow: none;
  padding: 1.5rem 1.35rem 1.35rem;
  animation: pkd2ShareIn 0.22s var(--sm-ease);
}

@keyframes pkd2ShareIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pkd2-share-modal__panel { animation: none; }
}

.pkd2-share-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid var(--sm-border);
  background: #fff;
  color: var(--sm-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pkd2-share-modal__close:hover {
  background: var(--sm-surface);
  border-color: var(--sm-hover-border);
}

.pkd2-share-modal__close svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.pkd2-share-modal__close svg::before,
.pkd2-share-modal__close svg::after,
.pkd2-share-modal__icon::before,
.pkd2-share-modal__icon::after {
  content: none !important;
  display: none !important;
}

.pkd2-share-modal__head {
  padding-right: 2.25rem;
  margin-bottom: 1.15rem;
}

.pkd2-share-modal__title {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--sm-ink);
}

.pkd2-share-modal__subtitle {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--sm-muted);
}

.pkd2-share-modal__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.pkd2-share-modal__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  margin: 0;
  min-width: 0;
  padding: 0.7rem 0.35rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--sm-ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.pkd2-share-modal__item:hover {
  background: var(--sm-surface);
  border-color: var(--sm-border);
  color: var(--sm-ink);
  text-decoration: none;
}

.pkd2-share-modal__item:focus-visible {
  outline: 2px solid #1E242E;
  outline-offset: 2px;
}

.pkd2-share-modal__icon {
  width: var(--sm-icon);
  height: var(--sm-icon);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sm-border);
  background: var(--sm-surface);
  color: var(--sm-ink);
  flex: none;
  line-height: 0;
  overflow: hidden;
}

.pkd2-share-modal__icon svg {
  width: var(--sm-glyph);
  height: var(--sm-glyph);
  display: block;
  flex: none;
  max-width: var(--sm-glyph);
  max-height: var(--sm-glyph);
}

.pkd2-share-modal__icon svg:not([fill="none"]) {
  fill: currentColor;
  stroke: none;
}

.pkd2-share-modal__icon svg[fill="none"] {
  fill: none;
  stroke: currentColor;
}

.pkd2-share-modal__icon.is-facebook {
  background: #E8F1FE;
  border-color: #D4E4FC;
  color: #1877F2;
}

.pkd2-share-modal__icon.is-instagram {
  background: #FCEEF4;
  border-color: #F5D6E4;
  color: #E1306C;
}

.pkd2-share-modal__icon.is-linkedin {
  background: #E8F2F8;
  border-color: #D3E4F1;
  color: #0A66C2;
}

.pkd2-share-modal__icon.is-x {
  background: #F3F4F6;
  border-color: #E5E7EB;
  color: #111111;
}

.pkd2-share-modal__icon.is-whatsapp {
  background: #E9F9EF;
  border-color: #CDEFD9;
  color: #128C7E;
}

.pkd2-share-modal__icon.is-viber {
  background: #F1ECFA;
  border-color: #E0D5F5;
  color: #7360F2;
}

.pkd2-share-modal__icon.is-email {
  background: #F8F9FB;
  border-color: #EBECEE;
  color: #1E242E;
}

.pkd2-share-modal__icon.is-copy {
  background: #F8F9FB;
  border-color: #EBECEE;
  color: #1E242E;
}

.pkd2-share-modal__label {
  display: block;
  width: 100%;
  max-width: 100%;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--sm-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 420px) {
  .pkd2-share-modal {
    --sm-icon: 44px;
    --sm-glyph: 20px;
  }

  .pkd2-share-modal__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .pkd2-share-modal__item {
    padding: 0.55rem 0.2rem 0.45rem;
  }

  .pkd2-share-modal__icon {
    border-radius: 10px;
  }

  .pkd2-share-modal__label {
    font-size: 0.6875rem;
  }
}

html[data-theme="dark"] .pkd2-share-modal {
  --sm-ink: #F3F4F6;
  --sm-muted: #A1A1AA;
  --sm-border: #2A2C34;
  --sm-hover-border: #3A3D48;
  --sm-surface: #22252D;
}

html[data-theme="dark"] .pkd2-share-modal__panel,
html[data-theme="dark"] .pkd2-share-modal__close {
  background: #181A20;
  border-color: var(--sm-border);
  color: var(--sm-ink);
}

html[data-theme="dark"] .pkd2-share-modal__icon.is-facebook {
  background: rgba(24, 119, 242, 0.16);
  border-color: rgba(24, 119, 242, 0.28);
  color: #5B9EF5;
}

html[data-theme="dark"] .pkd2-share-modal__icon.is-instagram {
  background: rgba(225, 48, 108, 0.16);
  border-color: rgba(225, 48, 108, 0.28);
  color: #F472B6;
}

html[data-theme="dark"] .pkd2-share-modal__icon.is-linkedin {
  background: rgba(10, 102, 194, 0.16);
  border-color: rgba(10, 102, 194, 0.28);
  color: #5BA3E0;
}

html[data-theme="dark"] .pkd2-share-modal__icon.is-x {
  background: #22252D;
  color: #F3F4F6;
  border-color: #2A2C34;
}

html[data-theme="dark"] .pkd2-share-modal__icon.is-whatsapp {
  background: rgba(18, 140, 126, 0.18);
  border-color: rgba(18, 140, 126, 0.3);
  color: #34D399;
}

html[data-theme="dark"] .pkd2-share-modal__icon.is-viber {
  background: rgba(115, 96, 242, 0.18);
  border-color: rgba(115, 96, 242, 0.3);
  color: #A78BFA;
}

html[data-theme="dark"] .pkd2-share-modal__icon.is-email,
html[data-theme="dark"] .pkd2-share-modal__icon.is-copy {
  background: #22252D;
  color: #F3F4F6;
  border-color: #2A2C34;
}
