/**
 * Katalog (e-kitap) sayfası.
 * Sadece page-katalog.php şablonunda yüklenir.
 */

.kt {
	--kt-bg: #0b0f10;
	--kt-panel: #111a1b;
	--kt-panel-2: #0f1617;
	--kt-line: rgb(255 255 255 / 0.09);
	--kt-line-strong: rgb(255 255 255 / 0.16);
	--kt-ink: #eef5f5;
	--kt-muted: #9db0b2;
	--kt-brand: #14c4c4;
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100svh;
	padding: 0;
	background: var(--kt-bg);
	color: var(--kt-ink);
	overflow-x: clip;
}

.kt::before {
	position: absolute;
	inset: 0 0 auto;
	height: 320px;
	background: radial-gradient(80% 100% at 50% 0%, rgb(20 196 196 / 0.1), transparent 70%);
	content: "";
	pointer-events: none;
}

/* Okuyucu */

.kt__reader {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	width: 100%;
	max-width: none;
	min-height: 0;
	margin-inline: 0;
	padding: 0;
}

.kt-bar {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 14px;
	margin: 0;
	padding: 10px clamp(12px, 2.4vw, 28px);
	border: 0;
	border-bottom: 1px solid var(--kt-line);
	border-radius: 0;
	background: var(--kt-panel-2);
}

.kt-bar__nav {
	display: flex;
	align-items: center;
	gap: 6px;
}

.kt-bar__icon,
.kt-bar__tool,
.kt-thumbs__close,
.kt__zoom-actions button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	border: 1px solid var(--kt-line);
	border-radius: 8px;
	background: transparent;
	color: var(--kt-ink);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	line-height: 1;
	transition: border-color var(--dur-short, 220ms) ease, background var(--dur-short, 220ms) ease, color var(--dur-short, 220ms) ease;
}

.kt-bar__icon {
	width: 38px;
	height: 38px;
	padding: 0;
}

.kt-bar__tool {
	height: 38px;
	padding: 0 12px;
}

.kt-bar__icon:hover,
.kt-bar__tool:hover,
.kt-thumbs__close:hover,
.kt__zoom-actions button:hover {
	border-color: rgb(20 196 196 / 0.55);
	background: rgb(20 196 196 / 0.1);
	color: #8ff0f0;
}

.kt-bar__icon:disabled {
	opacity: 0.35;
	cursor: default;
}

.kt-bar__count {
	margin: 0;
	padding: 0 8px;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.kt-bar__of {
	margin: 0 4px;
	opacity: 0.45;
}

.kt-bar__jump {
	display: flex;
	align-items: center;
	gap: 6px;
}

.kt-bar__jump input {
	width: 74px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--kt-line);
	border-radius: 8px;
	background: rgb(255 255 255 / 0.04);
	color: var(--kt-ink);
	font: inherit;
	font-size: 13px;
	-moz-appearance: textfield;
}

.kt-bar__jump input::-webkit-outer-spin-button,
.kt-bar__jump input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.kt-bar__jump input::placeholder {
	color: #7d9092;
}

.kt-bar__jump button {
	height: 38px;
	padding: 0 14px;
	border: 0;
	border-radius: 8px;
	background: rgb(255 255 255 / 0.08);
	color: var(--kt-ink);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
}

.kt-bar__jump button:hover {
	background: rgb(20 196 196 / 0.18);
	color: #8ff0f0;
}

.kt-bar__tools {
	display: flex;
	align-items: center;
	gap: 6px;
}

.kt-bar__download {
	display: inline-flex;
	height: 38px;
	align-items: center;
	gap: 7px;
	padding: 0 14px;
	border-radius: 8px;
	background: var(--kt-brand);
	color: #04211f;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.kt-bar__download:hover {
	background: #35dada;
	color: #04211f;
	text-decoration: none;
}

.kt-bar__size {
	opacity: 0.7;
	font-weight: 500;
}

/* Sahne */

