/* =========================================================
   SELECCIONES EDITORIALES — CARRUSELES PÚBLICOS
========================================================= */

.tokki-home-selections {
	width: 100%;
}

.tokki-selection-list {
	width: 100%;
	margin: 52px auto 0;
}

.tokki-selection-list:first-child {
	margin-top: 38px;
}

.tokki-selection-heading {
	margin-bottom: 22px;
}

.tokki-selection-kicker {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 8px;
	color: #b98bdd;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2px;
	line-height: 1;
	text-transform: uppercase;
}

.tokki-selection-kicker i {
	font-size: 12px;
}

.tokki-selection-heading h2 {
	margin: 0;
	color: #e6e6e7;

	font-weight: 700;
	letter-spacing: 0.5px;
	line-height: 1.3;
}

.tokki-selection-carousel {
	position: relative;
}

.tokki-selection-track {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 6px 1px 12px;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.tokki-selection-track::-webkit-scrollbar {
	display: none;
}

.tokki-selection-card {
	flex: 0 0 calc((100% - 70px) / 6);
	min-width: 0;
	margin: 0;
	border: 1px solid #313034;
	border-radius: 10px;
	overflow: hidden;
	background: #313034;
	scroll-snap-align: start;
}

.tokki-selection-link {
	display: block;
	color: inherit;
	text-decoration: none !important;
}

.tokki-selection-link:hover,
.tokki-selection-link:focus {
	color: inherit;
	text-decoration: none !important;
}

.tokki-selection-cover {
	position: relative;
	width: 100%;
	aspect-ratio: 2 / 3;
	border-radius: 9px;
	overflow: hidden;
	background: #1a191d;
}

.tokki-selection-image {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;

}

/* Elevación de las novelas en dispositivos con cursor */
@media (hover: hover) and (pointer: fine) {

	.tokki-selection-card {
		transition:
			transform 0.22s ease,
			box-shadow 0.22s ease,
			border-color 0.22s ease;
	}

	.tokki-selection-card:hover,
	.tokki-selection-card:focus-within {
		transform: translateY(-5px);
		border-color: #424045;
		box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
	}
}

.tokki-selection-gradient {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		to bottom,
		transparent 45%,
		rgba(26, 25, 29, 0.55) 68%,
		#1a191d 88%
	);
}

.tokki-selection-title {
	position: absolute;
	z-index: 2;
	right: 12px;
	bottom: 12px;
	left: 12px;
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: #e6e6e7;
	font-size: 14px !important;
	font-weight: 500;
	line-height: 1.35;
	text-align: center;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.tokki-selection-placeholder {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	padding: 16px;
	color: #99979d;
	font-size: 14px;
	text-align: center;
}

.tokki-selection-arrow {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: none;
	width: 42px;
	height: 42px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid #424045;
	border-radius: 50%;
	background: rgba(26, 25, 29, 0.9);
	box-shadow: 0 7px 20px rgba(0, 0, 0, 0.28);
	color: #e6e6e7;
	cursor: pointer;
	transform: translateY(-50%);
}

.tokki-selection-carousel.is-scrollable .tokki-selection-arrow {
	display: flex;
}

.tokki-selection-prev {
	left: 8px;
}

.tokki-selection-next {
	right: 8px;
}

.tokki-selection-arrow:hover,
.tokki-selection-arrow:focus-visible {
	border-color: #b98bdd;
	background: #2a292c;
	color: #b98bdd;
}

.tokki-selection-arrow:disabled {
	visibility: hidden;
}

@media (max-width: 1024px) {
	.tokki-selection-card {
		flex-basis: calc((100% - 28px) / 3);
	}
}

@media (max-width: 767px) {
	.tokki-selection-list,
	.tokki-selection-list:first-child {
		margin-top: 38px;
	}

	.tokki-selection-heading {
		margin-bottom: 16px;
	}

	.tokki-selection-kicker {
		gap: 6px;
		margin-bottom: 7px;
		font-size: 10px;
		letter-spacing: 1.7px;
	}

	.tokki-selection-kicker i {
		font-size: 10px;
	}

	.tokki-selection-heading h2 {

		letter-spacing: 0.5px;
		line-height: 1.35;
}

	.tokki-selection-track {
		gap: 10px;
		padding-bottom: 10px;
	}

	.tokki-selection-card {
		flex: 0 0 calc((100% - 15px) / 2.5);
	}

	.tokki-selection-title {
		right: 9px;
		bottom: 10px;
		left: 9px;
		font-size: 12px !important;
	}

	.tokki-selection-arrow,
	.tokki-selection-carousel.is-scrollable .tokki-selection-arrow {
		display: none;
	}
}

/* =========================================================
   PANEL PRIVADO DE SELECCIONES
========================================================= */

.tokki-selections-admin {
	width: min(1180px, 100%);
	margin: 0 auto;
	padding: 32px 20px 64px;
	color: #d2d1d5;
}

.tokki-selections-admin-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 26px;
	padding: 28px;
	border: 1px solid #424045;
	border-radius: 20px;
	background: #1a191d;
}

