/* shared.css — sender-side Shared page polish on top of playlists.css */

.shr-tabs {
  display: flex;
  gap: 2px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 4px;
}
.shr-tab {
  appearance: none;
  background: transparent;
  border: none;
  padding: 12px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--pl-text-mute, rgba(255,255,255,0.5));
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s;
}
.shr-tab:hover { color: var(--pl-text, #fff); }
.shr-tab.is-active {
  color: var(--pl-text, #fff);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.shr-tab__c {
  font-size: 10.5px;
  padding: 1px 7px;
  min-width: 18px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--pl-text-mute, rgba(255,255,255,0.5));
  font-variant-numeric: tabular-nums;
}
.shr-tab.is-active .shr-tab__c {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
}

.shr-divider {
  padding: 18px 28px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--pl-text-mute, rgba(255,255,255,0.45));
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 8px;
}

.shr-empty {
  padding: 96px 24px;
  text-align: center;
  color: var(--pl-text-mute, rgba(255,255,255,0.55));
}
.shr-empty__glyph {
  font-size: 36px;
  margin-bottom: 14px;
  color: rgba(255,255,255,0.25);
}
.shr-empty__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--pl-text, #fff);
  margin-bottom: 6px;
}
.shr-empty__sub {
  font-size: 13px;
  line-height: 1.55;
  max-width: 360px;
  margin: 0 auto;
}
.shr-empty__cta { margin-top: 18px; }
.shr-mobile-plus,
.shr-row__icon,
.shr-row__recipient,
.shr-row__badges { display: none; }
.shr-row__type {
  color: var(--pl-text-mute, rgba(255,255,255,0.55));
  font-size: 12px;
  font-weight: 500;
}

/* Override playlists.css fixed grid for Shared rows.
   Cells are: title-with-meta · sparkline/badge · views/wmark · gate/lastSeen · status · right-mono */
.shr-row .pl-row__main {
  position: relative;
  grid-template-columns:
    minmax(0, 2.5fr) 80px 80px 80px 80px 40px 32px !important;
  padding: 0 48px 0 0;
  gap: 12px;
  align-items: center;
}
.shr-row .pl-row__cell {
  min-width: 0;
  display: flex;
  align-items: center;
}
.shr-row .pl-chip-mini,
.shr-row .pl-status {
  max-width: 100%;
  justify-content: center;
}
.shr-row .shr-row__more {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  justify-content: center;
  display: flex;
  align-items: center;
}

