/* Doctor archive (/doctor/) — shares .adb-page / --adb-* tokens and the
   topbar styling from booking.css; this file covers the filter sidebar and
   result grid only. */

.adb-archive { max-width: 1440px; margin: 0 auto; padding: 32px 24px 56px; }
.adb-archive-grid { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }

/* ---- LEFT: filter sidebar ---- */
.adb-filter {
	position: sticky; top: 24px;
	background: #fff; border: 1px solid var(--adb-line); border-radius: 14px;
	padding: 22px 20px; box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
}
.adb-filter-heading { font-size: 20px; font-weight: 800; color: var(--adb-ink); margin: 0 0 16px; }

/* Search input: reused for both the desktop (under the result count) and
   mobile (top "Cari Dokter" bar) placements — see the two .adb-filter-search
   instances in the template, only one of which is visible per breakpoint. */
.adb-filter-search { display: flex; gap: 6px; margin-bottom: 20px; }
.adb-filter-search input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--adb-line); border-radius: 8px; font-size: 14px; font-family: inherit; background: var(--adb-soft); color: var(--adb-ink); }
.adb-filter-search input:focus { outline: none; border-color: var(--adb-green); }
.adb-filter-search button {
	-webkit-appearance: none; appearance: none; flex: 0 0 auto;
	width: 36px; border: 1px solid var(--adb-line); border-radius: 8px; background: #fff;
	color: var(--adb-green-d); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.adb-filter-search button:hover { border-color: var(--adb-green); }

/* Desktop search box (under the result count) — hidden on mobile, where the
   "Cari Dokter" bar's own input is used instead. */
.adb-filter-search-desktop { max-width: 380px; }

/* Mobile-only "Cari Dokter" header + Filter toggle/chips — hidden on desktop. */
.adb-mobile-search-head { display: none; }
.adb-mobile-title { font-size: 22px; font-weight: 800; color: var(--adb-ink); margin: 0 0 14px; }
.adb-filter-toggle-checkbox { position: absolute; opacity: 0; pointer-events: none; }
.adb-filter-toggle-row { display: none; align-items: center; gap: 10px; flex-wrap: wrap; }
.adb-filter-toggle-btn {
	display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
	background: var(--adb-soft); color: var(--adb-green-d); font-weight: 700; font-size: 14px;
	padding: 9px 16px; border-radius: 10px; border: 1px solid transparent; user-select: none;
}
.adb-filter-toggle-checkbox:checked ~ .adb-mobile-search-head .adb-filter-toggle-btn,
.adb-filter-toggle-checkbox:focus-visible ~ .adb-mobile-search-head .adb-filter-toggle-btn { border-color: var(--adb-green); }
.adb-chip-sep { color: var(--adb-line); font-weight: 300; }
.adb-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.adb-chip,
.adb-chip:link,
.adb-chip:visited {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--adb-soft); color: var(--adb-ink); font-size: 13px; font-weight: 600;
	padding: 8px 12px; border-radius: 20px; text-decoration: none;
}
.adb-chip:hover,
.adb-chip:focus,
.adb-chip:active { background: #ececec; color: var(--adb-ink); }
.adb-chip span { color: var(--adb-muted); font-weight: 400; }

.adb-filter-subhead { font-size: 13px; font-weight: 700; color: var(--adb-muted); text-transform: uppercase; letter-spacing: .03em; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--adb-line); }

.adb-filter-list { list-style: none; margin: 0 0 18px; padding: 0; max-height: 420px; overflow-y: auto; }
.adb-filter-list li { margin: 0; }
.adb-filter-list label {
	display: flex; align-items: center; gap: 9px; padding: 7px 2px;
	font-size: 14px; color: var(--adb-ink); cursor: pointer; line-height: 1.35;
}
.adb-filter-list input[type="checkbox"] {
	width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--adb-green); cursor: pointer;
}
.adb-filter-list span { flex: 1; }
.adb-filter-count { font-style: normal; font-size: 12px; color: var(--adb-muted); flex: 0 0 auto; }

.adb-filter-actions { display: flex; align-items: center; gap: 14px; }
.adb-filter-apply {
	-webkit-appearance: none; appearance: none; flex: 1;
	background: var(--adb-green); color: #fff; border: 0; border-radius: 9px;
	padding: 11px 14px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.adb-filter-apply:hover { background: var(--adb-green-d); }
.adb-filter-reset,
.adb-filter-reset:link,
.adb-filter-reset:visited { font-size: 13px; color: var(--adb-muted); text-decoration: underline; white-space: nowrap; }
.adb-filter-reset:hover,
.adb-filter-reset:focus,
.adb-filter-reset:active { color: var(--adb-green-d); }

/* ---- RIGHT: results ---- */
.adb-results-count { font-size: 14px; color: var(--adb-muted); margin: 0 0 18px; }
.adb-results-count strong { color: var(--adb-ink); font-size: 16px; }

/* auto-fit + a 300px floor guarantees each card is always wide enough for
   "Buat Janji" and "Lihat Profil" to sit on one row, at any viewport — rather
   than a fixed 3-column split that could cramp on narrower desktops/tablets.
   (Below 600px this is overridden to a guaranteed single column — see the
   max-width:600px block — so the 300px floor never causes horizontal overflow
   on narrow phones.) */
.adb-doc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }

