/* ============================================================================
   jr share modal — editorial vinyl-sleeve aesthetic
   matches site: --bg #0a0908, --accent #ffa33a, Poppins display + PT Sans body
   ============================================================================ */

.jr-share-root {
  position: fixed; inset: 0; z-index: 2147483646;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  font-family: 'PT Sans', -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.jr-share-root.is-open { display: flex; }

.jr-share-backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255,163,58,0.06) 0%, transparent 70%),
    rgba(8,7,6,0.86);
  backdrop-filter: blur(14px) saturate(0.85);
  -webkit-backdrop-filter: blur(14px) saturate(0.85);
  opacity: 0; transition: opacity 0.32s cubic-bezier(0.22,1,0.36,1);
}
.jr-share-root.is-open .jr-share-backdrop { opacity: 1; }

.jr-share-panel {
  position: relative;
  width: 100%; max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #11100e;
  border: 1px solid rgba(246,243,238,0.12);
  border-radius: 14px;
  padding: 0;
  color: #f6f3ee;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.75),
    0 8px 24px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.03);
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  transition: opacity 0.32s cubic-bezier(0.22,1,0.36,1),
              transform 0.32s cubic-bezier(0.22,1,0.36,1);
}
.jr-share-root.is-open .jr-share-panel { opacity: 1; transform: none; }

/* Film grain overlay on the panel — premium texture, matches site grain */
.jr-share-panel::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.18 0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='0.5'/></svg>");
}

