/*!
 * FncSticker — estilos del selector de stickers compartido (fnc_libs).
 * Resetea el botón “pastilla morada” del tema (igual que fnc-emoji).
 * Packs abajo (scroll horizontal); rejilla arriba (scroll vertical).
 */

.fnc-sticker-pop {
	position: absolute;
	z-index: 9999;
	width: 340px;
	max-width: calc(100vw - 16px);
	height: 380px;
	max-height: calc(100vh - 24px);
	display: flex;
	flex-direction: column;
	background: #1c1c24;
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 14px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
	overflow: hidden;
	font-family: inherit;
	color: #e8e8ef;
	box-sizing: border-box;
}

.fnc-sticker-pop *,
.fnc-sticker-pop *::before,
.fnc-sticker-pop *::after {
	box-sizing: border-box;
}

.fnc-sticker-pop[hidden] { display: none !important; }

.fnc-sticker-pop__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px 8px;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
	flex-shrink: 0;
}

.fnc-sticker-pop__title {
	margin: 0;
	font-size: .85rem;
	font-weight: 600;
	letter-spacing: .01em;
	color: #e8e8ef;
}

/* Engrane → /stickers/mine */
.fnc-sticker-pop a.fnc-sticker-pop__mine,
.fnc-sticker-pop__mine {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto !important;
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 8px !important;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #b0b0be !important;
	font-weight: 400 !important;
	font-size: inherit !important;
	letter-spacing: normal !important;
	text-decoration: none !important;
	transform: none !important;
	filter: none !important;
	cursor: pointer;
}

.fnc-sticker-pop a.fnc-sticker-pop__mine:hover,
.fnc-sticker-pop__mine:hover {
	background: rgba(255, 255, 255, .08) !important;
	color: #fff !important;
	transform: none !important;
	filter: none !important;
	box-shadow: none !important;
}

.fnc-sticker-pop__mine svg {
	display: block;
	width: 16px;
	height: 16px;
}

.fnc-sticker-pop__main {
	flex: 1;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.fnc-sticker-pop__heading {
	margin: 0;
	padding: 10px 12px 4px;
	font-size: .75rem;
	font-weight: 600;
	color: #8a8a99;
	flex-shrink: 0;
}

/* Rejilla de stickers — scroll vertical */
.fnc-sticker-pop__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
	padding: 6px 10px 10px;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	flex: 1;
	min-height: 0;
	align-content: start;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, .2) transparent;
}

.fnc-sticker-pop__grid::-webkit-scrollbar { width: 8px; }
.fnc-sticker-pop__grid::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, .18);
	border-radius: 8px;
}

/* Celdas de sticker — reset tema */
.fnc-sticker-pop button.fnc-sticker-pop__cell,
.fnc-sticker-pop__cell {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex: none !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	height: auto !important;
	aspect-ratio: 1 / 1;
	margin: 0 !important;
	padding: 4px !important;
	border: none !important;
	border-radius: 10px !important;
	background: rgba(255, 255, 255, .04) !important;
	background-image: none !important;
	box-shadow: none !important;
	color: inherit !important;
	font-weight: 400 !important;
	font-size: inherit !important;
	letter-spacing: normal !important;
	line-height: 1 !important;
	text-transform: none !important;
	transform: none !important;
	filter: none !important;
	cursor: pointer;
	overflow: hidden;
}

.fnc-sticker-pop button.fnc-sticker-pop__cell:hover,
.fnc-sticker-pop__cell:hover {
	background: rgba(124, 58, 237, .16) !important;
	transform: none !important;
	filter: none !important;
	box-shadow: none !important;
	color: inherit !important;
}

.fnc-sticker-pop__cell img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain;
	display: block;
	pointer-events: none;
}

.fnc-sticker-pop__empty,
.fnc-sticker-pop__status {
	grid-column: 1 / -1;
	margin: 0;
	padding: 24px 16px;
	text-align: center;
	font-size: .85rem;
	color: #8a8a99;
	line-height: 1.4;
}

.fnc-sticker-pop__skel {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
	padding: 4px 0;
	grid-column: 1 / -1;
}

.fnc-sticker-pop__skel-box {
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04));
	background-size: 200% 100%;
	animation: fnc-sticker-skel 1.1s ease-in-out infinite;
}

@keyframes fnc-sticker-skel {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}

/* Carrusel de packs abajo — scroll horizontal */
.fnc-sticker-pop__rail {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
	width: 100%;
	padding: 6px 8px;
	border-top: 1px solid rgba(255, 255, 255, .08);
	background: rgba(0, 0, 0, .2);
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, .2) transparent;
}

.fnc-sticker-pop__rail::-webkit-scrollbar { height: 6px; }
.fnc-sticker-pop__rail::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, .18);
	border-radius: 6px;
}

/* Pack tabs — reset tema */
.fnc-sticker-pop button.fnc-sticker-pop__pack,
.fnc-sticker-pop__pack {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto !important;
	width: 40px !important;
	height: 40px !important;
	min-width: 40px !important;
	max-width: 40px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid transparent !important;
	border-radius: 10px !important;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #c8c8d4 !important;
	font-weight: 400 !important;
	font-size: 1.05rem !important;
	letter-spacing: normal !important;
	line-height: 1 !important;
	text-transform: none !important;
	transform: none !important;
	filter: none !important;
	cursor: pointer;
	overflow: hidden;
}

.fnc-sticker-pop button.fnc-sticker-pop__pack:hover,
.fnc-sticker-pop__pack:hover {
	background: rgba(255, 255, 255, .06) !important;
	transform: none !important;
	filter: none !important;
	box-shadow: none !important;
	color: #e8e8ef !important;
}

.fnc-sticker-pop button.fnc-sticker-pop__pack.is-active,
.fnc-sticker-pop__pack.is-active {
	background: rgba(124, 58, 237, .3) !important;
	border-color: rgba(124, 58, 237, .45) !important;
	box-shadow: none !important;
	transform: none !important;
	filter: none !important;
}

.fnc-sticker-pop__pack img {
	width: 28px !important;
	height: 28px !important;
	max-width: 28px !important;
	max-height: 28px !important;
	object-fit: contain;
	display: block;
	pointer-events: none;
}
