/**
 * Share panel body — mounts inside `playlists-media-bottom-sheet` scroll region.
 * Shell chrome lives in playlists-media-bottom-sheet.css.
 */
.pss-hidden {
  display: none !important;
}

/* CTA when list is draft/private — jump to Create list page for Save + Done */
.pss-editor-cta-wrap {
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: calc(var(--radius, 0.5rem) - 2px);
  border: 1px solid rgb(var(--border, 228 228 231));
  background: rgb(var(--muted, 244 244 245) / 0.55);
}

.dark .pss-editor-cta-wrap {
  background: rgb(39 39 42 / 0.45);
}

.pss-editor-cta__hint {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgb(var(--foreground, 10 10 10));
}

.dark .pss-editor-cta__hint {
  color: rgb(var(--foreground, 250 250 250));
}

.pss-editor-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border-radius: calc(var(--radius, 0.5rem) - 2px);
  border: 1px solid rgb(var(--border, 228 228 231));
  background: rgb(var(--primary, 24 24 27));
  color: rgb(var(--primary-foreground, 250 250 250));
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.pss-editor-cta__btn:hover {
  opacity: 0.92;
}

.pss-editor-cta__btn:active {
  transform: scale(0.98);
}

.pss-editor-cta__btn:focus-visible {
  outline: 2px solid rgb(var(--pss-ring));
  outline-offset: 2px;
}

.dark .pss-editor-cta__btn {
  background: rgb(var(--primary, 250 250 250));
  color: rgb(var(--primary-foreground, 24 24 27));
}

.pmb-scroll.pss-share-inner {
  --pss-ring: var(--ring, var(--primary, 24 24 27));
  padding: 0.65rem 1rem 0.75rem;
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
}

.pss-actions-sep,
.pss-social-sep {
  height: 1px;
  margin: 0 0 0.5rem;
  background: rgb(var(--border, 228 228 231));
}

/* Alert / hint */
.pss-callout {
  margin: 0 0 1rem;
  padding: 0.75rem 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  border-radius: calc(var(--radius, 0.5rem) - 2px);
  border: 1px solid rgb(var(--border, 228 228 231));
  background: rgb(var(--muted, 244 244 245) / 0.65);
  color: rgb(var(--foreground, 10 10 10));
}

.pss-callout--warn {
  border-color: rgb(251 191 36 / 0.45);
  background: rgb(254 252 232 / 0.9);
  color: rgb(120 53 15);
}

.dark .pss-callout--warn {
  border-color: rgb(245 158 11 / 0.35);
  background: rgb(66 32 6 / 0.45);
  color: rgb(253 230 138);
}

/* Custom share message (optional) */
.pss-custom-msg-wrap {
  margin: 0 0 0.5rem;
}

.pss-custom-msg__label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgb(var(--muted-foreground, 113 113 122));
}

.pss-custom-msg__textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  font-family: inherit;
  color: rgb(var(--foreground, 10 10 10));
  background: rgb(var(--card, 255 255 255));
  border: 1px solid rgb(var(--border, 228 228 231));
  border-radius: calc(var(--radius, 0.5rem) - 2px);
  resize: vertical;
}

.pss-custom-msg__textarea::placeholder {
  color: rgb(var(--muted-foreground, 113 113 122));
}

.pss-custom-msg__textarea:focus {
  outline: 2px solid rgb(var(--pss-ring));
  outline-offset: 1px;
}

.dark .pss-custom-msg__textarea {
  background: rgb(var(--card, 24 24 27));
  color: rgb(var(--foreground, 250 250 250));
}

/* Quick actions — always 3 columns per row until viewport forces otherwise */
.pss-actions-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.pss-action-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0.3rem 0.3rem;
  border-radius: calc(var(--radius, 0.5rem) - 2px);
  border: 1px solid rgb(var(--border, 228 228 231));
  background: rgb(var(--card, 255 255 255));
  color: rgb(var(--card-foreground, var(--foreground, 10 10 10)));
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease,
    transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.dark .pss-action-row {
  background: rgb(var(--card, 24 24 27));
}

.pss-action-row:hover:not(:disabled) {
  background: rgb(var(--accent, 244 244 245));
  color: rgb(var(--accent-foreground, 24 24 27));
  border-color: rgb(var(--border, 228 228 231));
  box-shadow: 0 2px 6px -1px rgb(0 0 0 / 0.08);
}

.dark .pss-action-row:hover:not(:disabled) {
  background: rgb(var(--accent, 39 39 42));
  color: rgb(var(--accent-foreground, 250 250 250));
}

.pss-action-row:focus-visible {
  outline: 2px solid rgb(var(--pss-ring));
  outline-offset: 2px;
}

.pss-action-row:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.pss-action-row:active:not(:disabled) {
  transform: scale(0.98);
}

.pss-action-row__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: calc(var(--radius, 0.5rem) - 4px);
  background: rgb(var(--muted, 244 244 245));
  color: rgb(var(--foreground, 10 10 10));
}

.pss-action-row:hover:not(:disabled) .pss-action-row__icon {
  background: rgb(var(--background, 250 250 250));
}

