/* "Por dónde iba" — ver assets/js/reading-progress.js */

/* Portada de la historia: "Continuar leyendo" delante de "Empezar a leer" */
.awin-reading-continue-cta {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	margin-top: 28px;
	background: linear-gradient(135deg, #FFA07A 0%, #e07858 100%);
	color: #fff; border-radius: 10px; padding: 14px 24px;
	text-decoration: none; font-size: 16px; font-weight: 600;
}
.awin-reading-continue-cta:hover { opacity: .92; color: #fff; }
.awin-chapter-start-cta.awin-reading-start-secondary {
	margin-top: 10px;
	background: transparent;
	color: #e07858;
	border: 1px solid #FFA07A;
	font-size: 15px; font-weight: 500;
	padding: 11px 24px;
}
.awin-chapter-start-cta.awin-reading-start-secondary:hover { color: #b85a38; }

/* Página de la historia: aviso al volver a la posición guardada */
.awin-reading-toast {
	position: fixed; left: 50%; z-index: 9999;
	transform: translate(-50%, 16px);
	opacity: 0;
	transition: opacity .25s ease, transform .25s ease;
	display: flex; align-items: center; gap: 12px;
	max-width: calc(100vw - 32px);
	box-sizing: border-box;
	padding: 10px 10px 10px 16px;
	background: #1e293b; color: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
	font-size: 14px; line-height: 1.3;
}
.awin-reading-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.awin-reading-toast-text { white-space: nowrap; }
.awin-reading-toast-btn {
	background: #FFA07A; color: #1e293b;
	border: 0; border-radius: 8px;
	padding: 7px 12px;
	font: inherit; font-weight: 600;
	cursor: pointer; white-space: nowrap;
}
.awin-reading-toast-btn:hover { background: #e07858; color: #fff; }
.awin-reading-toast-close {
	background: transparent; color: #cbd5e1;
	border: 0; padding: 0 4px;
	font-size: 20px; line-height: 1;
	cursor: pointer;
}
.awin-reading-toast-close:hover { color: #fff; }

/* Página de la historia: línea de lectura de la historia entera (arriba del
   todo) y «Quedan unos N min» junto a «Página X de Y». */
.awin-readbar {
	position: fixed; top: 0; left: 0; right: 0; z-index: 100001;
	height: 4px;
	pointer-events: none;
	display: flex; gap: 3px;
	/* El fondo de la línea es lo que se ve en los huecos entre tramos:
	   crema corporativo, para que los separadores se distingan sobre
	   cualquier fondo (transparentes se veían negros en las historias). */
	background: #fff9f2;
}
.awin-readbar[hidden] { display: none; }
/* Un tramo por página (ver reading-progress.js): el hueco marca su final. */
.awin-readbar-seg {
	flex: 1 1 0; min-width: 2px;
	background: #f5c9b5; /* tramo sin leer: salmón claro liso */
	overflow: hidden;
}
.awin-readbar-fill {
	display: block; height: 100%;
	background: #e2703f; /* color liso: un degradado se repetiría en cada tramo */
	transform-origin: 0 50%;
	transform: scaleX(0);
	transition: transform .12s linear;
}
/* Barra de administración de WordPress (solo la ven los administradores). */
body.admin-bar .awin-readbar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .awin-readbar { top: 46px; } }
@media (prefers-reduced-motion: reduce) { .awin-readbar-fill { transition: none; } }

.awin-reading-left {
	margin-left: auto; flex-shrink: 0;
	font-size: 12px; color: var(--color-text-secondary, #94a3b8);
	white-space: nowrap;
}
.awin-reading-left + .awin-chapter-page-badge { margin-left: 0; }
/* Móvil: «Página X de Y · Quedan unos N min» juntos en su propia línea. */
@media (max-width: 480px) {
	.awin-comment-ctx { flex-wrap: wrap; row-gap: 8px; }
	.awin-comment-ctx .awin-chapter-page-badge { order: 3; margin-left: 0; }
	.awin-comment-ctx .awin-reading-left { order: 4; margin-left: 0; }
}

/* «Seguir leyendo» en /mi-perfil/ (Awin_Reading_Progress::render_profile_section()). */
.awin-rl-empty a { color: #b85a38; font-weight: 600; }
.awin-rl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.awin-rl-item {
	display: flex; align-items: center; gap: 14px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid rgba(160,100,60,0.18);
	border-radius: 12px;
}
.awin-rl-logo {
	flex-shrink: 0; width: 44px; height: 44px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 10px; border: 1px solid rgba(160,100,60,0.18); background: #fff;
	font-weight: 700; color: #b85a38; overflow: hidden;
}
.awin-rl-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; box-sizing: border-box; }
.awin-rl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.awin-rl-new {
	align-self: flex-start;
	margin-bottom: 2px; padding: 2px 9px;
	border-radius: 999px;
	background: #e2703f; color: #fff;
	font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.awin-rl-title {
	font-size: 15px; font-weight: 600; line-height: 1.3;
	color: #2d1810; text-decoration: none; overflow-wrap: anywhere;
}
.awin-rl-title:hover { text-decoration: underline; color: #2d1810; }
.awin-rl-brand { font-size: 12px; color: #a07060; }
.awin-rl-progress {
	display: block; height: 4px; margin: 6px 0 4px;
	border-radius: 2px; background: #f5c9b5; overflow: hidden;
}
.awin-rl-progress span { display: block; height: 100%; background: #e2703f; border-radius: 2px; }
.awin-rl-meta { font-size: 12px; color: #a07060; }
.awin-rl-actions { flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
.awin-rl-continue {
	padding: 8px 14px; border-radius: 8px;
	background: #e2703f; color: #fff;
	font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.awin-rl-continue:hover { background: #c95f33; color: #fff; }
.awin-rl-dismiss {
	width: 30px; height: 30px; padding: 0;
	border: none; border-radius: 50%; background: transparent;
	color: #c49888; font-size: 20px; line-height: 1; cursor: pointer;
}
.awin-rl-dismiss:hover { background: rgba(160,100,60,0.1); color: #b85a38; }
/* Móvil: logo y texto en una fila; «Continuar» y × debajo, alineados con el texto. */
@media (max-width: 560px) {
	.awin-rl-item { flex-wrap: wrap; align-items: flex-start; row-gap: 10px; }
	.awin-rl-actions { flex: 0 0 100%; justify-content: space-between; padding-left: 58px; box-sizing: border-box; }
}
.awin-rl-debug {
	margin: 0 0 16px; padding: 12px 14px; max-height: 50vh; overflow: auto;
	background: #1e293b; color: #e2e8f0; border-radius: 8px;
	font: 12px/1.5 monospace; white-space: pre-wrap;
}

/* /seguir-leyendo/ (visitantes): aviso de que la lista vive en el navegador. */
.awin-rl-note {
	margin: 0 0 16px; padding: 10px 14px;
	border-radius: 10px; background: rgba(255,160,122,0.14);
	font-size: 13px; line-height: 1.5; color: #8a4a2c;
}
.awin-rl-loading { font-size: 14px; color: #a07060; }
.awin-rl-loading[hidden], .awin-rl-empty[hidden] { display: none; }

/* /seguir-leyendo/ a todo el ancho (no el contenedor estrecho de 420px de
   .awin-reset-pw-page, que en el ordenador dejaba las tarjetas como en el
   móvil): una columna en el móvil, dos en pantallas grandes. */
.awin-reset-pw-page.awin-rl-guest {
	max-width: 1180px;
	padding: 24px clamp(16px, 4vw, 40px) 48px;
}
.awin-rl-guest .awin-rl-note { max-width: 720px; }
@media (min-width: 1000px) {
	.awin-rl-guest .awin-rl-list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
		align-items: stretch;
	}
	.awin-rl-guest .awin-rl-item { padding: 12px 14px; }
}
