/* Says Quran — Rich Name Editor + toolbar (mobile-first) */

/* Bounding box teks di atas mockup (ukuran diset admin: boxw/boxh %) */
.sqne-box {
	position: absolute;
	box-sizing: border-box;
	outline: none;
	overflow: hidden;
	line-height: 1.1;
	word-break: break-word;
	overflow-wrap: break-word;
	-webkit-user-modify: read-write-plaintext-only; /* diabaikan sebagian browser; kita sanitasi sendiri */
	cursor: text;
	/* garis bantu box hanya saat edit, hilang saat ekspor (.sqne-export-clean) */
	border: 1px dashed rgba(120, 120, 120, .55);
	border-radius: 3px;
	transition: border-color .15s;
}
.sqne-box:focus { border-color: rgba(41, 113, 177, .9); }
.sqne-box.sqne-overflow { border-color: #d63638; }

/* Placeholder */
.sqne-box.sqne-empty::before {
	content: attr(data-placeholder);
	color: rgba(120, 120, 120, .75);
	pointer-events: none;
	font-weight: 400;
	font-style: italic;
}

/* Saat mode ekspor / cetak: sudut kotak & garis bantu dihilangkan */
.sqne-export-clean { border-radius: 0 !important; }
.sqne-export-clean .sqne-box,
.sqne-box.sqne-clean { border-color: transparent !important; }
.sqne-export-clean .sqne-box.sqne-empty::before,
.sqne-box.sqne-clean.sqne-empty::before { content: none; }

/* ---------------- Toolbar ---------------- */
.sqne-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: 8px;
	background: #fff;
	border: 1px solid #e3e0d8;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}
.sqne-group {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 2px;
	background: #f6f4ef;
	border-radius: 9px;
}
.sqne-btn {
	min-width: 38px;
	height: 38px;
	padding: 0 9px;
	border: none;
	background: transparent;
	border-radius: 7px;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	color: #2b2b2b;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .12s;
}
.sqne-btn:hover { background: #e9e5dc; }
.sqne-btn:active { background: #ddd7c9; }
.sqne-btn.sqne-b { font-weight: 800; }
.sqne-btn.sqne-i { font-style: italic; font-family: Georgia, serif; }
.sqne-btn.sqne-u { text-decoration: underline; }
.sqne-az { font-weight: 700; }
.sqne-az-big { font-size: 19px; }

.sqne-size {
	width: 54px;
	height: 38px;
	text-align: center;
	border: 1px solid #d8d3c6;
	border-radius: 7px;
	font-size: 15px;
	background: #fff;
	-moz-appearance: textfield;
}
.sqne-size::-webkit-outer-spin-button,
.sqne-size::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.sqne-font {
	height: 38px;
	max-width: 150px;
	border: 1px solid #d8d3c6;
	border-radius: 7px;
	background: #fff;
	font-size: 14px;
	padding: 0 8px;
}
.sqne-color {
	width: 40px;
	height: 38px;
	padding: 2px;
	border: 1px solid #d8d3c6;
	border-radius: 7px;
	background: #fff;
	cursor: pointer;
}

/* ---------------- Mobile: toolbar jadi bar geser di bawah ---------------- */
@media (max-width: 640px) {
	.sqne-toolbar {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		border-radius: 14px;
		padding: 8px 10px;
		gap: 8px;
	}
	.sqne-toolbar::-webkit-scrollbar { display: none; }
	.sqne-group { flex: 0 0 auto; }
	.sqne-btn { min-width: 42px; height: 42px; }
	.sqne-size { height: 42px; }
	.sqne-font { height: 42px; }
	.sqne-color { height: 42px; }

	/* toolbar menempel di bawah layar saat mengetik */
	.sqne-toolbar.sqne-sticky {
		position: sticky;
		bottom: 0;
		z-index: 30;
		box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
	}
}