.kt-stage {
	position: relative;
	display: flex;
	flex: 1 1 0;
	height: auto;
	min-height: min(52svh, 420px);
	padding: 12px 14px 34px;
	scroll-margin-top: 0;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 0;
	background:
		radial-gradient(100% 90% at 50% 0%, #17211f 0%, #0d1213 55%, #090c0d 100%);
	overflow: hidden;
	perspective: 2600px;
}

.kt-stage::after {
	position: absolute;
	right: 8%;
	bottom: -36%;
	left: 8%;
	height: 46%;
	border-radius: 50%;
	background: radial-gradient(50% 50% at 50% 50%, rgb(0 0 0 / 0.55), transparent 70%);
	content: "";
	pointer-events: none;
}

.kt-book {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
}

.kt-hint {
	position: absolute;
	z-index: 2;
	bottom: 10px;
	left: 50%;
	margin: 0;
	padding: 5px 12px;
	border-radius: 999px;
	background: rgb(6 12 13 / 0.62);
	color: #8ea1a3;
	font-size: 11px;
	letter-spacing: 0.02em;
	white-space: nowrap;
	transform: translateX(-50%);
	transition: opacity 400ms ease;
	pointer-events: none;
}

.kt-stage.is-touched .kt-hint {
	opacity: 0;
}

.kt-stage:fullscreen,
.kt-stage:-webkit-full-screen {
	width: 100vw;
	height: 100vh;
	border: 0;
	border-radius: 0;
	background: #05090a;
}

.kt-stage:fullscreen .kt-hint,
.kt-stage:-webkit-full-screen .kt-hint {
	bottom: 16px;
	opacity: 0.8;
}

.kt-skeleton {
	position: absolute;
	z-index: 3;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: #0d1213;
	color: var(--kt-muted);
	font-size: 13px;
	transition: opacity 420ms ease;
}

.kt-skeleton.is-done {
	opacity: 0;
	pointer-events: none;
}

.kt-spinner {
	width: 26px;
	height: 26px;
	border: 2px solid rgb(20 196 196 / 0.2);
	border-top-color: var(--kt-brand);
	border-radius: 50%;
	animation: kt-spin 0.9s linear infinite;
}

@keyframes kt-spin {
	to { transform: rotate(360deg); }
}

/* Sayfa listesi */

.kt-thumbs {
	position: absolute;
	z-index: 6;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	padding: 16px clamp(12px, 2.4vw, 28px);
	border: 0;
	border-top: 1px solid var(--kt-line);
	border-radius: 0;
	background: rgb(9 14 15 / 0.97);
	backdrop-filter: blur(6px);
}

.kt-thumbs[hidden] {
	display: none;
}

.kt-thumbs__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.kt-thumbs__title {
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--kt-muted);
}

.kt-thumbs__close {
	width: 32px;
	height: 32px;
	padding: 0;
}

.kt-thumbs__grid {
	display: grid;
	flex: 1 1 auto;
	margin: 0;
	padding: 2px 4px 8px;
	gap: 10px;
	grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
	overflow-y: auto;
	list-style: none;
	scrollbar-width: thin;
}

.kt-thumb {
	display: block;
	width: 100%;
	padding: 0;
	border: 1px solid var(--kt-line);
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	overflow: hidden;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.kt-thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 596 / 842;
	object-fit: cover;
}

