.awp-share-modal-open {
  overflow: hidden;
}

.awp-product-share {
  display: inline-flex;
  align-items: center;
}

.awp-product-share--summary {
  margin-top: 18px;
}

.awp-product-share__trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--color-gray200, #e5e7eb);
  border-radius: 10px;
  background: var(--color-background, #fff);
  color: var(--color-text, #222);
  font: inherit;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease, transform .2s ease;
}

.awp-product-share__trigger i {
  font-size: 20px;
  line-height: 1;
}

.awp-product-share__trigger:hover,
.awp-product-share__trigger:focus-visible {
  border-color: var(--theme-primary-hover-color, var(--theme-primary-color));
  color: var(--theme-primary-hover-color, var(--theme-primary-color));
  outline: none;
}

.awp-product-share-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.awp-product-share-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.awp-product-share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .56);
  backdrop-filter: blur(2px);
}

.awp-product-share-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 18px;
  background: #fff;
  color: #111827;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
  transform: translateY(10px) scale(.985);
  transition: transform .2s ease;
  outline: none;
}

.awp-product-share-modal.is-open .awp-product-share-modal__dialog {
  transform: translateY(0) scale(1);
}

.awp-product-share-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef0f2;
}

.awp-product-share-modal__header h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.awp-product-share-modal__header p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.75;
}

.awp-product-share-modal__close {
  appearance: none;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.awp-product-share-modal__close:hover,
.awp-product-share-modal__close:focus-visible {
  background: color-mix(in srgb, var(--theme-primary-color) 10%, transparent);
  color: var(--theme-primary-hover-color, var(--theme-primary-color));
  outline: none;
}

.awp-product-share-modal__product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}

.awp-product-share-modal__product strong {
  font-size: 14px;
  line-height: 1.8;
}

.awp-product-share-modal__image {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  object-fit: contain;
  border: 1px solid #eef0f2;
  border-radius: 10px;
  background: #fff;
}

.awp-product-share-modal__copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.awp-product-share-modal__url-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 12px;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  background: #f8fafc;
  color: #6b7280;
}

.awp-product-share-modal__url-wrap:focus-within {
  border-color: var(--theme-primary-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary-color) 10%, transparent);
}

.awp-product-share-modal__url {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  color: #374151;
  direction: ltr;
  text-align: left;
  box-shadow: none !important;
  outline: none;
  font-size: 13px;
}

.awp-product-share-modal__copy {
  appearance: none;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--theme-primary-color);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}

.awp-product-share-modal__copy:hover,
.awp-product-share-modal__copy:focus-visible,
.awp-product-share-modal__copy.is-copied {
  background: var(--theme-primary-hover-color, var(--theme-primary-color));
  outline: none;
}

.awp-product-share-modal__copy:active {
  transform: scale(.98);
}

.awp-product-share-modal__status {
  min-height: 20px;
  margin: 8px 2px 0;
  color: #15803d;
  font-size: 12px;
  font-weight: 600;
}

.awp-product-share-modal__status.is-error {
  color: #b91c1c;
}

body[data-theme="dark"] .awp-product-share__trigger {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: #f3f4f6;
}

body[data-theme="dark"] .awp-product-share-modal__dialog {
  border-color: rgba(255,255,255,.1);
  background: #161a20;
  color: #f3f4f6;
}

body[data-theme="dark"] .awp-product-share-modal__header {
  border-bottom-color: rgba(255,255,255,.09);
}

body[data-theme="dark"] .awp-product-share-modal__header p,
body[data-theme="dark"] .awp-product-share-modal__url-wrap {
  color: #9ca3af;
}

body[data-theme="dark"] .awp-product-share-modal__close,
body[data-theme="dark"] .awp-product-share-modal__url-wrap {
  background: rgba(255,255,255,.06);
}

body[data-theme="dark"] .awp-product-share-modal__url-wrap,
body[data-theme="dark"] .awp-product-share-modal__image {
  border-color: rgba(255,255,255,.1);
}

body[data-theme="dark"] .awp-product-share-modal__url {
  color: #e5e7eb;
}

@media (max-width: 575px) {
  .awp-product-share-modal {
    align-items: flex-end;
    padding: 10px;
  }

  .awp-product-share-modal__dialog {
    width: 100%;
    padding: 18px;
    border-radius: 18px 18px 12px 12px;
  }

  .awp-product-share-modal__copy-row {
    grid-template-columns: 1fr;
  }

  .awp-product-share-modal__copy {
    width: 100%;
  }
}