.tokki-selections-admin-eyebrow {
	color: #b98bdd;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.8px;
	text-transform: uppercase;
}

.tokki-selections-admin-header h1 {
	margin: 7px 0 8px;
	color: #e6e6e7;

	line-height: 1.2;
}

.tokki-selections-admin-header p {
	margin: 0;
	color: #a9a7ad;
	font-size: 14px;
}

.tokki-selections-notice {
	margin-bottom: 14px;
	padding: 12px 15px;
	border: 1px solid #424045;
	border-radius: 10px;
	background: #222124;
}

.tokki-selections-notice.is-success {
	border-color: #526f5a;
	color: #b7dbbf;
}

.tokki-selections-notice.is-warning {
	border-color: #846d42;
	color: #e4c989;
}

.tokki-selection-editor {
	margin-bottom: 24px;
	padding: 24px;
	border: 1px solid #424045;
	border-radius: 18px;
	background: #1a191d;
}

.tokki-selection-editor-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 20px;
}

.tokki-selection-editor-heading > div {
	display: flex;
	align-items: baseline;
	gap: 12px;
}

.tokki-selection-editor-heading span {
	color: #e6e6e7;
	font-size: 20px;
	font-weight: 700;
}

.tokki-selection-editor-heading strong {
	color: #b98bdd;
	font-size: 13px;
	font-weight: 600;
}

.tokki-selection-clear {
	padding: 8px 12px;
	border: 1px solid #424045;
	border-radius: 9px;
	background: transparent;
	color: #bfbec1;
	font-size: 13px;
	cursor: pointer;
}

.tokki-selection-clear:hover {
	border-color: #9d6870;
	color: #e2aab2;
}

.tokki-selection-editor-fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 120px 190px;
	gap: 14px;
	align-items: end;
	margin-bottom: 22px;
}

.tokki-selection-editor-fields label:not(.tokki-selection-active-field) {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.tokki-selection-editor-fields label > span {
	color: #bfbec1;
	font-size: 13px;
	font-weight: 600;
}

.tokki-selection-editor input[type="text"],
.tokki-selection-editor input[type="search"],
.tokki-selection-editor select {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid #424045;
	border-radius: 9px;
	background: #2a292c;
	color: #d2d1d5;
	font: inherit;
}

.tokki-selection-editor input:focus,
.tokki-selection-editor select:focus {
	border-color: #b98bdd;
	outline: none;
	box-shadow: 0 0 0 2px rgba(185, 139, 221, 0.16);
}

.tokki-selection-active-field {
	display: flex;
	height: 44px;
	align-items: center;
	gap: 9px;
	padding: 0 12px;
	border: 1px solid #424045;
	border-radius: 9px;
	background: #222124;
}

.tokki-selection-active-field input {
	width: 17px;
	height: 17px;
	accent-color: #b98bdd;
}

.tokki-selection-editor-columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 18px;
}

