/* ------------------------------------------------------------------
   Bear Product Media Preview — estilos base
   Paleta de marca: indigo #6366f1 / magenta #FF00AA / azul oscuro #000046
------------------------------------------------------------------- */

.bpmp-audio-wrap {
	width: 100%;
	padding: 6px 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bpmp-font-specimen {
	display: block;
	width: 100%;
	max-width: 420px;
	height: auto;
	margin: 0 auto;
	border-radius: 10px;
}

/* ---------- Botón de descarga directa (Bear Memberships) ---------- */

.bpmp-download-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 10px 0;
}

.bpmp-download-btn {
	background: #6366f1;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transition: background 0.15s ease;
}

.bpmp-download-btn:hover {
	background: #4f46e5;
	color: #fff;
}

.bpmp-download-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.bpmp-download-btn-disabled {
	background: #ccc;
	cursor: not-allowed;
}

.bpmp-download-status {
	font-size: 12px;
	color: #666;
}

.bpmp-download-status-limit {
	color: #b32d2e;
}

.bpmp-download-message {
	font-size: 12px;
	color: #b32d2e;
	width: 100%;
}

/* ---------- Editor de colores SVG ---------- */

.bpmp-svg-simple-wrap {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: linear-gradient(145deg, #f6f6fb, #eeeef8);
	border-radius: 14px;
	padding: 15%;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.bpmp-svg-simple {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.bpmp-svg-gate {
	background: #f8faff;
	border: 1.5px solid #c7d2fe;
	border-radius: 12px;
	padding: 18px 20px;
	text-align: center;
	font-size: 13px;
	color: #374151;
}

.bpmp-svg-gate a {
	color: #6366f1;
	font-weight: 600;
	text-decoration: none;
}

.bpmp-svg-gate a:hover {
	text-decoration: underline;
}

.bpmp-svg-container {
	width: 100%;
	margin: 0 auto;
	display: flex;
	gap: 18px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.bpmp-svg-wrap {
	flex: 1 1 380px;
	min-width: 220px;
	aspect-ratio: 1 / 1;
	background: linear-gradient(145deg, #f6f6fb, #eeeef8);
	border: 1px solid #e6e6f2;
	border-radius: 14px;
	overflow: hidden;
	padding: 20px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bpmp-svg-wrap svg {
	max-width: 100%;
	max-height: 100%;
}

.bpmp-svg-panel {
	flex: 0 0 240px;
	max-width: 260px;
	background: #fff;
	border: 1px solid #ececf6;
	border-radius: 12px;
	padding: 14px 16px;
	box-shadow: 0 1px 4px rgba(17, 17, 17, 0.04);
}

.bpmp-svg-panel-title {
	margin: 0 0 10px;
	font-weight: 700;
	font-size: 12.5px;
	color: #33334d;
	padding-bottom: 8px;
	border-bottom: 2px solid #6366f1;
}

.bpmp-svg-colors-list {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	max-height: 300px;
	overflow-y: auto;
}

.bpmp-svg-color-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 8px 4px;
	border-bottom: 1px solid #f1f1f8;
}

.bpmp-svg-color-row:last-child {
	border-bottom: none;
}

.bpmp-svg-color-row input[type="color"] {
	appearance: none;
	-webkit-appearance: none;
	width: 24px;
	height: 24px;
	min-width: 24px;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1.5px #d8d8ea;
	padding: 0;
	cursor: pointer;
	flex-shrink: 0;
}

.bpmp-svg-color-row input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
	border-radius: 50%;
}

.bpmp-svg-color-row input[type="color"]::-webkit-color-swatch {
	border: none;
	border-radius: 50%;
}

.bpmp-svg-color-row span {
	color: #444;
	font-size: 12.5px;
}

.bpmp-svg-grad-toggle {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	color: #666;
	cursor: pointer;
	margin-left: auto;
}

.bpmp-svg-grad-row {
	display: none;
	width: 100%;
	align-items: center;
	gap: 10px;
	margin-top: 4px;
}

.bpmp-svg-grad-row.bpmp-svg-grad-row-visible {
	display: flex;
}

.bpmp-svg-grad-row input[type="range"] {
	flex: 1;
	accent-color: #6366f1;
}

.bpmp-svg-stroke-toggle {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	color: #666;
	cursor: pointer;
	margin-left: 6px;
}

.bpmp-svg-stroke-row {
	display: none;
	width: 100%;
	align-items: center;
	gap: 10px;
	margin-top: 4px;
	padding-top: 4px;
	border-top: 1px dashed #ececf6;
}

.bpmp-svg-stroke-row.bpmp-svg-stroke-row-visible {
	display: flex;
}

.bpmp-svg-stroke-row input[type="color"] {
	appearance: none;
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	min-width: 22px;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1.5px #d8d8ea;
	padding: 0;
	cursor: pointer;
	flex-shrink: 0;
}

.bpmp-svg-stroke-row input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
	border-radius: 50%;
}

.bpmp-svg-stroke-row input[type="color"]::-webkit-color-swatch {
	border: none;
	border-radius: 50%;
}

.bpmp-svg-stroke-row input[type="range"] {
	flex: 1;
	accent-color: #6366f1;
}

.bpmp-svg-colors-empty {
	color: #999;
	font-size: 12px;
	padding: 4px 2px;
}

.bpmp-svg-export-btn {
	width: 100%;
	background: #6366f1;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 9px 10px;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}

.bpmp-svg-export-btn:hover {
	background: #4f46e5;
}

.bpmp-svg-export-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.bpmp-svg-export-message {
	display: block;
	margin-top: 8px;
	font-size: 11.5px;
	color: #b32d2e;
}

.bpmp-audio {
	width: 100%;
	height: 36px;
	display: block;
}

/* Oculta el botón de menú de "3 puntos" del reproductor nativo por
   completo (no solo la opción de descarga dentro de él) en navegadores
   basados en Chromium/WebKit. La descarga real solo debe pasar por
   nuestro propio botón "Descargar audio" (que sí valida cupo/plan). */
.bpmp-audio::-webkit-media-controls-overflow-button,
.bpmp-audio::-internal-media-controls-overflow-button {
	display: none !important;
}

/* ---------- Contenedor general del visor 3D ---------- */

.bpmp-3d-container {
	width: 100%;
	margin: 0 auto;
}

.bpmp-3d-with-parts {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.bpmp-3d-with-parts .bpmp-3d-wrap {
	flex: 1 1 440px;
	min-width: 300px;
}

.bpmp-3d-wrap {
	width: 100%;
	aspect-ratio: 1 / 1;
	position: relative;
	background: linear-gradient(145deg, #f6f6fb, #eeeef8);
	border: 1px solid #e6e6f2;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(99, 102, 241, 0.08);
}

.bpmp-3d-wrap canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

.bpmp-3d-wrap.bpmp-loading::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, #f0f0f8 25%, #e5e5f4 37%, #f0f0f8 63%);
	background-size: 400% 100%;
	animation: bpmp-shimmer 1.4s ease infinite;
}

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

.bpmp-3d-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 16px;
	font-size: 12px;
	color: #777;
	background: #f4f4f4;
	border-radius: 14px;
	aspect-ratio: 1 / 1;
}

/* ---------- Panel lateral (Colores + Iluminación) ---------- */

.bpmp-3d-panel {
	flex: 0 0 260px;
	max-width: 280px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bpmp-3d-panel-section {
	background: #ffffff;
	border: 1px solid #ececf6;
	border-radius: 12px;
	padding: 12px 14px;
	font-size: 13px;
	box-shadow: 0 1px 4px rgba(17, 17, 17, 0.04);
}

.bpmp-3d-panel-title {
	margin: 0 0 8px;
	font-weight: 700;
	font-size: 12.5px;
	letter-spacing: 0.01em;
	color: #33334d;
	display: flex;
	align-items: center;
	gap: 6px;
	padding-bottom: 8px;
	border-bottom: 2px solid #6366f1;
}

.bpmp-3d-parts-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 260px;
	overflow-y: auto;
}

.bpmp-3d-part-row {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 6px 4px;
	border-radius: 7px;
	transition: background 0.12s ease;
}

.bpmp-3d-part-row:hover {
	background: #f5f5ff;
}

.bpmp-3d-part-row span {
	color: #444;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bpmp-3d-parts-empty {
	color: #999;
	font-size: 12px;
	padding: 4px 2px;
}

/* ---------- Controles de iluminación ---------- */

.bpmp-3d-light-row {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 6px 4px;
}

.bpmp-3d-light-row span {
	color: #444;
}

.bpmp-3d-light-row-range {
	flex-direction: row;
}

.bpmp-3d-light-row-range input[type="range"] {
	width: 90px;
	accent-color: #6366f1;
}

/* ---------- Logo (marca de agua) y exportar ---------- */

.bpmp-3d-logo-hint {
	margin: 0 0 8px;
	font-size: 11.5px;
	line-height: 1.4;
	color: #888;
}

.bpmp-3d-logo-input {
	width: 100%;
	font-size: 12px;
	margin-bottom: 8px;
}

.bpmp-3d-logo-clear,
.bpmp-3d-stamp-clear,
.bpmp-3d-export-btn {
	width: 100%;
	background: #6366f1;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 9px 10px;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}

.bpmp-3d-logo-clear:hover,
.bpmp-3d-stamp-clear:hover,
.bpmp-3d-export-btn:hover {
	background: #4f46e5;
}

.bpmp-3d-stamp-input {
	width: 100%;
	font-size: 12px;
	margin-bottom: 8px;
}

.bpmp-3d-stamp-size-row {
	margin-bottom: 8px;
}

.bpmp-3d-wrap.bpmp-3d-stamping {
	cursor: crosshair;
}

.bpmp-3d-logo-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	max-width: 70px;
	max-height: 70px;
	object-fit: contain;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 8px;
	padding: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	pointer-events: none;
	z-index: 3;
}

/* Color swatches (compartido entre Colores del modelo y luz) */

.bpmp-3d-part-row input[type="color"],
.bpmp-3d-light-row input[type="color"] {
	appearance: none;
	-webkit-appearance: none;
	width: 24px;
	height: 24px;
	min-width: 24px;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1.5px #d8d8ea;
	padding: 0;
	cursor: pointer;
	flex-shrink: 0;
}

.bpmp-3d-part-row input[type="color"]::-webkit-color-swatch-wrapper,
.bpmp-3d-light-row input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
	border-radius: 50%;
}

.bpmp-3d-part-row input[type="color"]::-webkit-color-swatch,
.bpmp-3d-light-row input[type="color"]::-webkit-color-swatch {
	border: none;
	border-radius: 50%;
}

/* Ícono de subir textura/imagen junto a cada parte (requiere UV) */
.bpmp-3d-part-texture-btn {
	width: 22px;
	height: 22px;
	min-width: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	border-radius: 6px;
	background: #f2f2fb;
	border: 1px solid #e2e2f2;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.12s ease;
}

.bpmp-3d-part-texture-btn:hover {
	background: #e6e6fa;
}

@media (max-width: 640px) {
	.bpmp-3d-with-parts {
		flex-direction: column;
	}
	.bpmp-3d-panel {
		max-width: none;
		width: 100%;
		flex-direction: row;
		flex-wrap: wrap;
	}
	.bpmp-3d-panel-section {
		flex: 1 1 200px;
	}
}
