/**
 * Media Store — Social & Community (Phase 8).
 */

/* ── Profile ─────────────────────────────────────────────────────────────── */
.mst-prof-page { padding-block: 28px; }
.mst-prof__loading { display: flex; justify-content: center; padding: 48px 0; }
.mst-prof__head { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.mst-prof__avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,0.08); }
.mst-prof__meta { flex: 1; min-width: 200px; }
.mst-prof__name { margin: 0; font-size: 1.6rem; }
.mst-prof__handle { margin: 2px 0 6px; color: var(--mst-text-dim, rgba(255,255,255,0.55)); }
.mst-prof__counts { margin: 0; font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.mst-prof__counts strong { color: #fff; }
.mst-prof__actions { margin-left: auto; }
.mst-prof__private, .mst-prof__empty { color: rgba(255,255,255,0.5); padding: 24px 0; }
.mst-prof__bio { font-size: 1rem; line-height: 1.55; margin: 0 0 8px; }
.mst-prof__sub { color: rgba(255,255,255,0.6); font-size: 0.875rem; margin: 0 0 12px; }
.mst-prof__sub a { color: var(--mst-accent, #5c6ef4); text-decoration: none; }
.mst-prof__chips { margin: 6px 0; font-size: 0.85rem; }
.mst-prof__chips-label { color: rgba(255,255,255,0.5); }
.mst-chip { display: inline-block; padding: 3px 10px; margin: 2px; border-radius: 999px; background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; font-size: 0.78rem; }
.mst-chip:hover { background: rgba(255,255,255,0.16); }
.mst-prof__h2 { font-size: 1.1rem; margin: 22px 0 12px; }
.mst-prof__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }

.mst-prof-edit { display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.mst-prof-edit label { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.mst-prof-edit input, .mst-prof-edit textarea, .mst-prof-edit select {
	padding: 9px 11px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 8px; color: #fff; font: inherit;
}
.mst-pe-actions { display: flex; gap: 8px; margin-top: 4px; }

/* Follow button "following" state */
[data-ms-follow].is-following { background: rgba(255,255,255,0.12); color: #fff; }

/* ── Like button ─────────────────────────────────────────────────────────── */
.mst-like { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
	background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.8); }
.mst-like:hover { color: #fff; }
.mst-like.is-liked { color: #ff375f; border-color: rgba(255,55,95,0.5); }
.mst-like.is-liked svg { fill: #ff375f; stroke: #ff375f; }

/* ── Playlist social bar + comments ──────────────────────────────────────── */
.mst-pl-social { padding-block: 18px 48px; }
.mst-pl-social__bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 28px; }

.mst-cmt__h2 { font-size: 1.15rem; margin: 0 0 14px; }
.mst-cmt__form { display: flex; gap: 8px; margin-bottom: 18px; }
.mst-cmt__input { flex: 1; padding: 10px 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 10px; color: #fff; font: inherit; resize: vertical; }
.mst-cmt__login { color: rgba(255,255,255,0.55); }
.mst-cmt__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.mst-cmt__item { display: flex; gap: 12px; }
.mst-cmt__item--reply { margin-left: 44px; }
.mst-cmt__av { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: rgba(255,255,255,0.08); }
.mst-cmt__b { flex: 1; min-width: 0; }
.mst-cmt__meta { margin: 0 0 2px; font-size: 0.82rem; }
.mst-cmt__meta em { color: rgba(255,255,255,0.45); font-style: normal; margin-left: 6px; font-size: 0.75rem; }
.mst-cmt__text { margin: 0 0 4px; line-height: 1.45; }
.mst-cmt__acts { margin: 0; }
.mst-cmt__acts button { background: none; border: 0; color: rgba(255,255,255,0.5); cursor: pointer; font-size: 0.75rem; padding: 0 8px 0 0; }
.mst-cmt__acts button:hover { color: #fff; }
.mst-cmt__empty { color: rgba(255,255,255,0.45); }

/* ── Notifications ───────────────────────────────────────────────────────── */
.mst-notif { position: relative; display: inline-block; }
.mst-notif--floating { position: fixed; right: 18px; bottom: calc( var(--mst-player-h, 80px) + 18px ); z-index: 9200; }
.mst-notif__btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255,255,255,0.08); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.mst-notif__btn:hover { background: rgba(255,255,255,0.16); }
.mst-notif__badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: #ff375f; color: #fff; font-size: 0.68rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.mst-notif__panel { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-width: 92vw; z-index: 9300;
	background: #1a1a20; border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,0.5); overflow: hidden; }
.mst-notif--floating .mst-notif__panel { right: 0; bottom: calc(100% + 8px); top: auto; }
.mst-notif__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); font-weight: 600; }
.mst-notif__read { background: none; border: 0; color: var(--mst-accent, #5c6ef4); cursor: pointer; font-size: 0.78rem; }
.mst-notif__list { list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow-y: auto; }
.mst-notif__item a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: #fff; text-decoration: none; }
.mst-notif__item a:hover { background: rgba(255,255,255,0.06); }
.mst-notif__item.is-unread a { background: rgba(92,110,244,0.12); }
.mst-notif__item img, .mst-notif__dot { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: rgba(255,255,255,0.1); }
.mst-notif__item span span { display: flex; flex-direction: column; font-size: 0.84rem; }
.mst-notif__item em { color: rgba(255,255,255,0.45); font-style: normal; font-size: 0.72rem; }
.mst-notif__empty, .mst-notif__loading { list-style: none; text-align: center; color: rgba(255,255,255,0.45); padding: 20px; }

/* ── Share modal ─────────────────────────────────────────────────────────── */
.mst-share-backdrop { position: fixed; inset: 0; z-index: 9800; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; padding: 20px;
	-webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.mst-share { position: relative; width: 340px; max-width: 100%; background: #1a1a20; border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 24px; text-align: center; }
.mst-share__close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: rgba(255,255,255,0.6); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.mst-share__title { margin: 0 0 16px; font-size: 1.05rem; }
.mst-share__qr { display: flex; justify-content: center; margin-bottom: 16px; }
.mst-share__qr canvas { width: 200px; height: 200px; border-radius: 8px; background: #fff; }
.mst-share__url { display: flex; gap: 6px; }
.mst-share__url input { flex: 1; min-width: 0; padding: 9px 11px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06); color: #fff; font-size: 0.8rem; }
.mst-share__copy, .mst-share__native { padding: 9px 14px; border-radius: 8px; border: 0; cursor: pointer; background: var(--mst-accent, #5c6ef4); color: #fff; font-weight: 600; font-size: 0.82rem; }
.mst-share__native { width: 100%; margin-top: 10px; background: rgba(255,255,255,0.12); }

/* ── Activity feed ───────────────────────────────────────────────────────── */
.mst-feed__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mst-feed__item a { display: flex; gap: 14px; align-items: center; padding: 8px; border-radius: 10px; color: #fff; text-decoration: none; }
.mst-feed__item a:hover { background: rgba(255,255,255,0.06); }
.mst-feed__item img, .mst-feed__ph { width: 52px; height: 52px; border-radius: 8px; flex-shrink: 0; object-fit: cover; background: linear-gradient(135deg,#2b2d55,#5c6ef4); }
.mst-feed__info { display: flex; flex-direction: column; min-width: 0; }
.mst-feed__kind { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mst-accent, #8b97ff); font-weight: 700; }
.mst-feed__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mst-feed__info em { color: rgba(255,255,255,0.45); font-style: normal; font-size: 0.72rem; }
.mst-feed__more { display: flex; justify-content: center; padding: 14px; }
.mst-feed__empty { color: rgba(255,255,255,0.45); padding: 20px 0; }

@media (max-width: 600px) {
	.mst-prof__head { gap: 14px; }
	.mst-prof__avatar { width: 72px; height: 72px; }
	.mst-prof__actions { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .mst-share-backdrop { backdrop-filter: none; } }

/* ═══ Phase 8.2 — Social UX polish ═══════════════════════════════════════════ */

/* Profile header: banner + overlapping avatar + stats + tabs */
.mst-prof__head { display: block; position: relative; margin-bottom: 0; }
.mst-prof__banner { height: 200px; border-radius: 16px; background: linear-gradient(135deg, #2b2d55, #5c6ef4); background-size: cover; background-position: center; }
.mst-prof__head-row { display: flex; align-items: flex-end; gap: 18px; padding: 0 8px; margin-top: -44px; flex-wrap: wrap; }
.mst-prof__head-row .mst-prof__avatar { width: 110px; height: 110px; border: 4px solid var(--mst-bg, #0f0f14); }
.mst-prof__head-row .mst-prof__meta { padding-bottom: 6px; }
.mst-prof__head-row .mst-prof__actions { margin-left: auto; padding-bottom: 8px; }

.mst-prof__stats { display: flex; gap: 28px; padding: 18px 8px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 16px; }
.mst-prof__stat { display: flex; flex-direction: column; }
.mst-prof__stat strong { font-size: 1.25rem; }
.mst-prof__stat span { font-size: 0.76rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.03em; }

.mst-prof__tabs { display: flex; gap: 6px; border-bottom: 1px solid rgba(255,255,255,0.08); margin: 18px 0 16px; overflow-x: auto; }
.mst-prof__tab { padding: 10px 14px; background: none; border: 0; border-bottom: 2px solid transparent; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 0.875rem; white-space: nowrap; }
.mst-prof__tab:hover { color: #fff; }
.mst-prof__tab.is-active { color: #fff; border-bottom-color: var(--mst-accent, #5c6ef4); }
.mst-pl-card__cover--round { border-radius: 50%; }
.mst-pl-card__title--center { text-align: center; display: block; }

/* Follow button: hover an active "Following" to reveal "Unfollow" */
.mst-follow-btn.is-following:hover { background: rgba(255,55,95,0.16); border-color: rgba(255,55,95,0.4); color: #ff6b6b; }
.mst-follow-btn.is-requested { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); pointer-events: none; }

/* Artist social bar */
.mst-artist-social-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 18px; }
.mst-artist-social { margin: 0 0 26px; }
.mst-artist-social__stats { display: flex; gap: 26px; margin-bottom: 14px; }
.mst-artist-social__stats strong { font-size: 1.2rem; display: block; }
.mst-artist-social__stats span { font-size: 0.78rem; color: rgba(255,255,255,0.55); }
.mst-artist-social__block { margin-bottom: 14px; }
.mst-artist-social__block h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(255,255,255,0.5); margin: 0 0 8px; }
.mst-artist-fans { display: flex; gap: -6px; }
.mst-artist-fan { display: inline-block; margin-right: -8px; }
.mst-artist-fan img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--mst-bg, #0f0f14); object-fit: cover; }
.mst-artist-fan:hover { transform: translateY(-2px); }

/* Playlist social bar stats + owner */
.mst-pl-social__stats { display: inline-flex; gap: 16px; align-items: center; margin-left: auto; font-size: 0.8rem; color: rgba(255,255,255,0.55); flex-wrap: wrap; }
.mst-pl-social__stats strong { color: #fff; }
.mst-pl-social__owner { color: var(--mst-accent, #8b97ff); text-decoration: none; }
.mst-pl-social__owner:hover { text-decoration: underline; }

/* Notification grouping */
.mst-notif__group { list-style: none; padding: 10px 12px 4px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.4); font-weight: 700; }

/* Comment inline reply/edit, edited indicator, deleted placeholder */
.mst-cmt__edited { color: rgba(255,255,255,0.4); font-size: 0.72rem; }
.mst-cmt__replybox, .mst-cmt__editbox { margin-top: 8px; }
.mst-cmt__rb-acts { display: flex; gap: 6px; margin-top: 6px; }
.mst-cmt__text--deleted { color: rgba(255,255,255,0.4); font-style: italic; }
.mst-cmt__item--deleted .mst-cmt__av { opacity: 0.4; }

/* Activity feed card kinds */
.mst-feed__item--release .mst-feed__kind { color: #38c172; }

/* Mobile */
@media (max-width: 600px) {
	.mst-prof__banner { height: 140px; border-radius: 12px; }
	.mst-prof__head-row { margin-top: -36px; }
	.mst-prof__head-row .mst-prof__avatar { width: 88px; height: 88px; }
	.mst-prof__stats { gap: 18px; overflow-x: auto; }
	.mst-pl-social__stats { margin-left: 0; width: 100%; }
}
@media (hover: none) and (pointer: coarse) {
	.mst-prof__tab { padding: 12px 14px; }
	.mst-cmt__acts button { padding: 8px 10px 8px 0; }
	.mst-notif__item a { padding: 12px 10px; }
}