.tokki-selection-selected-panel,
.tokki-selection-catalog-panel {
	min-width: 0;
	padding: 18px;
	border: 1px solid #343238;
	border-radius: 14px;
	background: #222124;
}

.tokki-selection-selected-panel h2,
.tokki-selection-catalog-panel h2 {
	margin: 0 0 6px;
	color: #e6e6e7;

	letter-spacing: 0.3px;
	line-height: 1.3;
}

.tokki-selection-editor-help {
	margin: 0 0 13px;
	color: #929097;
	font-size: 12px;
}

.tokki-selection-selected,
.tokki-selection-catalog {
	max-height: 390px;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	scrollbar-color: #56535b #222124;
}

.tokki-selection-selected {
	list-style: none;
}

.tokki-selection-selected:empty::after {
	content: "Todavía no seleccionaste ninguna novela.";
	display: block;
	padding: 20px 10px;
	color: #85838a;
	font-size: 13px;
	text-align: center;
}

.tokki-selection-selected li,
.tokki-selection-catalog-item {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	width: 100%;
	min-height: 58px;
	margin: 0 0 7px;
	padding: 7px;
	border: 1px solid #3a383e;
	border-radius: 10px;
	background: #2a292c;
	color: #d2d1d5;
	text-align: left;
}

.tokki-selection-selected li {
	cursor: grab;
}

.tokki-selection-selected li.is-dragging {
	opacity: 0.45;
}

.tokki-selection-selected img,
.tokki-selection-catalog-item img {
	width: 42px;
	height: 44px;
	border-radius: 6px;
	object-fit: cover;
}

.tokki-selection-selected li > span,
.tokki-selection-catalog-item > span {
	min-width: 0;
	overflow: hidden;
	font-size: 13px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tokki-selection-item-actions {
	display: flex;
	gap: 4px;
}

.tokki-selection-item-actions button {
	display: inline-flex;
	width: 28px;
	height: 28px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid #424045;
	border-radius: 7px;
	background: #1a191d;
	color: #bfbec1;
	cursor: pointer;
}

.tokki-selection-item-actions button:hover {
	border-color: #b98bdd;
	color: #b98bdd;
}

.tokki-selection-search {
	display: block;
	margin: 0 0 12px;
}

.tokki-selection-catalog-item {
	cursor: pointer;
	font: inherit;
}

/* El display:grid del catálogo no debe anular el atributo usado al buscar. */
.tokki-selection-catalog-item[hidden] {
	display: none !important;
}

.tokki-selection-catalog-item small {
	color: #b98bdd;
	font-size: 11px;
	font-weight: 700;
}

.tokki-selection-catalog-item:hover:not(:disabled) {
	border-color: #b98bdd;
}

.tokki-selection-catalog-item.is-selected,
.tokki-selection-catalog-item:disabled {
	opacity: 0.48;
	cursor: default;
}

.tokki-selections-save-wrap {
	position: sticky;
	z-index: 8;
	bottom: 16px;
	display: flex;
	justify-content: flex-end;
	pointer-events: none;
}

.tokki-selections-save {
	min-height: 48px;
	padding: 12px 22px;
	border: 0;
	border-radius: 12px;
	background: #b98bdd;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
	color: #1a191d;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	pointer-events: auto;
}

.tokki-selections-save:hover {
	background: #c99bea;
}

@media (max-width: 800px) {
	.tokki-selections-admin {
		padding: 20px 12px 52px;
	}

	.tokki-selections-admin-header,
	.tokki-selection-editor {
		padding: 18px;
	}

	.tokki-selection-editor-fields,
	.tokki-selection-editor-columns {
		grid-template-columns: 1fr;
	}

	.tokki-selection-editor-heading {
		align-items: flex-start;
	}

	.tokki-selection-editor-heading > div {
		align-items: flex-start;
		flex-direction: column;
		gap: 3px;
	}

	.tokki-selection-selected,
	.tokki-selection-catalog {
		max-height: 310px;
	}
}