/* Top eyebrow + close ─────────────────────────────────────────────────────── */
.jr-share-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px 0;
  position: relative; z-index: 1;
}
.jr-share-eyebrow {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: #ffa33a;
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0;
}
.jr-share-eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; }
.jr-share-close {
  background: transparent; border: 0;
  color: rgba(246,243,238,0.6); cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  border-radius: 50%;
  transition: color 0.18s, background 0.18s, transform 0.25s;
}
.jr-share-close:hover { color: #f6f3ee; background: rgba(246,243,238,0.06); transform: rotate(90deg); }
.jr-share-close:focus-visible { outline: 1px solid #ffa33a; outline-offset: 2px; }

/* Cover + title block ─────────────────────────────────────────────────────── */
.jr-share-card {
  padding: 26px 28px 22px;
  display: flex; gap: 22px; align-items: flex-start;
  position: relative; z-index: 1;
}
.jr-share-cover {
  flex: 0 0 132px; width: 132px; height: 132px;
  border-radius: 8px; overflow: hidden;
  background: #1a1815;
  border: 1px solid rgba(246,243,238,0.10);
  box-shadow: 0 14px 32px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.02);
  position: relative;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.jr-share-cover:hover { transform: translateY(-2px) rotate(-0.4deg); }
.jr-share-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jr-share-cover::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.10), transparent 55%);
}
.jr-share-meta { min-width: 0; flex: 1; padding-top: 4px; }
.jr-share-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 300; font-style: italic;
  font-size: 26px; line-height: 1.05;
  letter-spacing: -0.02em;
  color: #f6f3ee; margin: 0 0 10px;
  word-wrap: break-word;
  /* clamp to 3 lines so long titles don't break layout */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.jr-share-artist {
  font-family: 'PT Sans', sans-serif;
  font-size: 14px; color: rgba(246,243,238,0.72);
  margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.jr-share-role {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: #ffa33a;
  background: rgba(255,163,58,0.10);
  border: 1px solid rgba(255,163,58,0.32);
  padding: 6px 10px;
  border-radius: 999px;
}

/* Tab bar ─────────────────────────────────────────────────────────────────── */
.jr-share-tabs {
  position: relative; z-index: 1;
  display: flex; gap: 0;
  padding: 0 28px;
  border-bottom: 1px solid rgba(246,243,238,0.08);
}
.jr-share-tab {
  background: transparent; border: 0; cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(246,243,238,0.42);
  padding: 14px 18px 14px 0; margin-right: 24px;
  position: relative;
  transition: color 0.2s;
}
.jr-share-tab:last-child { margin-right: 0; }
.jr-share-tab:hover { color: rgba(246,243,238,0.72); }
.jr-share-tab[aria-selected="true"] { color: #f6f3ee; }
.jr-share-tab[aria-selected="true"]::after {
  content: ''; position: absolute; left: 0; right: 18px; bottom: -1px; height: 1px;
  background: #ffa33a;
}
.jr-share-tab:focus-visible { outline: 1px solid #ffa33a; outline-offset: 3px; border-radius: 2px; }

/* Tab panels ──────────────────────────────────────────────────────────────── */
.jr-share-panes { position: relative; z-index: 1; }
.jr-share-pane { display: none; padding: 22px 28px 26px; animation: jr-share-fade 0.24s cubic-bezier(0.22,1,0.36,1); }
.jr-share-pane.is-active { display: block; }
@keyframes jr-share-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* SHARE PANE — link field + social icons ─────────────────────────────────── */
.jr-share-linkrow {
  display: flex; gap: 6px;
  background: #0a0908;
  border: 1px solid rgba(246,243,238,0.12);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 18px;
}
.jr-share-linkrow input {
  flex: 1; min-width: 0;
  background: transparent; border: 0;
  color: rgba(246,243,238,0.86);
  font-family: 'PT Sans', sans-serif;
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
}
.jr-share-linkrow input:focus { color: #f6f3ee; }
.jr-share-copybtn {
  background: #ffa33a; color: #0a0908;
  border: 0; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0 18px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.18s, transform 0.25s;
  white-space: nowrap;
}
.jr-share-copybtn:hover { background: #ffb55a; }
.jr-share-copybtn:active { transform: scale(0.97); }
.jr-share-copybtn.is-copied { background: #1e7d3b; color: #fff; }
.jr-share-copybtn svg { width: 14px; height: 14px; }

.jr-share-services {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
  margin-bottom: 6px;
}
@media (max-width: 480px) {
  .jr-share-services { grid-template-columns: repeat(3, 1fr); }
}
.jr-share-svc {
  background: rgba(246,243,238,0.04);
  border: 1px solid rgba(246,243,238,0.10);
  color: rgba(246,243,238,0.86);
  cursor: pointer;
  border-radius: 8px;
  padding: 14px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: 'PT Sans', sans-serif;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.25s;
}
.jr-share-svc svg { width: 18px; height: 18px; }
.jr-share-svc:hover {
  border-color: #ffa33a;
  background: rgba(255,163,58,0.06);
  color: #f6f3ee;
  transform: translateY(-1px);
}
.jr-share-svc:focus-visible { outline: 1px solid #ffa33a; outline-offset: 2px; }

/* EMBED PANE — code block + live preview ─────────────────────────────────── */
.jr-share-embed-preview {
  background: #0a0908;
  border: 1px solid rgba(246,243,238,0.10);
  border-radius: 8px;
  padding: 14px;
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 14px;
}
.jr-share-embed-preview img {
  width: 56px; height: 56px; border-radius: 4px; object-fit: cover;
  border: 1px solid rgba(246,243,238,0.10);
}
.jr-share-embed-preview-meta { flex: 1; min-width: 0; }
.jr-share-embed-preview-title {
  font-family: 'Poppins', sans-serif; font-weight: 500;
  font-size: 13px; color: #f6f3ee;
  margin: 0 0 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jr-share-embed-preview-artist {
  font-size: 11px; color: rgba(246,243,238,0.6);
  margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jr-share-embed-preview-listen {
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #0a0908;
  background: #ffa33a;
  border-radius: 4px; padding: 7px 12px;
  text-decoration: none;
  white-space: nowrap;
}
.jr-share-embed-sizes {
  display: flex; gap: 6px; margin-bottom: 10px;
}
.jr-share-embed-size {
  background: rgba(246,243,238,0.04);
  border: 1px solid rgba(246,243,238,0.12);
  color: rgba(246,243,238,0.7);
  font-family: 'PT Sans', sans-serif;
  font-size: 11px; font-weight: 600;
  padding: 6px 12px; border-radius: 5px;
  cursor: pointer;
  transition: all 0.18s;
}
.jr-share-embed-size:hover { color: #f6f3ee; border-color: rgba(246,243,238,0.22); }
.jr-share-embed-size.is-active { color: #ffa33a; border-color: #ffa33a; background: rgba(255,163,58,0.08); }
.jr-share-embed-code {
  position: relative;
  background: #0a0908;
  border: 1px solid rgba(246,243,238,0.10);
  border-radius: 8px;
  padding: 14px 14px 14px 14px;
}
.jr-share-embed-code pre {
  margin: 0;
  font-family: 'SF Mono', Menlo, Consolas, 'JetBrains Mono', monospace;
  font-size: 11px; line-height: 1.6;
  color: rgba(246,243,238,0.82);
  white-space: pre-wrap; word-break: break-all;
  max-height: 120px; overflow-y: auto;
}
.jr-share-embed-copy {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,163,58,0.92); color: #0a0908;
  border: 0; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 5px;
  transition: background 0.18s;
}
.jr-share-embed-copy:hover { background: #ffa33a; }
.jr-share-embed-copy.is-copied { background: #1e7d3b; color: #fff; }

/* QR PANE ─────────────────────────────────────────────────────────────────── */
.jr-share-qr-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 8px 0;
}
.jr-share-qr-frame {
  width: 220px; height: 220px;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 14px 32px rgba(0,0,0,0.5);
}
.jr-share-qr-frame img,
.jr-share-qr-frame canvas { width: 100%; height: 100%; display: block; }
.jr-share-qr-loading {
  font-family: 'PT Sans', sans-serif; font-size: 11px; color: rgba(0,0,0,0.5);
}
.jr-share-qr-hint {
  font-family: 'Poppins', sans-serif; font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(246,243,238,0.5);
  text-align: center;
  margin: 0;
}

/* Footer credit ──────────────────────────────────────────────────────────── */
.jr-share-footer {
  position: relative; z-index: 1;
  padding: 14px 28px 22px;
  border-top: 1px solid rgba(246,243,238,0.06);
  text-align: center;
}
.jr-share-footer a {
  font-family: 'Poppins', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: rgba(246,243,238,0.45);
  text-decoration: none;
  transition: color 0.18s;
}
.jr-share-footer a:hover { color: #ffa33a; }

/* Mobile tweaks ───────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .jr-share-panel { max-height: calc(100vh - 24px); border-radius: 12px; }
  .jr-share-root { padding: 12px; }
  .jr-share-card { padding: 22px 22px 18px; gap: 16px; }
  .jr-share-cover { flex-basis: 100px; width: 100px; height: 100px; }
  .jr-share-title { font-size: 22px; }
  .jr-share-pane { padding: 18px 22px 22px; }
  .jr-share-tabs { padding: 0 22px; }
  .jr-share-tab { font-size: 10px; padding: 12px 16px 12px 0; margin-right: 16px; }
  .jr-share-head { padding: 18px 22px 0; }
  .jr-share-footer { padding: 12px 22px 18px; }
}

/* RTL ──────────────────────────────────────────────────────────────────────── */
html[dir="rtl"] .jr-share-eyebrow::before { display: none; }
html[dir="rtl"] .jr-share-eyebrow::after  { content: ''; width: 22px; height: 1px; background: currentColor; }
html[dir="rtl"] .jr-share-tab { padding: 14px 0 14px 18px; margin-right: 0; margin-left: 24px; }
html[dir="rtl"] .jr-share-tab[aria-selected="true"]::after { left: 18px; right: 0; }
html[dir="rtl"] .jr-share-embed-copy { right: auto; left: 10px; }

/* Hide trigger button if no JS / pre-modal-script load */
.jr-share-trigger[hidden] { display: none !important; }

/* Optional: floating share-button styling (when sites want a pill button) */
.jr-share-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,163,58,0.1);
  border: 1px solid #ffa33a;
  color: #ffa33a;
  font-family: 'Poppins', sans-serif; font-weight: 600;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 10px 18px; border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.2s;
}
.jr-share-pill:hover { background: #ffa33a; color: #0a0908; transform: translateY(-1px); }
.jr-share-pill svg { width: 14px; height: 14px; }
