/* Know Your Hypnotics - retro styling */

@font-face {
	font-family: 'Alfarn W05';
	src: url('../fonts/alfarn-w05-regular.woff2') format('woff2'),
		 url('../fonts/alfarn-w05-regular.woff') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

.kyh-container {
	display: grid;
	grid-template-columns: 30% 70%;
	background-color: #000000;
	border: 1px solid #2a2a2a;
	color: #f2f2f2;
	min-height: 480px;
	box-sizing: border-box;
	position: relative;
	overflow: hidden;
	font-family: Georgia, 'Times New Roman', serif;
}

.kyh-container * {
	box-sizing: border-box;
}

/* Subtle scanline overlay for the retro CRT feel */
.kyh-container::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.02) 0px,
		rgba(255, 255, 255, 0.02) 1px,
		transparent 1px,
		transparent 3px
	);
	pointer-events: none;
	z-index: 5;
}

.kyh-sidebar {
	background-color: #050505;
	border-right: 1px solid #2a2a2a;
	padding: 20px 0;
	max-height: 640px;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
	scrollbar-color: #e8b04b #000000;
}

.kyh-sidebar::-webkit-scrollbar {
	width: 8px;
}

.kyh-sidebar::-webkit-scrollbar-track {
	background-color: #000000;
}

.kyh-sidebar::-webkit-scrollbar-thumb {
	background-color: #e8b04b;
	border-radius: 4px;
}

.kyh-sidebar::-webkit-scrollbar-thumb:hover {
	background-color: #ffcf70;
}

.kyh-drug-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.kyh-drug-list li {
	margin: 0;
}

.kyh-drug-list .kyh-empty {
	padding: 12px 18px;
	color: #777;
	font-style: italic;
}

.kyh-drug-btn {
	display: block;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	border-bottom: 1px solid #1a1a1a;
	color: #e8b04b;
	font-family: 'Alfarn W05', Georgia, serif;
	font-size: 18px;
	letter-spacing: 0.5px;
	padding: 14px 18px;
	cursor: pointer;
	white-space: normal;
	word-wrap: break-word;
	overflow-wrap: break-word;
	transition: background-color 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}

.kyh-drug-btn:hover,
.kyh-drug-btn:focus {
	background-color: #141414;
	color: #ffcf70;
	text-shadow: 0 0 8px rgba(255, 191, 90, 0.6);
	outline: none;
}

.kyh-drug-btn.is-active {
	background-color: #1c1600;
	color: #ffd98a;
	text-shadow: 0 0 10px rgba(255, 191, 90, 0.8);
	border-left: 3px solid #e8b04b;
}

.kyh-display {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	min-height: 480px;
}

.kyh-image-wrap {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.kyh-default-image {
	max-width: 100%;
	max-height: 600px;
	height: auto;
	display: block;
}

.kyh-info-wrap {
	display: none;
	width: 100%;
	max-width: 720px;
	animation: kyh-fade-in 0.25s ease;
}

.kyh-info-wrap.is-visible {
	display: block;
}

.kyh-image-wrap.is-hidden {
	display: none;
}

@keyframes kyh-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.kyh-back-btn {
	background: none;
	border: 1px solid #e8b04b;
	color: #e8b04b;
	font-family: Georgia, serif;
	font-size: 14px;
	padding: 6px 14px;
	margin-bottom: 18px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.kyh-back-btn:hover {
	background-color: #e8b04b;
	color: #000000;
}

.kyh-drug-title {
	font-family: 'Alfarn W05', Georgia, serif;
	font-size: 32px;
	letter-spacing: 0.5px;
	color: #ffd98a;
	margin: 0 0 16px;
}

.kyh-drug-content {
	font-size: 16px;
	line-height: 1.7;
	color: #e6e6e6;
}

.kyh-drug-content p:first-child {
	margin-top: 0;
}

.kyh-drug-content strong,
.kyh-drug-content b {
	color: #e8b04b;
	font-weight: bold;
}

.kyh-loading {
	display: none;
	position: absolute;
	inset: 0;
	align-items: center;
	justify-content: center;
	color: #e8b04b;
	font-family: 'Alfarn W05', Georgia, serif;
	font-size: 18px;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 10;
}

.kyh-loading.is-visible {
	display: flex;
}

.kyh-disclaimer {
	background-color: #0a0a0a;
	border: 1px solid #2a2a2a;
	border-top: none;
	color: #999999;
	font-size: 13px;
	line-height: 1.6;
	padding: 14px 20px;
}

.kyh-disclaimer p {
	margin: 0;
}

/* Responsive: stack on smaller screens */
@media (max-width: 782px) {
	.kyh-container {
		grid-template-columns: 1fr;
	}

	.kyh-sidebar {
		border-right: none;
		border-bottom: 1px solid #2a2a2a;
		max-height: 260px;
	}

	.kyh-display {
		min-height: 360px;
	}

	.kyh-drug-title {
		font-size: 26px;
	}
}