.dark .pss-action-row__icon {
  background: rgb(var(--muted, 39 39 42));
  color: rgb(var(--foreground, 250 250 250));
}

.dark .pss-action-row:hover:not(:disabled) .pss-action-row__icon {
  background: rgb(63 63 70);
}

.pss-action-row__icon svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
}

.pss-action-row__label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Section label — shadcn text-xs / tracking-widest */
.pss-section-label {
  margin: 0.6rem 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(var(--muted-foreground, 100 116 139));
}

/* Outline buttons full width — shadcn default + outline */
.pss-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: calc(var(--radius, 0.5rem) - 2px);
  border: 1px solid rgb(var(--border, 228 228 231));
  background: rgb(var(--background, 250 250 250));
  color: rgb(var(--foreground, 10 10 10));
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.pss-btn-outline:hover:not(:disabled) {
  background: rgb(var(--accent, 244 244 245));
  color: rgb(var(--accent-foreground, 24 24 27));
  border-color: rgb(var(--border, 228 228 231));
}

.pss-btn-outline:focus-visible {
  outline: 2px solid rgb(var(--pss-ring));
  outline-offset: 2px;
}

.pss-btn-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pss-social-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

/* Collapsible: Pinterest + Reddit */
.pss-social-more {
  margin-top: 0.4rem;
  border-radius: 1rem;
  border: 1px solid rgb(var(--border, 228 228 231));
  background: rgb(var(--muted, 244 244 245) / 0.4);
  overflow: hidden;
}

.dark .pss-social-more {
  background: rgb(39 39 42 / 0.45);
}

.pss-social-more__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(var(--foreground, 10 10 10));
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease;
}

.dark .pss-social-more__summary {
  color: rgb(var(--foreground, 250 250 250));
}

.pss-social-more__summary::-webkit-details-marker {
  display: none;
}

.pss-social-more__summary::after {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.2rem;
  border-right: 2px solid rgb(var(--muted-foreground, 100 116 139));
  border-bottom: 2px solid rgb(var(--muted-foreground, 100 116 139));
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.pss-social-more[open] .pss-social-more__summary::after {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.pss-social-more__summary:hover {
  background: rgb(var(--accent, 244 244 245) / 0.6);
}

.dark .pss-social-more__summary:hover {
  background: rgb(63 63 70 / 0.35);
}

.pss-social-more__panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0 0.5rem 0.5rem;
}

/* Branded social — compact rows, 2+ per line in grid */
.pss-btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 2.35rem;
  max-height: 2.65rem;
  padding: 0.3rem 0.5rem;
  border: none;
  border-radius: 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  transition:
    transform 0.12s ease,
    filter 0.15s ease,
    opacity 0.12s ease,
    box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.pss-btn-social:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
}

.dark .pss-btn-social:hover:not(:disabled) {
  filter: brightness(1.12);
}

.pss-btn-social:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}

.pss-btn-social:active:not(:disabled) {
  transform: scale(0.95);
}

.pss-btn-social:focus-visible {
  outline: 2px solid rgb(var(--pss-ring));
  outline-offset: 2px;
}

.pss-btn-social__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.pss-btn-social__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
}

.pss-btn-social__icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.pss-btn-social__label {
  font: inherit;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pss-btn-social--x {
  background: #0f1419;
  color: #fff;
}

.dark .pss-btn-social--x {
  background: #09090b;
  color: #fafafa;
}

.pss-btn-social--fb {
  background: #1877f2;
  color: #fff;
}

.pss-btn-social--ig {
  background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af);
  color: #fff;
  text-shadow: 0 1px 1px rgb(0 0 0 / 0.2);
}

.pss-btn-social--wa {
  background: #25d366;
  color: #fff;
}

.dark .pss-btn-social--wa {
  background: #20bd5a;
}

.pss-btn-social--threads {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a14 45%, #3d2467 100%);
  color: #fff;
}

.dark .pss-btn-social--threads {
  background: linear-gradient(135deg, #18181b 0%, #1c0a12 45%, #4a2d7a 100%);
}

.pss-btn-social--tiktok {
  background: #000;
  color: #fff;
  box-shadow:
    inset 2px 0 0 #25f4ee,
    0 1px 2px rgb(0 0 0 / 0.2);
}

.pss-btn-social--tiktok:hover:not(:disabled) {
  box-shadow:
    inset 2px 0 0 #25f4ee,
    0 3px 8px rgb(0 0 0 / 0.22);
}

.pss-btn-social--bsky {
  background: #0285ff;
  color: #fff;
}

.dark .pss-btn-social--bsky {
  background: #0c7ce8;
}

.pss-btn-social--tg {
  background: #229ed9;
  color: #fff;
}

.dark .pss-btn-social--tg {
  background: #1e8fc4;
}

.pss-btn-social--pin {
  background: #e60023;
  color: #fff;
}

.pss-btn-social--reddit {
  background: #ff4500;
  color: #fff;
}

.pss-footer-note {
  margin: 0.5rem 0 0;
  min-height: 1rem;
  font-size: 0.75rem;
  color: rgb(var(--muted-foreground, 100 116 139));
}
