/* ------------------------------------------------------------------
   KK Pesach Shopping List — custom PDF.js viewer
   Uses canvas rendering (no browser PDF toolbar)
   ------------------------------------------------------------------ */

.kk-pesach-shopping {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #333;
	line-height: 1.7;
	background: #faf2ea;
}

/* ============ TOOLBAR ============ */

.kk-psl-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	background: #5a4630;
	border-radius: 12px 12px 0 0;
	padding: 10px 20px;
}

/* Nav: prev / page / next */
.kk-psl-toolbar__nav {
	display: flex;
	align-items: center;
	gap: 6px;
}

.kk-psl-toolbar__pages {
	font-size: 13px;
	font-weight: 600;
	color: rgba(255,255,255,0.85);
	min-width: 56px;
	text-align: center;
}

/* Zoom controls */
.kk-psl-toolbar__zoom {
	display: flex;
	align-items: center;
	gap: 4px;
}

.kk-psl-toolbar__zoom-level {
	font-size: 12px;
	font-weight: 600;
	color: rgba(255,255,255,0.7);
	min-width: 44px;
	text-align: center;
}

/* Toolbar buttons */
.kk-psl-toolbar__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: rgba(255,255,255,0.1);
	border: none;
	border-radius: 6px;
	color: rgba(255,255,255,0.8);
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	padding: 0;
}

.kk-psl-toolbar__btn:hover {
	background: rgba(255,255,255,0.2);
	color: #fff;
}

.kk-psl-toolbar__btn--text {
	width: auto;
	padding: 0 10px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* Action buttons: print + download */
.kk-psl-toolbar__actions {
	display: flex;
	gap: 8px;
}

.kk-psl-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	border: none;
	line-height: 1;
}

.kk-psl-btn--print {
	background: rgba(255,255,255,0.15);
	color: #fff;
	border: 1px solid rgba(255,255,255,0.2);
}

.kk-psl-btn--print:hover {
	background: rgba(255,255,255,0.25);
}

.kk-psl-btn--download {
	background: #C5A355;
	color: #fff;
}

.kk-psl-btn--download:hover {
	background: #d4b96b;
}

/* ============ CANVAS VIEWER ============ */

.kk-psl-viewer {
	padding: 32px 0 64px;
	background: #faf2ea;
}

.kk-psl-canvas-wrap {
	position: relative;
	background: #e8e4dc;
	border: 1px solid #e0d5c5;
	border-top: none;
	border-radius: 0 0 12px 12px;
	overflow-x: auto;
	overflow-y: hidden;
	min-height: 500px;
	display: flex;
	justify-content: center;
	padding: 24px 0;
}

.kk-psl-canvas-wrap canvas {
	display: block;
	box-shadow: 0 2px 16px rgba(0,0,0,0.12);
	background: #fff;
	max-width: none; /* allow zoom beyond container */
}

/* Loading state */
.kk-psl-loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	background: #e8e4dc;
	z-index: 2;
	font-size: 14px;
	color: #8b7355;
	font-weight: 500;
}

.kk-psl-loading__spinner {
	width: 32px;
	height: 32px;
	border: 3px solid rgba(197,163,85,0.25);
	border-top-color: #C5A355;
	border-radius: 50%;
	animation: kk-psl-spin 0.8s linear infinite;
}

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

/* ============ MOBILE FALLBACK ============ */

.kk-psl-viewer__mobile-fallback {
	display: none;
}

.kk-psl-viewer__mobile-card {
	background: #fff;
	border: 1px solid #e0d5c5;
	border-radius: 16px;
	padding: 40px 28px;
	text-align: center;
	box-shadow: 0 4px 24px rgba(90,70,48,0.08);
}

.kk-psl-viewer__mobile-card svg {
	color: #C5A355;
	margin-bottom: 16px;
}

.kk-psl-viewer__mobile-card h3 {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 20px;
	font-weight: 700;
	color: #5a4630;
	margin: 0 0 8px;
}

.kk-psl-viewer__mobile-card p {
	font-size: 14px;
	color: #777;
	margin: 0 0 24px;
}

.kk-psl-viewer__mobile-btns {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.kk-psl-viewer__mobile-btns .kk-psl-btn--print {
	background: #5a4630;
	border: none;
}

.kk-psl-viewer__mobile-btns .kk-psl-btn--print:hover {
	background: #6b5438;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
	.kk-psl-toolbar {
		border-radius: 10px;
		padding: 10px 14px;
		gap: 10px;
	}

	.kk-psl-toolbar__zoom {
		display: none;
	}

	.kk-psl-toolbar__actions .kk-psl-btn span {
		display: none;
	}

	.kk-psl-canvas-wrap {
		display: none;
	}

	.kk-psl-viewer__mobile-fallback {
		display: block;
		margin-top: 20px;
	}
}

@media (max-width: 480px) {
	.kk-psl-toolbar__actions {
		display: none;
	}

	.kk-psl-viewer__mobile-btns {
		flex-direction: column;
	}

	.kk-psl-viewer__mobile-btns .kk-psl-btn {
		justify-content: center;
		width: 100%;
	}
}
