/* Share popup — centered modal (reference layout) */

.pd-share-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pd-share-modal-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.pd-share-modal {
  position: fixed;
  inset: 0;
  z-index: 10055;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.pd-share-modal__inner {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  padding: 1.1rem 1.15rem 1.15rem;
  transform: scale(0.96);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  font-family: inherit;
}

.pd-share-modal.is-open .pd-share-modal__inner {
  transform: scale(1);
}

.pd-share-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}

.pd-share-modal__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f0f0f;
  letter-spacing: -0.02em;
}

.pd-share-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #606060;
  font-size: 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
  line-height: 1;
  transition: background 0.15s ease;
}

.pd-share-modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #0f0f0f;
}

/* Icon slider row */
.pd-share-modal__slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.1rem;
  min-height: 88px;
}

.pd-share-modal__track-outer {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  margin: 0 0.15rem;
}

.pd-share-modal__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.15rem 0.25rem 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.pd-share-modal__track::-webkit-scrollbar {
  display: none;
}

.pd-share-modal__option {
  flex: 0 0 auto;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: #0f0f0f;
}

.pd-share-modal__option:focus-visible {
  outline: 2px solid var(--pd-brand-teal, #1e5f7a);
  outline-offset: 2px;
  border-radius: 8px;
}

.pd-share-modal__option-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.pd-share-modal__option-icon--light {
  background: #f2f2f2;
  color: inherit;
  border: 1px solid #e5e5e5;
}

.pd-share-modal__option-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: #606060;
  text-align: center;
  line-height: 1.15;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-share-modal__nav {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f2f2f2;
  color: #303030;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: background 0.15s ease, opacity 0.15s ease;
  z-index: 2;
}

.pd-share-modal__nav:hover:not(:disabled) {
  background: #e8e8e8;
}

.pd-share-modal__nav:disabled,
.pd-share-modal__nav[hidden] {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.pd-share-modal__nav--prev {
  margin-right: 0.15rem;
}

.pd-share-modal__nav--next {
  margin-left: 0.15rem;
}

/* Link + copy row */
.pd-share-modal__link-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #d3d3d3;
  border-radius: 10px;
  padding: 0.55rem 0.55rem 0.55rem 0.85rem;
  background: #fff;
  min-height: 44px;
}

.pd-share-modal__url {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.8rem;
  color: #303030;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.pd-share-modal__copy-btn {
  flex-shrink: 0;
  border: 1px solid #d3d3d3;
  border-radius: 999px;
  background: #fff;
  color: #0f0f0f;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pd-share-modal__copy-btn:hover {
  background: #f8f8f8;
}

.pd-share-modal__copy-btn.is-done {
  border-color: #2a9d6a;
  color: #1a6b42;
  background: #f0faf4;
}

.pd-share-modal__copy-msg {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a6b42;
  text-align: center;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, max-height 0.2s ease;
}

.pd-share-modal__copy-msg.is-visible {
  opacity: 1;
  max-height: 24px;
}

body.pd-share-sheet-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .pd-share-modal {
    align-items: flex-end;
    padding: 0;
  }

  .pd-share-modal__inner {
    max-width: none;
    border-radius: 14px 14px 0 0;
    padding: 1rem 1rem 1.25rem;
  }
}