.kt-thumb__n {
	display: block;
	padding: 3px 0;
	background: #0b1213;
	color: #93a6a8;
	font-size: 10px;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.kt-thumb:hover,
.kt-thumb:focus-visible {
	border-color: rgb(20 196 196 / 0.6);
}

.kt-thumb.is-active {
	border-color: var(--kt-brand);
	box-shadow: 0 0 0 2px rgb(20 196 196 / 0.35);
}

.kt-thumb.is-active .kt-thumb__n {
	background: var(--kt-brand);
	color: #04211f;
	font-weight: 600;
}

/* Büyütme katmanı */

.kt__zoom {
	position: fixed;
	z-index: 500;
	inset: 0;
	display: flex;
	flex-direction: column;
	background: rgb(5 9 10 / 0.97);
	overscroll-behavior: contain;
}

.kt__zoom-bar {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px clamp(12px, 3vw, 28px);
	border-bottom: 1px solid var(--kt-line);
	color: var(--kt-ink);
}

.kt__zoom-page {
	margin: 0;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

.kt__zoom-actions {
	display: flex;
	gap: 6px;
}

.kt__zoom-actions button {
	width: 38px;
	height: 38px;
	padding: 0;
}

.kt__zoom-scroll {
	flex: 1 1 auto;
	padding: clamp(10px, 2vw, 24px);
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.kt__zoom-scroll img {
	display: block;
	width: min(1240px, 100%);
	height: auto;
	margin: 0 auto;
	background: #fff;
	box-shadow: 0 24px 70px rgb(0 0 0 / 0.55);
}

body.kt-zoom-open {
	overflow: hidden;
}

/* Alt şerit */

.kt__foot {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 20px;
	max-width: none;
	margin: 0;
	padding: 12px clamp(12px, 2.4vw, 28px);
	border: 0;
	border-top: 1px solid var(--kt-line);
	border-radius: 0;
	background: var(--kt-panel-2);
}

.kt__foot-copy {
	max-width: 620px;
}

.kt__foot-title {
	margin: 0 0 2px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.015em;
}

.kt__foot-copy p:last-child {
	margin: 0;
	color: var(--kt-muted);
	font-size: 12.5px;
}

.kt__foot-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.kt-btn {
	display: inline-flex;
	height: 38px;
	align-items: center;
	padding: 0 16px;
	border: 1px solid var(--kt-line-strong);
	border-radius: 8px;
	color: var(--kt-ink);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
}

.kt-btn:hover {
	border-color: rgb(20 196 196 / 0.6);
	color: #8ff0f0;
	text-decoration: none;
}

.kt-btn--primary {
	border-color: transparent;
	background: var(--kt-brand);
	color: #04211f;
	font-weight: 600;
}

.kt-btn--primary:hover {
	background: #35dada;
	color: #04211f;
}

.kt__prose {
	max-width: 860px;
	margin: 0 auto;
	padding: clamp(20px, 3vw, 32px) clamp(18px, 3vw, 24px);
	color: #c9d6d6;
	font-size: 15px;
}

.kt__prose a {
	color: var(--kt-brand);
}

.kt__empty {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	max-width: none;
	margin: 0;
	padding: 40px 24px;
	text-align: center;
}

/* Duyarlı */

@media (max-width: 60rem) {
	.kt-bar {
		justify-content: center;
	}

	.kt-bar__nav,
	.kt-bar__tools {
		flex-wrap: wrap;
		justify-content: center;
	}

	.kt-bar__tool span {
		display: none;
	}

	.kt-bar__tool {
		width: 38px;
		padding: 0;
	}
}

@media (max-width: 40rem) {
	.kt-bar {
		gap: 8px;
		padding: 8px;
	}

	.kt-bar__jump {
		order: 3;
		flex: 1 0 100%;
		justify-content: center;
	}

	.kt-bar__jump input {
		flex: 1 1 auto;
		max-width: 140px;
	}

	.kt-bar__download span {
		display: none;
	}

	.kt-bar__download {
		width: 38px;
		padding: 0;
		justify-content: center;
	}

	.kt-bar__tool {
		width: 38px;
		padding: 0;
	}

	.kt-bar__tool span {
		display: none;
	}

	.kt-thumbs {
		padding: 12px;
	}

	.kt-thumbs__grid {
		grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
		gap: 8px;
	}

	.kt-hint {
		font-size: 10px;
		white-space: normal;
		width: max-content;
		max-width: calc(100% - 24px);
		text-align: center;
	}

	.kt__foot {
		flex-direction: column;
		align-items: flex-start;
		padding: 10px 14px;
	}

	.kt__foot-copy p:last-child {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kt-spinner {
		animation-duration: 2.4s;
	}

	.kt * {
		transition-duration: 0.01ms !important;
	}
}