/* ───────── Recipients tab — bespoke row layout ───────── */
.rcp-row .rcp-row__main {
  grid-template-columns:
    minmax(0, 1.6fr)
    minmax(0, 1.4fr)
    minmax(120px, auto)
    minmax(90px, auto)
    minmax(80px, 0.5fr) !important;
  gap: 18px !important;
  padding: 14px 20px !important;
  align-items: center;
}
.rcp-cell--name { display: flex; align-items: center; gap: 12px; min-width: 0; padding-left: 4px; }
.rcp-avatar {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 4px 10px rgba(0,0,0,0.35);
}
.rcp-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rcp-name__title {
  color: var(--text, #f5f5f5);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rcp-name__sub {
  color: var(--text-mute, rgba(255,255,255,0.50));
  font-size: 11.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: 0;
}
.rcp-email {
  font-size: 11.5px;
  color: var(--text-mute, rgba(255,255,255,0.55));
  letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block;
}
.rcp-wm {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  color: rgba(255,255,255,0.6);
}
.rcp-seen {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.rcp-cell--plays { display: flex; align-items: baseline; gap: 6px; justify-content: flex-end; }
.rcp-plays {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text, #f5f5f5);
  letter-spacing: -0.01em;
}
.rcp-plays__lbl {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
}
.rcp-row.is-selected {
  background: linear-gradient(90deg, rgba(180,130,220,0.05), transparent 80%) !important;
  box-shadow: inset 2px 0 0 oklch(0.66 0.18 290) !important;
}
.shr-row .pl-row__title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}
.shr-row .pl-row__sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.shr-pageheader {
  padding: 24px 28px 12px;
}
.shr-pageheader .pl-pageheader__eb {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-preview .pl-pv__close {
  display: grid;
  place-items: center;
  line-height: 1;
  padding: 0;
}
.pl-preview .shr-x-icon {
  width: 14px;
  height: 14px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  transform: translateY(-0.5px);
}

/* drop mono in shared scope */
.main .mono, .pl-preview .mono, .shr-tabs .mono, .shr-divider { font-family: inherit !important; letter-spacing: 0 !important; text-transform: none !important; }

@media (max-width: 767px) {
  body.is-mobile .shr-pageheader {
    padding: 18px 16px 12px !important;
    gap: 14px !important;
  }
  body.is-mobile .shr-pageheader .pl-pageheader__l {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }
  body.is-mobile .shr-pageheader .pl-pageheader__t {
    order: 0;
    font-size: 32px;
    line-height: 1;
    letter-spacing: 0;
  }
  body.is-mobile .shr-pageheader .pl-pageheader__eb {
    order: 1;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.62);
    white-space: nowrap;
    max-width: 100%;
  }
  body.is-mobile .shr-pageheader .pl-pageheader__r {
    gap: 10px !important;
  }
  body.is-mobile .shr-pageheader .pl-btn,
  body.is-mobile .shr-empty__cta {
    min-height: 44px;
    border: 0 !important;
    border-radius: 12px;
    background: #000 !important;
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(0,0,0,0.28);
    font-size: 13px;
    font-weight: 700;
    transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
  }
  body.is-mobile .shr-pageheader .pl-btn:hover,
  body.is-mobile .shr-empty__cta:hover {
    background: #0a0a0a !important;
    transform: translateY(-1px);
  }
  body.is-mobile .shr-pageheader .pl-btn:focus-visible,
  body.is-mobile .shr-empty__cta:focus-visible {
    outline: 2px solid rgba(255,255,255,0.78);
    outline-offset: 2px;
  }
  body.is-mobile .shr-pageheader .pl-btn:disabled,
  body.is-mobile .shr-empty__cta:disabled {
    opacity: 0.4;
    transform: none;
  }
  body.is-mobile .shr-mobile-plus { display: inline; }
  body.is-mobile .shr-tabs { display: none !important; }

  body.is-mobile .shr-row {
    margin: 0 16px 12px !important;
    border-radius: 16px;
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 28px rgba(0,0,0,0.22);
    overflow: hidden;
  }
  body.is-mobile .shr-row.is-selected {
    background: rgba(255,255,255,0.075) !important;
    box-shadow: inset 2px 0 0 rgba(255,255,255,0.35), 0 10px 28px rgba(0,0,0,0.22) !important;
  }
  body.is-mobile .shr-row .pl-row__main {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 36px !important;
    gap: 10px !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 14px 12px 14px 14px !important;
    align-items: start !important;
  }
  body.is-mobile .shr-row .shr-row__summary {
    display: block !important;
    padding: 0 !important;
    min-width: 0;
  }
  body.is-mobile .shr-row .pl-row__name {
    gap: 7px;
    width: 100%;
  }
  body.is-mobile .shr-row__topline {
    display: flex !important;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
  }
  body.is-mobile .shr-row__icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 18px;
    justify-content: center;
    color: rgba(255,255,255,0.78);
  }
  body.is-mobile .shr-row__topline .pl-row__title-text {
    flex: 0 1 auto;
    min-width: 0;
  }
  body.is-mobile .shr-row__type {
    display: inline;
    flex: 0 0 auto;
    color: rgba(255,255,255,0.6);
    font-size: 11.5px;
    font-weight: 600;
  }
  body.is-mobile .shr-row__type::before {
    content: "·";
    padding-right: 7px;
    color: rgba(255,255,255,0.34);
  }
  body.is-mobile .shr-row__recipient {
    display: block;
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.is-mobile .shr-row__meta {
    color: rgba(255,255,255,0.45);
    font-size: 11px;
  }
  body.is-mobile .shr-row__meta span:nth-child(1),
  body.is-mobile .shr-row__meta span:nth-child(2) {
    display: none;
  }
  body.is-mobile .shr-row__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 2px;
  }
  body.is-mobile .shr-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.78);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
  }
  body.is-mobile .shr-badge--nda {
    border: 1px solid rgba(255,255,255,0.45);
    color: #fff;
  }
  body.is-mobile .shr-badge--opened { color: #58e6d9; }
  body.is-mobile .shr-badge--expired { color: #ff6f61; }
  body.is-mobile .shr-badge--soon { color: #ffd166; }
  body.is-mobile .shr-row .pl-row__cell:not(.shr-row__summary):not(.shr-row__more) {
    display: none !important;
  }
  body.is-mobile .shr-row .shr-row__more {
    position: static !important;
    transform: none !important;
    display: flex !important;
    grid-column: 2;
    grid-row: 1;
    align-self: start !important;
    justify-self: end;
    width: 36px;
    height: 36px;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.is-mobile .shr-row__more-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.76);
    font-size: 18px;
    line-height: 1;
  }

  body.is-mobile .shr-empty {
    margin: 42px 16px 0;
    padding: 52px 20px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: rgba(255,255,255,0.045);
  }
  body.is-mobile .shr-empty__title {
    font-size: 20px;
  }

  body.is-mobile .shr-mobile-sheet {
    z-index: 8200;
  }
  body.is-mobile .shr-mobile-sheet__scrim {
    background: rgba(0,0,0,0.58);
  }
  body.is-mobile .shr-mobile-sheet__panel {
    max-height: min(88dvh, 720px);
    border-radius: 24px 24px 0 0;
    border-color: rgba(255,255,255,0.10);
    background: rgba(15,15,18,0.96);
    box-shadow: 0 -22px 72px rgba(0,0,0,0.58);
  }
  body.is-mobile .shr-mobile-sheet__panel .pl-preview {
    max-height: min(88dvh, 720px);
  }
  body.is-mobile .shr-mobile-sheet__panel .pl-pv__cover {
    min-height: 118px !important;
  }
  body.is-mobile .shr-mobile-sheet__panel .pl-pv__mood {
    font-size: 12px;
  }
  body.is-mobile .shr-mobile-sheet__panel .pl-pv__title {
    font-size: 22px;
  }
  body.is-mobile .shr-mobile-sheet__panel .pl-pv__meta {
    color: rgba(255,255,255,0.72);
  }
}
