/* =====================================================
   LEGAL POPUPS - Integrated with Moonlight Express Theme
   Version: 1.3.0
   Updated: April 28, 2026
   ===================================================== */

/* =====================================================
   LEGAL BUBBLES - Pill Button Style
   ===================================================== */
.legal-bubbles-container {
	position: fixed;
	top: 14px;
	left: 10px;
	display: flex;
	gap: 10px;
	z-index: 9999;
	flex-wrap: nowrap;
	align-items: center;
	pointer-events: none;
}

.legal-bubble {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 154px;
	height: 40px;
	border-radius: 999px;
	background: rgba(23, 24, 32, 0.96);
	border: 1px solid #3f52d9;
	color: #ffffff !important;
	cursor: pointer;
	font-size: 0.86rem;
	font-weight: 800;
	text-align: center;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
	text-decoration: none;
	border-bottom: 1px solid #3f52d9;
	font-family: "Source Sans Pro", Helvetica, sans-serif;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0 18px;
	line-height: 1;
	white-space: nowrap;
	pointer-events: auto;
}

.legal-bubble:hover {
	background: rgba(32, 34, 46, 0.98);
	border-color: #5b6dff;
	color: #ffffff;
	box-shadow: 0 12px 28px rgba(49, 69, 201, 0.18);
	transform: translateY(-1px);
}

.legal-bubble:focus-visible {
	outline: none;
	border-color: #6d7cff;
	box-shadow: 0 0 0 3px rgba(84, 104, 255, 0.2);
}

.legal-bubble:active {
	transform: translateY(0);
}

.legal-bubble span {
	display: block;
	color: #ffffff !important;
}

/* =====================================================
   MODAL OVERLAY & CONTAINER
   ===================================================== */
.legal-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.legal-modal.active {
	display: flex;
	opacity: 1;
	pointer-events: auto;
}

.legal-modal-content {
	background: rgba(48, 48, 48, 0.95);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1.5px solid rgba(84, 104, 255, 0.25);
	border-radius: 20px;
	box-shadow: 
		0 20px 60px rgba(0, 0, 0, 0.4),
		inset 0 1px 0 rgba(255, 255, 255, 0.1),
		0 0 40px rgba(84, 104, 255, 0.15);
	width: 90%;
	max-width: 850px;
	max-height: 85vh;
	overflow-y: auto;
	padding: 3rem;
	position: relative;
	animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
	0% {
		transform: translateY(-50px);
		opacity: 0;
	}
	100% {
		transform: translateY(0);
		opacity: 1;
	}
}

@keyframes borderGradientShift {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

/* Gradient accent line at top */
.legal-modal-content::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #5468ff, #7c3aed, #5468ff);
	background-size: 200% 100%;
	animation: borderGradientShift 3s ease-in-out infinite;
	border-radius: 20px 20px 0 0;
	z-index: 1;
}

/* Close Button - Standard Circle with X */
.legal-modal-close {
	position: absolute;
	top: 25px;
	right: 25px;
	width: 50px;
	height: 50px;
	background: transparent;
	border: 2.5px solid #5468ff;
	color: #ffffff !important;
	font-size: 28px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	border-radius: 50%;
	z-index: 10001;
	font-weight: 900;
	padding: 0;
	line-height: 1;
}

.legal-modal-close:hover {
	background: rgba(124, 58, 237, 0.1);
	color: #7c3aed;
	border-color: #7c3aed;
	box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
	transform: rotate(90deg);
}

.legal-modal-close:focus {
	outline: none;
	box-shadow: 0 0 15px rgba(84, 104, 255, 0.4);
}

.legal-modal-close:active {
	transform: rotate(90deg) scale(0.9);
}

/* =====================================================
   LEGAL CONTENT STYLING
   ===================================================== */
.legal-content {
	display: none;
	color: #ffffff;
}

.legal-content.active {
	display: block;
	animation: fadeInContent 0.3s ease;
}

.auth-modal-shell {
	max-width: 700px;
}

.auth-modal-content {
	display: block;
}

.music-auth-callout {
	margin: 1.5rem 0 2rem;
	padding: 1.25rem 1.35rem;
	border-radius: 18px;
	background: linear-gradient(135deg, rgba(84, 104, 255, 0.14), rgba(124, 58, 237, 0.1));
	border: 1px solid rgba(124, 58, 237, 0.25);
}

.music-auth-callout p {
	margin: 0;
}

.music-auth-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.music-auth-actions .button {
	box-shadow: none !important;
}

.music-auth-actions .button.primary {
	background: #5468ff !important;
	border: 2px solid #5468ff !important;
	color: #ffffff !important;
}

.music-auth-actions .button.primary:hover,
.music-auth-actions .button.primary:focus-visible {
	background: #5468ff !important;
	border-color: #5468ff !important;
	color: #ffffff !important;
	box-shadow: none !important;
	transform: none !important;
}

.music-auth-actions .button:not(.primary) {
	background: transparent !important;
	border: 2px solid rgba(255, 255, 255, 0.9) !important;
	color: #ffffff !important;
}

.music-auth-actions .button:not(.primary):hover,
.music-auth-actions .button:not(.primary):focus-visible {
	background: transparent !important;
	border-color: #5468ff !important;
	color: #5468ff !important;
	box-shadow: none !important;
}

.music-access-denied-shell {
	max-width: 680px;
}

.music-access-denied-content {
	display: grid;
	gap: 1.4rem;
	justify-items: center;
	text-align: center;
}

.music-access-denied-image {
	width: min(100%, 460px);
	height: auto;
	display: block;
}

.music-access-denied-actions {
	width: min(100%, 360px);
}

