/* ===== Contenedor: fondo blanco y ancho completo ===== */
.mps-app {
	--mps-accent: #2563eb;
	--mps-accent-dark: #1d4ed8;
	--mps-bg: #ffffff;
	--mps-text: #111827;
	--mps-muted: #6b7280;
	--mps-border: #e5e7eb;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin: 0 0 1.5em;
	padding: 24px clamp(16px, 4vw, 56px);
	background: var(--mps-bg);
	color: var(--mps-text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	line-height: 1.4;
}
.mps-app *, .mps-app *::before, .mps-app *::after { box-sizing: border-box; }

/* Ocupa todo el ancho de la pantalla aunque el tema use una columna estrecha */
/* !important: los temas de bloques fuerzan márgenes y ancho máximo en el contenido */
.mps-app.mps-full {
	position: relative !important;
	left: 50% !important;
	right: auto !important;
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: -50vw !important;
	margin-right: -50vw !important;
}
body:has(.mps-full) { overflow-x: clip; }

/* ===== Botones del reproductor (a prueba de estilos del tema) ===== */
.mps-app button,
.mps-searchform button {
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	text-shadow: none;
	margin: 0;
}

/* ===== Pestañas de secciones ===== */
.mps-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mps-tab {
	background: #fff;
	color: var(--mps-text);
	border: 1px solid var(--mps-border);
	padding: 8px 18px;
	border-radius: 999px;
	cursor: pointer;
	font-size: .92rem;
	line-height: 1.2;
}
.mps-tab:hover { border-color: var(--mps-accent); color: var(--mps-accent); }
.mps-tab.is-active { background: var(--mps-accent); border-color: var(--mps-accent); color: #fff; font-weight: 600; }

/* ===== Buscador dentro del reproductor ===== */
.mps-search {
	display: block;
	width: 100%;
	padding: 12px 16px;
	margin: 0 0 18px;
	background: #fff;
	color: var(--mps-text);
	border: 1px solid var(--mps-border);
	border-radius: 10px;
	font-size: 1rem;
	box-shadow: none;
}
.mps-search:focus { outline: 2px solid var(--mps-accent); outline-offset: 0; border-color: transparent; }

/* ===== Lista de canciones: tarjetas individuales ===== */
.mps-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
}
.mps-layout-list .mps-list { grid-template-columns: 1fr; }

.mps-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 16px;
	background: #fff;
	border: 1px solid var(--mps-border);
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(17, 24, 39, .08);
	transition: box-shadow .15s ease, border-color .15s ease;
}
.mps-card:hover { box-shadow: 0 4px 14px rgba(17, 24, 39, .1); }
.mps-card.is-active { border-color: var(--mps-accent); box-shadow: 0 0 0 1px var(--mps-accent), 0 4px 14px rgba(37, 99, 235, .15); }

