.product-share-trigger {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.product-share-trigger:hover,
.product-share-trigger:focus-visible {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

body.share-dialog-open {
  overflow: hidden;
}

.product-share-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 35, 42, 0.58);
}

.product-share-overlay[hidden] {
  display: none !important;
}

.product-share-dialog {
  width: min(390px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 29, 34, 0.3);
}

.product-share-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.product-share-header p,
.product-share-header h2,
.product-share-name,
.product-share-hint,
.product-share-status {
  margin: 0;
}

.product-share-header p {
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.product-share-header h2 {
  font-size: 22px;
  line-height: 1.35;
}

.product-share-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.product-share-name {
  margin-top: 16px;
  overflow-wrap: anywhere;
  font-weight: 700;
  line-height: 1.5;
}

.product-share-qr {
  display: grid;
  width: 248px;
  height: 248px;
  margin: 18px auto 10px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.product-share-qr img {
  display: block;
  width: 232px;
  height: 232px;
  image-rendering: pixelated;
}

.product-share-hint {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.product-share-link {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.product-share-link input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  background: #f7f9fa;
  font: inherit;
}

.product-share-copy {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.product-share-copy:hover,
.product-share-copy:focus-visible {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.product-share-status {
  min-height: 20px;
  margin-top: 8px;
  color: var(--brand-dark);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 480px) {
  .product-share-overlay {
    padding: 12px;
  }

  .product-share-dialog {
    max-height: calc(100vh - 24px);
    padding: 20px;
  }

  .product-share-qr {
    width: 224px;
    height: 224px;
  }

  .product-share-qr img {
    width: 208px;
    height: 208px;
  }
}