.music-access-denied-actions .button.primary {
	background: #5468ff !important;
	border-color: #5468ff !important;
	box-shadow: none !important;
}

.music-access-denied-actions .button.primary:hover,
.music-access-denied-actions .button.primary:focus-visible {
	background: #5468ff !important;
	border-color: #5468ff !important;
	box-shadow: none !important;
	transform: none !important;
}

@keyframes fadeInContent {
	from { opacity: 0; }
	to { opacity: 1; }
}

.legal-content h1 {
	font-size: 2.2rem;
	color: #5468ff;
	margin-bottom: 0.5rem;
	font-family: "Source Sans Pro", Helvetica, sans-serif;
	font-weight: 900;
	letter-spacing: 0.075em;
	text-transform: uppercase;
}

.legal-content .last-updated {
	color: #888;
	font-size: 0.85rem;
	margin-bottom: 2rem;
	font-style: italic;
}

.legal-content h2 {
	font-size: 1.35rem;
	color: #7c3aed;
	margin-top: 2rem;
	margin-bottom: 1rem;
	font-family: "Source Sans Pro", Helvetica, sans-serif;
	font-weight: 900;
	letter-spacing: 0.05em;
}

.legal-content h2:first-of-type {
	margin-top: 0;
}

.legal-content h3,
.legal-subheading {
	font-size: 1.1rem;
	color: #5468ff;
	margin-top: 1.5rem;
	margin-bottom: 0.8rem;
	font-family: "Source Sans Pro", Helvetica, sans-serif;
	font-weight: 900;
	letter-spacing: 0.04em;
}

.legal-content p {
	color: #e0e0e0;
	line-height: 1.9;
	margin-bottom: 1.2rem;
	text-align: justify;
	font-size: 0.95rem;
}

.legal-content ul {
	color: #e0e0e0;
	margin: 1rem 0 1.5rem 2.5rem;
	line-height: 2;
	font-size: 0.95rem;
}

.legal-content ul li {
	margin-bottom: 0.7rem;
}

.legal-content strong {
	color: #5468ff;
	font-weight: 700;
}

/* Scrollbar styling */
.legal-modal-content::-webkit-scrollbar {
	width: 12px;
}

.legal-modal-content::-webkit-scrollbar-track {
	background: rgba(84, 104, 255, 0.1);
	border-radius: 10px;
}

.legal-modal-content::-webkit-scrollbar-thumb {
	background: rgba(84, 104, 255, 0.4);
	border-radius: 10px;
	transition: background 0.3s;
	border: 3px solid rgba(48, 48, 48, 0.95);
}

.legal-modal-content::-webkit-scrollbar-thumb:hover {
	background: rgba(84, 104, 255, 0.7);
}

/* Firefox scrollbar */
.legal-modal-content {
	scrollbar-color: rgba(84, 104, 255, 0.4) rgba(84, 104, 255, 0.1);
	scrollbar-width: thin;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 767.98px) {
	.legal-bubbles-container {
		top: 10px;
		left: 10px;
		gap: 8px;
		max-width: none;
		flex-direction: column;
		align-items: flex-start;
		flex-wrap: nowrap;
	}

	.legal-bubble {
		min-width: 142px;
		height: 38px;
		font-size: 0.78rem;
		padding: 0 16px;
	}

	.legal-modal-content {
		width: 95%;
		max-width: 95%;
		max-height: 90vh;
		padding: 2.5rem 2rem;
		border-radius: 16px;
	}

	.legal-content h1 {
		font-size: 1.8rem;
	}

	.legal-content h2 {
		font-size: 1.2rem;
		margin-top: 1.5rem;
	}

	.legal-content p {
		font-size: 0.93rem;
		text-align: left;
	}

	.legal-content ul {
		margin-left: 2rem;
		font-size: 0.93rem;
	}

	.legal-modal-close {
		width: 40px;
		height: 40px;
		font-size: 20px;
		border: 2px solid #5468ff;
		top: 20px;
		right: 20px;
	}
}

@media (max-width: 480px) {
	.music-auth-actions {
		grid-template-columns: 1fr;
		gap: 0.75rem;
	}

	.music-auth-actions .button {
		width: 100%;
		white-space: normal;
		line-height: 1.2;
		padding: 0.85rem 1rem;
	}

	.legal-bubble {
		min-width: 132px;
		height: 36px;
		font-size: 0.72rem;
		padding: 0 14px;
	}

	.legal-modal-content {
		width: 97%;
		padding: 2rem 1.5rem;
		border-radius: 12px;
		max-height: 92vh;
	}

	.legal-content h1 {
		font-size: 1.5rem;
	}

	.legal-content h2 {
		font-size: 1rem;
		margin-top: 1.3rem;
	}

	.legal-content h3,
	.legal-subheading {
		font-size: 0.95rem;
		margin-top: 1rem;
	}

	.legal-content p {
		font-size: 0.9rem;
		line-height: 1.7;
	}

	.legal-content ul {
		margin-left: 1.8rem;
		font-size: 0.9rem;
		line-height: 1.8;
	}

	.legal-modal-close {
		width: 36px;
		height: 36px;
		font-size: 18px;
		border: 2px solid #5468ff;
		top: 15px;
		right: 15px;
	}
}

@media (max-width: 360px) {
	.legal-bubbles-container {
		gap: 6px;
	}

	.legal-bubble {
		min-width: 122px;
		height: 34px;
		font-size: 0.66rem;
	}

	.legal-modal-content {
		padding: 1.5rem;
	}

	.legal-content h1 {
		font-size: 1.3rem;
	}
}
