/* Tabalien audit fixes — UI/UX & aksesibilitas (v1.1.0) */

/* ---------- Fokus terlihat (U-7) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid #f0b429 !important;
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------- Tautan dalam paragraf (U-2) ---------- */
.article-text a,
.article-text p a,
.tab-empty-search a {
	text-decoration: underline !important;
	text-underline-offset: 2px;
	text-decoration-thickness: from-font;
}

.article-text a:hover,
.article-text p a:hover {
	text-decoration-thickness: 2px;
}

/* ---------- Target sentuh >= 24px (U-4) ---------- */
.menubar.bar,
.menubar.close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	min-height: 24px;
}

.footer a.menu-image-title-after {
	display: inline-block;
	min-height: 24px;
	line-height: 24px;
	padding: 0;
	vertical-align: middle;
}

.media-link {
	padding-top: 3px;
	padding-bottom: 3px;
}

/* ---------- Kunci gulir saat drawer terbuka (F-3) ---------- */
body.tab-scroll-lock {
	overflow: hidden !important;
}

/* ---------- Lightbox (F-2) ---------- */
.tab-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.92);
	opacity: 0;
	transition: opacity 0.18s ease;
}

.tab-lightbox[hidden] {
	display: none !important;
}

.tab-lightbox.tab-open {
	opacity: 1;
}

.tab-lightbox img {
	max-width: 92vw;
	max-height: 86vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}

.tab-lightbox-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.tab-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.26);
}

.tab-lightbox-caption {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 16px;
	margin: 0;
	color: #f2f2f2;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.tab-lightbox-caption:empty {
	display: none;
}

/* ---------- Pencarian tanpa hasil (F-1) ---------- */
.tab-empty-search {
	max-width: 640px;
	margin: 32px auto 48px;
	padding: 0 4px;
	text-align: center;
}

.tab-empty-search__title {
	font-size: clamp(22px, 5vw, 30px);
	line-height: 1.25;
	margin: 0 0 12px;
}

.tab-empty-search p {
	margin: 0 0 16px;
}

.tab-empty-search__form {
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
	margin: 20px 0 24px;
}

.tab-empty-search__form input[type="search"] {
	flex: 1 1 240px;
	max-width: 360px;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font: inherit;
}

.tab-empty-search__form button {
	padding: 10px 20px;
	border: 0;
	border-radius: 8px;
	background: #0b3d91;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	min-height: 44px;
}

.tab-empty-search__form button:hover {
	background: #0a357d;
}

/* ---------- Formulir pengaduan (F-5 / U-9) ---------- */
#form-pengaduan {
	max-width: 640px;
	margin: 24px auto 40px;
	padding: 24px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-sizing: border-box;
	text-align: left;
}

#form-pengaduan .form-group {
	margin: 0 0 18px;
}

#form-pengaduan label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: #111827;
}

#form-pengaduan .tab-required {
	color: #b91c1c;
	font-weight: 700;
}

#form-pengaduan input[type="tel"],
#form-pengaduan input[type="url"],
#form-pengaduan input[type="text"],
#form-pengaduan input[type="file"],
#form-pengaduan textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	color: #111827;
	font: inherit;
	line-height: 1.4;
}

#form-pengaduan input[type="file"] {
	padding: 8px;
}

#form-pengaduan textarea {
	min-height: 150px;
	resize: vertical;
}

#form-pengaduan input:focus,
#form-pengaduan textarea:focus {
	border-color: #0b3d91;
}

#form-pengaduan button[name="submit_pengaduan"],
#form-pengaduan button[type="submit"] {
	min-height: 44px;
	padding: 10px 24px;
	border: 0;
	border-radius: 8px;
	background: #0b3d91;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

#form-pengaduan button[name="submit_pengaduan"]:hover,
#form-pengaduan button[type="submit"]:hover {
	background: #0a357d;
}

#form-pengaduan .tab-form-note {
	margin: 0 0 18px;
	padding: 12px 14px;
	border-left: 3px solid #f0b429;
	background: #fffbeb;
	color: #4b5563;
	font-size: 13px;
	line-height: 1.55;
	border-radius: 0 6px 6px 0;
}

#form-pengaduan .tab-form-note a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Mode gelap */
body.darkmode #form-pengaduan {
	background: #1e1e1e;
	border-color: #333;
}

body.darkmode #form-pengaduan label {
	color: #f1f5f9;
}

body.darkmode #form-pengaduan input,
body.darkmode #form-pengaduan textarea {
	background: #2a2a2a;
	border-color: #444;
	color: #f1f5f9;
}

body.darkmode #form-pengaduan .tab-form-note {
	background: #2a2415;
	color: #e2e8f0;
	border-left-color: #f0b429;
}

body.darkmode .tab-empty-search__form input[type="search"] {
	background: #2a2a2a;
	border-color: #444;
	color: #f1f5f9;
}

/* ---------- H2 "Baca Juga" (U-5) ---------- */
.article-related > h2 {
	font-size: 20px;
	line-height: 1.3;
	margin: 0 0 12px;
}

/* ---------- Util ---------- */
.tab-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