.adb-doc-card {
	display: flex; gap: 14px; background: #fff; border: 1px solid var(--adb-line);
	border-radius: 14px; padding: 16px; box-shadow: 0 6px 16px rgba(0, 0, 0, .04);
	transition: box-shadow .15s, border-color .15s;
}
.adb-doc-card:hover { border-color: var(--adb-green); box-shadow: 0 10px 24px rgba(0, 0, 0, .08); }

.adb-doc-card-photo { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--adb-soft); }
.adb-doc-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.adb-doc-card-body { flex: 1; min-width: 0; }
.adb-doc-card-name { font-size: 15px; font-weight: 700; color: var(--adb-ink); margin: 0 0 4px; line-height: 1.3; }
.adb-doc-card-specialty { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-style: italic; color: var(--adb-muted); margin: 0 0 12px; }
.adb-doc-card-specialty svg { flex: 0 0 auto; color: var(--adb-green); }

.adb-doc-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.adb-doc-btn { display: inline-block; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 8px; text-decoration: none; text-align: center; -webkit-tap-highlight-color: transparent; }
.adb-doc-btn:focus-visible { outline: 2px solid var(--adb-green-d); outline-offset: 2px; }

/* Explicit color on every pseudo-class — see booking.css .adb-buatjanji for
   why: the default a:visited rule otherwise wins over a plain class selector
   and can make the label unreadable after the link has been clicked once. */
