/**
 * Media Store — global auth modal (Spotify-style dark glass).
 */
.msauth { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; }
.msauth.is-open { display: flex; }
.msauth-lock { overflow: hidden; }

.msauth__backdrop { position: absolute; inset: 0; background: rgba(8, 8, 12, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

.msauth__card {
	position: relative; z-index: 1; width: min(440px, 94vw); max-height: 92vh; overflow-y: auto;
	background: linear-gradient(180deg, #1f1f29, #14141b); color: #fff;
	border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 28px 28px 32px;
	box-shadow: 0 30px 80px rgba(0,0,0,0.6); animation: msauth-in 0.18s ease;
}
@keyframes msauth-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

.msauth__x { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: rgba(255,255,255,0.6); font-size: 26px; line-height: 1; cursor: pointer; }
.msauth__x:hover { color: #fff; }

.msauth__tabs { display: flex; gap: 6px; margin: 4px 0 20px; }
.msauth__tab { flex: 1; padding: 10px; border: 0; border-radius: 10px; background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7); font-weight: 600; cursor: pointer; }
.msauth__tab.is-active { background: #fff; color: #111; }
.msauth__tab:focus-visible { outline: 2px solid var(--mst-accent, #5c6ef4); outline-offset: 2px; }

.msauth__social { display: grid; gap: 10px; }
.msauth__oauth { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.25); color: #fff; text-decoration: none; font-weight: 600; }
.msauth__oauth:hover { border-color: #fff; background: rgba(255,255,255,0.06); }
.msauth__or { text-align: center; position: relative; margin: 16px 0; color: rgba(255,255,255,0.4); font-size: 0.8rem; }
.msauth__or::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: rgba(255,255,255,0.12); }
.msauth__or span { position: relative; background: #181820; padding: 0 10px; }

.msauth__field { margin-bottom: 12px; }
.msauth__field label { display: block; font-size: 0.8rem; color: rgba(255,255,255,0.7); margin-bottom: 5px; }
.msauth__field input { width: 100%; padding: 11px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.04); color: #fff; font-size: 0.95rem; }
.msauth__field input:focus { outline: none; border-color: var(--mst-accent, #5c6ef4); }

.msauth__type { display: flex; gap: 8px; margin-bottom: 14px; }
.msauth__type label { flex: 1; text-align: center; padding: 10px; border: 1px solid rgba(255,255,255,0.18); border-radius: 10px; cursor: pointer; color: rgba(255,255,255,0.75); }
.msauth__type label.is-active { border-color: var(--mst-accent, #5c6ef4); background: rgba(92,110,244,0.15); color: #fff; }
.msauth__type input { position: absolute; opacity: 0; }

.msauth__row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: rgba(255,255,255,0.75); margin: 6px 0 14px; }
.msauth__row--terms { align-items: flex-start; }
.msauth__link { margin-left: auto; background: none; border: 0; color: var(--mst-accent, #8b9bff); cursor: pointer; font-size: 0.85rem; }
.msauth__hint { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 14px; }

.msauth__submit { width: 100%; padding: 13px; border: 0; border-radius: 999px; background: var(--mst-accent, #5c6ef4); color: #fff; font-weight: 700; cursor: pointer; margin-top: 4px; }
.msauth__submit:hover { filter: brightness(1.08); }
.msauth__submit.is-loading { opacity: 0.6; pointer-events: none; }
.msauth__submit.is-loading::after { content: ''; display: inline-block; width: 14px; height: 14px; margin-left: 8px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; vertical-align: middle; animation: msauth-spin 0.7s linear infinite; }
@keyframes msauth-spin { to { transform: rotate(360deg); } }

.msauth__err { color: #ff8585; font-size: 0.85rem; margin: 8px 0; }
.msauth__ok { color: #9ff0bd; text-align: center; padding: 18px 0; }

@media (max-width: 540px) {
	.msauth__card { width: 100vw; height: 100vh; max-height: none; border-radius: 0; padding-top: 56px; }
}

/* Post-login toast for unsafe actions ("You're signed in. Please continue."). */
.msauth-toast {
	position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); z-index: 100001;
	background: #1f1f29; color: #fff; padding: 12px 20px; border-radius: 999px;
	border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
	font-size: 0.9rem; opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; pointer-events: none;
}
.msauth-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
