html,body {
	height: 100%;
	width: 100%;
	margin: 0;
}


#fixed {
	position: fixed;
	left: 0;
	width: 100%;
	top: 0;
	height: 50px;
	transition: 0.5s;
	z-index: 10;
	background-color: #f0f0f0;
	    display: flex;
    align-items: center;
	padding-left: 20px;
}

.sidebar {
	height: calc(100% - 50px);
	width: 0;
	position: fixed;
	z-index: 20;
	left: 0;
	top: 50px;
	background-color: #f0f0f0;
	overflow-x: hidden;
	transition: 0.3s;
	border-radius: 0 12px 0 0;
}

.sidebar.open {
	width: 260px;
	max-width: 100%;
}

.sidebar a {
	padding: 8px 8px 8px 32px;
	text-decoration: none;
	color: #fff;
	display: block;
	transition: 0.3s;
}

.sidebar a:hover {
	color: #f1f1f1;
}

.sidebar .closebtn {
	position: absolute;
	top: 0;
	right: 25px;
	font-size: 36px;
	margin-left: 50px;
}

.openbtn:hover { opacity: 0.95; }

#main {
	transition: margin-left .5s;
	padding: 16px;
	margin-top: 50px;
	overflow-y:auto;
	background-color:#ffffff;
}
/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */

@media screen and (max-height: 450px) {
	.sidebar {
		padding-top: 15px;
	}
	.sidebar a {
		font-size: 18px;
	}
}

@media screen and (max-width: 600px) {
	.sidebar.open {
		width: 100%;
		top: 50px;
		height: calc(100% - 50px);
		border-radius: 0;
	}
	#main {
		margin-left: 0 !important;
	}
	#viewde {
		height: 70vmin;
	}
}

#selectbook, #selectde, #selectchapter{
	margin: 5px 0;
	width:100%;
}
#selectsubjek,#selectjenjang {
	margin: 10px 5px;
	width: 110px;
}
#selectbahasa {
	border: none;
    border-radius: 5px;
    cursor: pointer;
	width: 37px;
}
select {
	    background-color: #F5F5F5;
    cursor: pointer;
    border: 1px solid #BDBDBD;
}

.openbtn {
	cursor: pointer;
	padding: 10px 15px;
	border: none;
	margin: 5px;
}

#logo {
	float: right;
	margin: 10px;
	vertical-align: middle;
	width: 45px;
}

/* placeholder removed */

#viewde {
	border-width: 0;
	width: 100%;
	height: 85vmin;
}

.tooltip {
	position: relative;
	display: inline-block;
}

.tooltip .tooltiptext {
	visibility: hidden;
	width: 140px;
	background-color: #555;
	color: #fff;
	text-align: center;
	border-radius: 6px;
	padding: 5px;
	position: absolute;
	z-index: 1;
	bottom: 150%;
	left: 50%;
	margin-left: -75px;
	opacity: 0;
	transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
	visibility: visible;
	opacity: 1;
}

.tengah{
	text-align:center;
}
.footer{
	background-color: #E5E4E2;
	padding:10px;
	border-radius:20px;
}
#propclass{
	margin-left:30px;
}
#selectde > option, .ow {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}
canvas{
	border-radius:12px;
}

/* Grid styles for content previews */
.grid-container{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
	margin: 8px 0 18px 0;
}
.grid-item{
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	padding: 8px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
	display: flex;
	flex-direction: column;
	align-items: stretch;
}
.iframe-wrap, .iframe-wrap2 { width:100%; overflow:hidden; border-radius:8px; }
.iframe-wrap2 iframe{ width:100%; height:180px; border:0; pointer-events: none; display:block; }
.iframe-wrap iframe{ width:100%; height:180px; border:0; display:block; }
.g-title{ margin-top:8px; font-size:14px; color:#333; font-weight:500; min-height:36px; transition: all 0.2s ease; }
.g-title:hover{ color:#4a90e2; }

#chapterTitle {
	font-size: 17px;
	font-weight: 600;
	color: #333;
	margin-bottom: 8px;
	padding: 8px 0;
}

@media screen and (max-width: 420px){
	.iframe-wrap iframe{ height:140px; }
}

/* loading placeholder for lazy iframes */
.iframe-wrap.loading{ position: relative; background: #fafafa; }
.iframe-wrap .placeholder{
	width:100%;
	height:180px;
	border-radius:8px;
	background: linear-gradient(90deg, #f0f0f0 0%, #e9e9e9 50%, #f0f0f0 100%);
	background-size: 200% 100%;
	animation: shimmer 1.2s linear infinite;
}
.iframe-wrap.loading .placeholder{ display:block; }
.iframe-wrap.loading .lazy-iframe{ opacity: 0; }
@keyframes shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}


/* Sidebar filter styles */
.side-content {
	display: block;
	padding: 6px 4px;
}
.side-content .filter{
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}
.side-content .filter select{
	flex: 1 1 auto;
	padding: 8px 10px;
	border-radius: 6px;
	border: 1px solid #D0D0D0;
	background: #fff;
}
.iconbtn{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 8px;
	border: none;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(0,0,0,0.06);
	font-size: 18px;
	cursor: default;
}
.iconbtn[title]{
	cursor: help;
}
.langbtn{
	display: inline-flex;
	align-items: center;
	gap:6px;
	padding: 6px 10px;
	border-radius: 8px;
	border: 1px solid #D0D0D0;
	background: #fff;
	cursor: pointer;
}
.langicon{font-size:18px}

/* icon sizing and color */
.icon { width: 18px; height: 18px; display: block; color: #333; }

/* Chapter filter buttons */
.chapter-filter-buttons {
	display: flex;
	gap: 12px;
	margin: 16px 0;
	flex-wrap: wrap;
}

.chapter-filter-btn {
	padding: 10px 20px;
	border: 2px solid #d0d0d0;
	border-radius: 8px;
	background: #fff;
	color: #333;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
}

.chapter-filter-btn:hover {
	background: #f5f5f5;
	border-color: #999;
}

.chapter-filter-btn.active {
	background: #4a90e2;
	color: #fff;
	border-color: #4a90e2;
}

.chapter-filter-btn.active:hover {
	background: #3a7bc8;
	border-color: #3a7bc8;
}

@media screen and (max-width: 600px) {
	.chapter-filter-buttons {
		gap: 8px;
	}
	.chapter-filter-btn {
		padding: 8px 16px;
		font-size: 14px;
	}
}