.adb-doc-btn-primary,
.adb-doc-btn-primary:link,
.adb-doc-btn-primary:visited,
.adb-doc-btn-primary:hover,
.adb-doc-btn-primary:focus,
.adb-doc-btn-primary:active { background: var(--adb-green); color: #fff; }
.adb-doc-btn-primary:hover,
.adb-doc-btn-primary:focus,
.adb-doc-btn-primary:active { background: var(--adb-green-d); }

.adb-doc-btn-outline,
.adb-doc-btn-outline:link,
.adb-doc-btn-outline:visited,
.adb-doc-btn-outline:hover,
.adb-doc-btn-outline:focus,
.adb-doc-btn-outline:active { background: #fff; color: var(--adb-green-d); border: 1px solid var(--adb-green); }
.adb-doc-btn-outline:hover,
.adb-doc-btn-outline:focus,
.adb-doc-btn-outline:active { background: var(--adb-soft); }

.adb-no-results { background: #fff; border: 1px solid var(--adb-line); border-radius: 14px; padding: 40px 24px; text-align: center; color: var(--adb-muted); }
.adb-no-results p { margin: 0 0 10px; }

.adb-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; justify-content: center; }
.adb-pagination span, .adb-pagination a {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px;
	border: 1px solid var(--adb-line); font-size: 14px; text-decoration: none; color: var(--adb-ink);
}
.adb-pagination a:hover { border-color: var(--adb-green); color: var(--adb-green-d); }
.adb-pagination span.current { background: var(--adb-green); border-color: var(--adb-green); color: #fff; font-weight: 700; }

/* Responsive */
@media (max-width: 860px) {
	.adb-archive-grid { grid-template-columns: 1fr; gap: 22px; }

	/* The sidebar becomes a plain (non-card) block on mobile; the drawer
	   pieces get their own card treatment below when opened. */
	.adb-filter { position: static; background: transparent; border: 0; box-shadow: none; padding: 0; }
	.adb-filter-heading { display: none; }
	.adb-filter-search-desktop { display: none; }

	.adb-mobile-search-head { display: block; }
	.adb-filter-toggle-row { display: flex; }

	/* Checkbox-hack drawer: hidden until the (visually hidden) toggle
	   checkbox is checked via its label ("Filter" button). The checkbox is a
	   direct child of .adb-filter, so `~` reaches these later siblings
	   regardless of what markup sits between them. */
	.adb-filter-subhead,
	.adb-filter-list,
	.adb-filter-actions {
		display: none;
		background: #fff; border: 1px solid var(--adb-line);
	}
	.adb-filter-toggle-checkbox:checked ~ .adb-filter-subhead,
	.adb-filter-toggle-checkbox:checked ~ .adb-filter-list,
	.adb-filter-toggle-checkbox:checked ~ .adb-filter-actions {
		display: block;
	}
	.adb-filter-toggle-checkbox:checked ~ .adb-filter-subhead { margin: 10px 0 0; padding: 14px 14px 8px; border-radius: 12px 12px 0 0; border-bottom: 0; }
	.adb-filter-toggle-checkbox:checked ~ .adb-filter-list { margin: 0; padding: 4px 14px 10px; border-top: 0; border-radius: 0; max-height: 320px; }
	.adb-filter-toggle-checkbox:checked ~ .adb-filter-actions {
		display: flex; margin: -1px 0 0; padding: 12px 14px 16px; border-top: 0; border-radius: 0 0 12px 12px;
		box-shadow: 0 8px 20px rgba(0, 0, 0, .05);
	}
}

@media (max-width: 600px) {
	.adb-archive { padding: 20px 16px 44px; }
	.adb-doc-grid { grid-template-columns: 1fr; }
	.adb-doc-card { flex-direction: row; }
	.adb-doc-card-photo { width: 60px; height: 60px; }
	.adb-doc-card-actions { flex-direction: column; }
	.adb-doc-btn { text-align: center; }
}

/* Specialty page (/dokter/{specialty}/) SEO intro: heading above the grid,
   long-form copy below the grid (after the doctor list, before the footer). */
.adb-specialty-intro-wrap { max-width: 1440px; margin: 0 auto; padding: 32px 24px 0; }
.adb-specialty-intro { max-width: 860px; }
.adb-specialty-intro h1 { font-size: 28px; font-weight: 800; color: var(--adb-ink); margin: 0 0 12px; }
.adb-specialty-intro p { font-size: 15px; line-height: 1.7; color: var(--adb-muted); margin: 0; }

/* The long-form intro copy gets its own white card (matching the doctor
   cards / filter sidebar) so it doesn't float bare on the page's gray
   background — and a readable max-width so lines don't stretch full-bleed. */
.adb-specialty-intro-wrap-body { padding: 8px 24px 40px; }
.adb-specialty-intro-wrap-body .adb-specialty-intro {
	max-width: none;
	background: #fff;
	border: 1px solid var(--adb-line);
	border-radius: 14px;
	padding: 32px 36px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
}
.adb-markdown { max-width: 760px; }
@media (max-width: 600px) {
	.adb-specialty-intro-wrap { padding: 20px 16px 0; }
	.adb-specialty-intro-wrap-body { padding: 4px 16px 32px; }
	.adb-specialty-intro-wrap-body .adb-specialty-intro { padding: 22px 20px; border-radius: 12px; }
	.adb-specialty-intro h1 { font-size: 22px; }
}

/* Markdown-rendered "Konten Pengantar" body copy. */
.adb-markdown p { font-size: 15px; line-height: 1.7; color: var(--adb-muted); margin: 0 0 16px; }
.adb-markdown > :last-child { margin-bottom: 0; }
.adb-markdown h2 { font-size: 21px; font-weight: 800; color: var(--adb-ink); margin: 26px 0 12px; }
.adb-markdown h3 { font-size: 17px; font-weight: 700; color: var(--adb-ink); margin: 22px 0 10px; }
.adb-markdown h4,
.adb-markdown h5 { font-size: 15px; font-weight: 700; color: var(--adb-ink); margin: 18px 0 8px; }
.adb-markdown h2:first-child,
.adb-markdown h3:first-child,
.adb-markdown h4:first-child { margin-top: 0; }
.adb-markdown ul,
.adb-markdown ol { margin: 0 0 16px; padding-left: 20px; color: var(--adb-muted); font-size: 15px; line-height: 1.7; }
.adb-markdown li { margin-bottom: 6px; padding-left: 4px; }
.adb-markdown li::marker { color: var(--adb-green); }
.adb-markdown strong { color: var(--adb-ink); font-weight: 700; }
.adb-markdown code { background: var(--adb-soft); border: 1px solid var(--adb-line); border-radius: 4px; padding: 1px 6px; font-size: 13px; }
.adb-markdown a { color: var(--adb-green); text-decoration: underline; text-underline-offset: 2px; }
.adb-markdown a:hover { color: var(--adb-green-d); }
.adb-markdown blockquote {
	margin: 4px 0 16px; padding: 12px 18px; border-left: 3px solid var(--adb-green);
	background: var(--adb-soft); border-radius: 0 8px 8px 0; color: var(--adb-ink); font-style: italic;
}
.adb-markdown blockquote p { margin: 0; color: inherit; }
