/* share-manage-modal.css — overlay for managing recipients on a shared playlist/track */

.smm {
  position: fixed; inset: 0;
  z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  padding: 5vh 4vw;
}
.smm__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  animation: smm-bg-in 0.2s ease;
}
@keyframes smm-bg-in { from { opacity: 0; } to { opacity: 1; } }
.smm__panel {
  position: relative;
  width: min(880px, 100%);
  max-height: 90vh;
  display: flex; flex-direction: column;
  background: var(--bg-2, #14130f);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 90px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04) inset;
  overflow: hidden;
  animation: smm-in 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes smm-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Head */
.smm__head {
  padding: 22px 26px 16px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in oklch, var(--accent) 4%, transparent), transparent);
}
.smm__head-l { min-width: 0; flex: 1; }
.smm__crumb {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text-3);
  margin-bottom: 6px;
}
.smm__title {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--text);
  text-wrap: balance;
}
.smm__sub {
  font-size: 12.5px;
  color: var(--text-mute);
}
.smm__sub-blocked { color: #e87b53; }
.smm__sub-sep { margin: 0 6px; color: var(--text-3); }
.smm__close {
  appearance: none; border: 0; background: transparent;
  width: 28px; height: 28px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-mute);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.smm__close:hover { background: rgba(255,255,255,0.06); color: var(--text); }

/* Tabs */
.smm__tabs {
  display: flex; gap: 4px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2, #14130f);
}
.smm__tab {
  appearance: none; background: transparent; border: 0;
  padding: 12px 14px;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-mute);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.12s, border-color 0.12s;
}
.smm__tab:hover { color: var(--text); }
.smm__tab.is-on {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.smm__tab-c {
  font-size: 10px;
  background: rgba(255,255,255,0.07);
  color: var(--text-mute);
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 600;
}
.smm__tab.is-on .smm__tab-c {
  background: color-mix(in oklch, var(--accent) 18%, transparent);
  color: var(--accent);
}

/* Body */
.smm__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 8px;
}
.smm__pane { display: flex; flex-direction: column; gap: 14px; }
.smm__hint {
  font-size: 12.5px;
  color: var(--text-mute);
  line-height: 1.55;
  padding: 12px 14px;
  background: color-mix(in oklch, var(--accent) 5%, transparent);
  border: 1px solid color-mix(in oklch, var(--accent) 18%, var(--line));
  border-radius: 10px;
}
.smm__hint strong { color: var(--text); font-weight: 600; }

/* Recipients table */
.smm__rcp-head {
  display: grid;
  grid-template-columns: 36px 1fr 130px 110px 170px;
  gap: 12px;
  padding: 0 12px 6px;
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-3);
}
.smm__rcp-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.smm__rcp {
  display: grid;
  grid-template-columns: 36px 1fr 130px 110px 170px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}
