/* Profil Dokter: kartu dokter + pop-up profil. Warna diatur dari menu Jadwal Dokter > Profil Dokter. */
.jdbp,
.jdbp-single {
	--jdbp-primary: #b91c1c;
	--jdbp-chip: #111111;
	--jdbp-chip-text: #ffffff;
	--jdbp-title: #111111;
	--jdbp-text: #374151;
	--jdbp-card: #ffffff;
	--jdbp-line: #e5e7eb;
	--jdbp-soft: #f6f7f9;
	--jdbp-cols: 4;
	font-family: inherit;
	color: var(--jdbp-text);
	line-height: 1.5;
}

.jdbp *,
.jdbp-single * {
	box-sizing: border-box;
}

.jdbp [hidden],
.jdbp-single [hidden] {
	display: none !important;
}

.jdbp {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 1.5em 0;
	overflow-x: clip;
	overflow-clip-margin: 8px;
}

/* Agar kolom penuh mengisi ruang walau induknya "shrink-to-fit" (Elementor, flex, float), seperti tabel jadwal. */
.jdbp::before {
	content: "a b";
	display: block;
	height: 0;
	overflow: hidden;
	visibility: hidden;
	word-spacing: 4000px;
	white-space: normal;
}

.jdbp-title {
	margin: 0 0 16px;
	color: var(--jdbp-title);
}

/* ----- Kategori ----- */
.jdbp .jdbp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 28px;
	padding: 0;
}

.jdbp .jdbp-chip {
	flex: 1 1 auto;
	margin: 0;
	padding: 0.85em 1.4em;
	border: 0;
	border-radius: 6px;
	background: var(--jdbp-chip);
	color: var(--jdbp-chip-text);
	font: inherit;
	font-size: 0.95em;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
	-webkit-tap-highlight-color: transparent;
}

.jdbp .jdbp-chip:hover {
	box-shadow: inset 0 0 0 2px var(--jdbp-primary);
}

.jdbp .jdbp-chip.is-active {
	background: var(--jdbp-primary);
	color: #fff;
	box-shadow: none;
}

.jdbp .jdbp-chip:focus-visible,
.jdbp .jdbp-open:focus-visible,
.jdbp .jdbp-cname a:focus-visible {
	outline: 3px solid var(--jdbp-primary);
	outline-offset: 2px;
}

/* ----- Kartu ----- */
.jdbp .jdbp-grid {
	display: grid;
	grid-template-columns: repeat(var(--jdbp-cols), minmax(0, 1fr));
	gap: 28px 24px;
	margin: 0;
	padding: 0;
}

.jdbp .jdbp-card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	min-width: 0;
	margin: 0;
	padding: 0;
	text-align: center;
	background: transparent;
}

.jdbp .jdbp-cphoto {
	display: block;
	aspect-ratio: 4 / 5;
	margin: 0 0 16px;
	overflow: hidden;
	border-radius: 14px;
	background: var(--jdbp-soft);
}

.jdbp .jdbp-cphoto img,
.jdbp .jdbp-cphoto svg {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: center top;
	border-radius: 0;
	transition: transform 0.35s ease;
}

.jdbp .jdbp-card:hover .jdbp-cphoto img {
	transform: scale(1.04);
}

.jdbp .jdbp-cname {
	margin: 0 0 6px;
	padding: 0 4px;
	color: var(--jdbp-title);
	font-size: 1.12em;
	font-weight: 700;
	line-height: 1.3;
	text-transform: none;
	overflow-wrap: anywhere;
}

.jdbp .jdbp-cspec {
	flex: 1 1 auto;
	margin: 0 0 18px;
	padding: 0 4px;
	color: var(--jdbp-text);
	font-size: 0.95em;
	overflow-wrap: anywhere;
}

.jdbp .jdbp-cname a {
	color: inherit;
	text-decoration: none;
}

.jdbp .jdbp-cname a:hover {
	color: var(--jdbp-primary);
}

.jdbp .jdbp-open {
	box-sizing: border-box;
	text-decoration: none;
	display: block;
	width: 100%;
	margin: auto 0 0;
	padding: 0.8em 1em;
	border: 0;
	border-radius: 10px;
	background: var(--jdbp-primary);
	color: #fff;
	font: inherit;
	font-size: 0.95em;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: filter 0.15s, transform 0.15s;
	-webkit-tap-highlight-color: transparent;
}

.jdbp .jdbp-open:hover {
	filter: brightness(0.92);
}

.jdbp .jdbp-open:active {
	transform: translateY(1px);
}

.jdbp .jdbp-empty {
	padding: 24px 0;
	text-align: center;
	color: #6b7280;
}

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

/* ----- Halaman profil dokter ----- */
.jdbp-single {
	width: 100%;
	max-width: 960px;
	margin: 0 auto;
	padding: 8px 0 24px;
}