.mps-card-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mps-card-cover { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 10px; }
.mps-card-text { min-width: 0; }
.mps-card-title {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--mps-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mps-card-artist { color: var(--mps-muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mps-card-controls { display: flex; align-items: center; gap: 10px; }
.mps-play {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--mps-accent);
	color: #fff;
	cursor: pointer;
}
.mps-play:hover { background: var(--mps-accent-dark); }
.mps-time { flex: none; min-width: 34px; font-size: .8rem; color: var(--mps-muted); text-align: center; font-variant-numeric: tabular-nums; }
.mps-seek { flex: 1 1 auto; min-width: 60px; margin: 0; accent-color: var(--mps-accent); }
.mps-dl {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	color: var(--mps-muted);
	text-decoration: none;
	border: 1px solid var(--mps-border);
	background: #fff;
}
.mps-dl:hover { color: var(--mps-accent); border-color: var(--mps-accent); }

/* Etiquetas de sección en los resultados de búsqueda */
.mps-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mps-tag {
	font-size: .72rem;
	line-height: 1;
	padding: 4px 9px;
	border-radius: 999px;
	background: #eff6ff;
	color: var(--mps-accent-dark);
	border: 1px solid #dbeafe;
}
.mps-note {
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 10px;
	background: #f9fafb;
	border: 1px solid var(--mps-border);
	color: var(--mps-muted);
	font-size: .9rem;
}
.mps-note[hidden] { display: none; }

.mps-empty { grid-column: 1 / -1; color: var(--mps-muted); padding: 24px; text-align: center; }

.mps-more-wrap { text-align: center; margin-top: 20px; }
.mps-more {
	background: #fff;
	color: var(--mps-text);
	border: 1px solid var(--mps-border);
	padding: 10px 24px;
	border-radius: 999px;
	cursor: pointer;
}
.mps-more:hover { border-color: var(--mps-accent); color: var(--mps-accent); }

/* ===== Buscador para el menú / cabecera / widget ===== */
.mps-searchform {
	display: inline-flex;
	align-items: center;
	position: relative;
	margin: 0;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	overflow: hidden;
	font-family: inherit;
}
.mps-searchform:focus-within { border-color: var(--mps-accent, #2563eb); box-shadow: 0 0 0 2px rgba(37, 99, 235, .2); }
.mps-searchform input[type="search"] {
	appearance: none;
	-webkit-appearance: none;
	width: 200px;
	max-width: 100%;
	padding: 8px 6px 8px 16px;
	margin: 0;
	border: 0;
	background: transparent;
	color: #111827;
	font-size: .95rem;
	box-shadow: none;
	outline: none;
}
.mps-searchform button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	border: 0;
	background: transparent;
	color: #4b5563;
	cursor: pointer;
}
.mps-searchform button:hover { color: #2563eb; }
.mps-menu-search { display: flex; align-items: center; list-style: none; }

/* ===== Móvil ===== */
@media (max-width: 480px) {
	.mps-app { padding: 16px 12px; }
	.mps-time { min-width: 30px; font-size: .75rem; }
	.mps-card-controls { gap: 8px; }
	.mps-searchform input[type="search"] { width: 150px; }
}

/* Botón "Letra y acordes" */
.mps-lyrics {
	display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
	height: 36px; padding: 0 12px; border-radius: 18px; cursor: pointer;
	border: 1px solid #d9dde3; background: #fff; color: inherit;
	font: inherit; font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.mps-lyrics:hover { color: var(--mps-accent); border-color: var(--mps-accent); }
.mps-card-extra { margin-top: 10px; }

/* Ventana emergente */
.mps-modal {
	display: none; position: fixed; inset: 0; z-index: 999999;
	background: rgba(15, 20, 30, .6); align-items: center; justify-content: center; padding: 16px; box-sizing: border-box;
}
.mps-modal.is-open { display: flex; }
.mps-modal-box {
	width: min(960px, 100%); height: min(90vh, 100%); background: #fff; border-radius: 12px;
	display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.mps-modal-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #e5e8ec; }
.mps-modal-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.mps-modal-open { font-size: 13px; text-decoration: underline; white-space: nowrap; }
.mps-modal-close {
	width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f0f2f5; cursor: pointer;
	font-size: 22px; line-height: 1; color: #333;
}
.mps-modal-close:hover { background: #e3e6ea; }
.mps-modal-frame { flex: 1; width: 100%; border: 0; background: #f6f7f9; }
html.mps-modal-open, html.mps-modal-open body { overflow: hidden; }

/* Cabecera de sección con botón «Descargar PDF» */
.mps-section-head { display: flex; align-items: center; justify-content: flex-start; gap: 16px; flex-wrap: wrap; margin: 4px 0 14px; }
.mps-section-head[hidden] { display: none; }
.mps-section-name { margin: 0; padding: 0; font-size: 24px; line-height: 1.2; }
.mps-section-pdf {
	display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 19px;
	background: var(--mps-accent); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.mps-section-pdf:hover { filter: brightness(.92); color: #fff; }