.smm__rcp:hover { background: rgba(255,255,255,0.045); }
.smm__rcp.is-blocked { opacity: 0.55; background: rgba(232,123,83,0.04); border-color: rgba(232,123,83,0.18); }
.smm__rcp-av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--accent) 18%, var(--bg-1));
  color: var(--accent);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex; align-items: center; justify-content: center;
}
.smm__rcp-id { min-width: 0; }
.smm__rcp-name {
  font-size: 13px; font-weight: 600;
  color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.smm__rcp-nda {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.08em;
  background: color-mix(in oklch, var(--accent) 22%, transparent);
  color: var(--accent);
  padding: 2px 5px;
  border-radius: 4px;
}
.smm__rcp-pending {
  font-size: 9.5px; font-weight: 500;
  color: var(--text-3);
  font-style: italic;
}
.smm__rcp-meta {
  font-size: 11.5px;
  color: var(--text-mute);
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.smm__rcp-plays { font-size: 11.5px; }
.smm__rcp-plays > div:first-child { color: var(--text); font-weight: 500; }
.smm__rcp-last { color: var(--text-mute); margin-top: 2px; font-size: 10.5px; }
.smm__rcp-wm {
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.smm__rcp-actions { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.smm__rcp-status {
  font-size: 10.5px; font-weight: 600;
  color: #e87b53;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Add recipient */
.smm__add {
  display: flex; gap: 8px;
  margin-top: 6px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--line);
  border-radius: 10px;
}
.smm__add-input {
  flex: 1;
  background: transparent;
  border: 0; outline: none;
  font: inherit;
  color: var(--text);
  padding: 6px 4px;
}
.smm__add-input::placeholder { color: var(--text-3); }

/* Buttons */
.smm__btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.smm__btn:hover { background: rgba(255,255,255,0.06); }
.smm__btn--ghost { background: rgba(255,255,255,0.02); }
.smm__btn--icon { padding: 6px 8px; font-size: 13px; }
.smm__btn--primary {
  background: var(--accent);
  color: var(--bg-1, #0d0c09);
  border-color: var(--accent);
  font-weight: 600;
}
.smm__btn--primary:hover { filter: brightness(1.08); }
.smm__btn--danger {
  border-color: rgba(232,123,83,0.4);
  color: #e87b53;
}
.smm__btn--danger:hover {
  background: rgba(232,123,83,0.1);
  border-color: rgba(232,123,83,0.6);
}
.smm__btn--lg { padding: 10px 18px; font-size: 13px; }
.smm__btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Link tab */
.smm__link-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.smm__link-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px;
}
.smm__link-l { min-width: 0; flex: 1; }
.smm__link-status {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-3);
  margin-bottom: 4px;
  display: inline-flex; align-items: center; gap: 6px;
}
.smm__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.smm__dot.is-on { background: #6cd086; box-shadow: 0 0 8px rgba(108,208,134,0.55); }
.smm__dot.is-off { background: #e87b53; }
.smm__link-url {
  font-size: 14px; font-weight: 500;
  color: var(--text);
  letter-spacing: 0.005em;
  word-break: break-all;
}
.smm__link-meta {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 4px;
}
.smm__link-actions { display: inline-flex; gap: 6px; flex-shrink: 0; }
.smm__link-tip {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-mute);
  line-height: 1.55;
}
.smm__link-tip strong { color: var(--text); font-weight: 600; }
.smm__link-tip em { color: var(--accent); font-style: normal; font-weight: 600; }

/* Options */
.smm__opts { display: flex; flex-direction: column; gap: 4px; }
.smm__opt {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.smm__opt:last-child { border-bottom: 0; }
.smm__opt-l { flex: 1; min-width: 0; }
.smm__opt-name { font-size: 13px; font-weight: 500; color: var(--text); }
.smm__opt-desc { font-size: 11.5px; color: var(--text-mute); margin-top: 2px; line-height: 1.5; }

.smm__switch {
  position: relative;
  width: 36px; height: 20px;
  flex-shrink: 0;
}
.smm__switch input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  margin: 0;
}
.smm__switch span {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  transition: background 0.18s;
}
.smm__switch span::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #ddd;
  border-radius: 50%;
  transition: transform 0.18s, background 0.18s;
}
.smm__switch input:checked ~ span { background: var(--accent); }
.smm__switch input:checked ~ span::after { transform: translateX(16px); background: var(--bg-1, #0d0c09); }

.smm__select {
  appearance: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  padding: 6px 28px 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%23999' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* Segmented control */
.smm__seg {
  display: inline-flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
  gap: 0;
}
.smm__seg-btn {
  appearance: none; background: transparent; border: 0;
  padding: 5px 10px;
  font-size: 11.5px; font-weight: 500;
  color: var(--text-mute);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}
.smm__seg-btn:hover { color: var(--text); }
.smm__seg-btn.is-on {
  background: var(--accent);
  color: var(--bg-1, #0d0c09);
}

/* Activity */
.smm__activity { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.smm__act {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
}
.smm__act:last-child { border-bottom: 0; }
.smm__act-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin: 6px auto 0;
  background: var(--text-3);
}
.smm__act-dot--play   { background: #6cd086; }
.smm__act-dot--open   { background: #76aef6; }
.smm__act-dot--nda    { background: var(--accent); }
.smm__act-dot--blocked { background: #e87b53; }
.smm__act-line { font-size: 12.5px; color: var(--text); }
.smm__act-line strong { font-weight: 600; }
.smm__act-meta { font-size: 10.5px; color: var(--text-mute); margin-top: 2px; letter-spacing: 0.01em; }

/* Footer */
.smm__foot {
  border-top: 1px solid var(--line);
  padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  background: rgba(0,0,0,0.18);
}
.smm__foot-tip {
  font-size: 11px;
  color: var(--text-mute);
  line-height: 1.55;
  flex: 1;
  min-width: 0;
}
.smm__foot-tip strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 2px; }

/* Block / revoke confirm sheet */
.smm__confirm {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
}
.smm__confirm-bg {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}
.smm__confirm-panel {
  position: relative;
  width: min(420px, 92%);
  background: var(--bg-2, #14130f);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 24px 60px -10px rgba(0,0,0,0.65);
}
.smm__confirm-title {
  font-size: 16px; font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.smm__confirm-body {
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.6;
  margin-bottom: 16px;
}
.smm__confirm-body strong { color: var(--text); font-weight: 600; }
.smm__confirm-meta { font-size: 11.5px; color: var(--text-3); }
.smm__confirm-actions {
  display: flex; justify-content: flex-end; gap: 8px;
}

/* Toast */
.smm__toast {
  position: absolute;
  bottom: 88px; left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg-1, #0d0c09);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 500;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,0.5);
  animation: smm-toast 2.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 20;
  pointer-events: none;
}
@keyframes smm-toast {
  0%   { opacity: 0; transform: translate(-50%, 8px); }
  10%  { opacity: 1; transform: translate(-50%, 0); }
  85%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -4px); }
}

/* Mobile */
@media (max-width: 720px) {
  .smm { padding: 0; }
  .smm__panel { max-height: 100vh; height: 100vh; border-radius: 0; width: 100%; }
  .smm__head { padding: 16px 18px 12px; }
  .smm__title { font-size: 18px; }
  .smm__tabs { padding: 0 14px; overflow-x: auto; }
  .smm__body { padding: 14px 14px 8px; }
  .smm__rcp-head { display: none; }
  .smm__rcp {
    grid-template-columns: 36px 1fr auto;
    grid-template-areas:
      "av name actions"
      "av meta actions"
      "wm  wm   wm";
    gap: 4px 12px;
  }
  .smm__rcp-av { grid-area: av; }
  .smm__rcp-id { grid-area: name; }
  .smm__rcp-plays { grid-area: meta; font-size: 10.5px; }
  .smm__rcp-plays > div:first-child { display: inline; }
  .smm__rcp-last { display: inline; margin-left: 6px; }
  .smm__rcp-wm { grid-area: wm; padding-top: 4px; border-top: 1px solid var(--line); margin-top: 4px; }
  .smm__rcp-actions { grid-area: actions; }
  .smm__link-row { flex-direction: column; }
  .smm__link-actions { width: 100%; }
  .smm__link-actions .smm__btn { flex: 1; }
  .smm__opt { flex-direction: column; align-items: flex-start; gap: 8px; }
  .smm__foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .smm__foot-tip { font-size: 10.5px; }
}