.jdbp-single .jdbp-head {
	display: grid;
	grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
	gap: 30px;
	align-items: center;
	margin: 0 0 8px;
	}

.jdbp-single .jdbp-photo {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 16px;
	background: var(--jdbp-soft);
}

.jdbp-single .jdbp-photo img,
.jdbp-single .jdbp-photo svg {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: center top;
	border-radius: 0;
}

.jdbp-single .jdbp-dname {
	margin: 0 0 8px;
	padding: 0;
	color: var(--jdbp-title);
	font-size: 1.7em;
	font-weight: 800;
	line-height: 1.2;
	text-transform: none;
	overflow-wrap: anywhere;
}

.jdbp-single .jdbp-dspec {
	margin: 0 0 14px;
	color: var(--jdbp-primary);
	font-size: 1.05em;
	font-weight: 600;
}

.jdbp-single .jdbp-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}

.jdbp-single .jdbp-tags span {
	padding: 0.25em 0.8em;
	border-radius: 999px;
	background: var(--jdbp-soft);
	color: var(--jdbp-text);
	font-size: 0.82em;
	font-weight: 600;
}

.jdbp-single .jdbp-sec {
	margin: 26px 0 0;
	padding: 22px 0 0;
	border-top: 1px solid var(--jdbp-line);
}

.jdbp-single .jdbp-sec h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	color: var(--jdbp-title);
	font-size: 1.1em;
	font-weight: 800;
	text-transform: none;
	letter-spacing: 0;
}

.jdbp-single .jdbp-sec h2::before {
	content: "";
	width: 5px;
	height: 1.1em;
	border-radius: 3px;
	background: var(--jdbp-primary);
}

.jdbp-single .jdbp-desc p {
	margin: 0 0 0.8em;
}

.jdbp-single .jdbp-desc p:last-child {
	margin-bottom: 0;
}

.jdbp-single ul.jdbp-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jdbp-single ul.jdbp-list li {
	position: relative;
	margin: 0 0 9px;
	padding: 0 0 0 22px;
	overflow-wrap: anywhere;
}

.jdbp-single ul.jdbp-list li::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 0.6em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--jdbp-primary);
}

.jdbp-single ul.jdbp-list a {
	color: var(--jdbp-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Jadwal */
.jdbp-single ul.jdbp-sched {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jdbp-single ul.jdbp-sched li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--jdbp-line);
	border-radius: 12px;
	background: var(--jdbp-soft);
}

.jdbp-single .jdbp-day {
	flex: none;
	white-space: nowrap;
	font-weight: 700;
	color: var(--jdbp-title);
}

.jdbp-single .jdbp-today {
	margin-left: 8px;
	padding: 0.1em 0.6em;
	border-radius: 999px;
	background: var(--jdbp-primary);
	color: #fff;
	font-size: 0.72em;
	font-style: normal;
	font-weight: 700;
	vertical-align: middle;
}

.jdbp-single .jdbp-hrs {
	min-width: 0;
	white-space: nowrap;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.jdbp-single ul.jdbp-sched li.is-off {
	background: transparent;
	color: #9ca3af;
}

.jdbp-single ul.jdbp-sched li.is-off .jdbp-day {
	color: #6b7280;
	font-weight: 600;
}

.jdbp-single ul.jdbp-sched li.is-on {
	background: #fff;
}

.jdbp-single ul.jdbp-sched li.is-today {
	border-color: var(--jdbp-primary);
	box-shadow: 0 0 0 2px var(--jdbp-primary) inset;
}

.jdbp-single .jdbp-appt {
	display: inline-block;
	margin: 4px 0 0;
	padding: 0.1em 0.55em;
	border-radius: 999px;
	background: #fef3c7;
	color: #92400e;
	font-size: 0.75em;
	font-weight: 700;
	white-space: nowrap;
}

/* ----- Responsif ----- */
@media (max-width: 1024px) {
	.jdbp .jdbp-grid {
		grid-template-columns: repeat(min(var(--jdbp-cols), 3), minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.jdbp .jdbp-grid {
		grid-template-columns: repeat(min(var(--jdbp-cols), 2), minmax(0, 1fr));
		gap: 22px 14px;
	}

	.jdbp .jdbp-chips {
		gap: 8px;
	}

	.jdbp .jdbp-chip {
		padding: 0.7em 1em;
		font-size: 0.88em;
	}

	.jdbp-single .jdbp-head {
		grid-template-columns: minmax(0, 120px) minmax(0, 1fr);
		gap: 16px;
		align-items: start;
	}

	.jdbp-single .jdbp-dname {
		font-size: 1.25em;
	}

	.jdbp-single ul.jdbp-sched {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 420px) {
	.jdbp .jdbp-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.jdbp .jdbp-cphoto img {
		transition: none;
	}
}
