/*
 * Past Post History feed styles.
 *
 * Palette note: the accent is #1557C0, deliberately a few steps off the
 * well-known social blue. Close enough to feel familiar, far enough that it
 * is not a copy of anyone's brand colour. Background is a generic light grey.
 * All body text is solid black, never grey, as specified.
 */

.bdpph-root {
	--bdpph-blue:        #1557C0;
	--bdpph-blue-dark:   #0E3F91;
	--bdpph-blue-tint:   #E7EFFB;
	--bdpph-bg:          #F0F2F5;
	--bdpph-card:        #FFFFFF;
	--bdpph-line:        #CED0D4;
	--bdpph-hover:       #E4E6E9;
	--bdpph-text:        #000000;
	--bdpph-radius:      10px;
	--bdpph-radius-lg:   14px;
	--bdpph-gap:         16px;
	--bdpph-shadow:      0 1px 2px rgba(0, 0, 0, .18);

	background: var(--bdpph-bg);
	color: var(--bdpph-text);
	padding: 0 0 48px;
	font-size: 16px;
	line-height: 1.45;
	-webkit-text-size-adjust: 100%;
}

/* Force solid black inside our own markup, whatever the theme does. */
.bdpph-root,
.bdpph-root * {
	color: var(--bdpph-text);
}
.bdpph-root a {
	color: var(--bdpph-blue);
	text-decoration: none;
}
.bdpph-root a:hover,
.bdpph-root a:focus-visible {
	text-decoration: underline;
}

.bdpph-root *:focus-visible {
	outline: 3px solid var(--bdpph-blue);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ---------------------------------------------------------------- header */

.bdpph-head {
	background: var(--bdpph-card);
	border-bottom: 1px solid var(--bdpph-line);
	margin-bottom: var(--bdpph-gap);
}

.bdpph-head__cover {
	max-width: 940px;
	margin: 0 auto;
	background: var(--bdpph-blue-tint);
	aspect-ratio: 16 / 6;
	overflow: hidden;
	border-radius: 0 0 var(--bdpph-radius-lg) var(--bdpph-radius-lg);
}

.bdpph-head__cover-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bdpph-head__bar {
	max-width: 940px;
	margin: 0 auto;
	padding: 0 16px 16px;
	display: flex;
	align-items: flex-end;
	gap: 16px;
	margin-top: -42px;
}

.bdpph-head__avatar {
	width: 132px;
	height: 132px;
	border-radius: 50%;
	border: 4px solid var(--bdpph-card);
	object-fit: cover;
	display: block;
	background: var(--bdpph-hover);
	flex: 0 0 auto;
}

.bdpph-head__avatar--blank {
	display: block;
}

.bdpph-head__meta {
	padding-bottom: 6px;
	min-width: 0;
}

.bdpph-head__name {
	font-size: 28px;
	line-height: 1.15;
	font-weight: 800;
	margin: 0 0 2px;
}

.bdpph-head__tagline,
.bdpph-head__count {
	margin: 0;
	font-size: 15px;
	font-weight: 500;
}

/* ------------------------------------------------------------------ feed */

.bdpph-feed {
	max-width: 620px;
	margin: 0 auto;
	padding: 0 12px;
	display: flex;
	flex-direction: column;
	gap: var(--bdpph-gap);
}

.bdpph-back a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
}

.bdpph-empty {
	background: var(--bdpph-card);
	border-radius: var(--bdpph-radius);
	padding: 24px;
	text-align: center;
	font-weight: 600;
}

/* ------------------------------------------------------------------ card */

.bdpph-card {
	background: var(--bdpph-card);
	border-radius: var(--bdpph-radius);
	box-shadow: var(--bdpph-shadow);
	padding: 12px 0 4px;
	overflow: hidden;
}

.bdpph-card__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 16px 10px;
}

.bdpph-card__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--bdpph-hover);
	flex: 0 0 auto;
	display: block;
}

.bdpph-card__byline {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.bdpph-card__author {
	font-weight: 700;
	font-size: 15px;
}

.bdpph-card__date {
	font-size: 13px;
	font-weight: 500;
}

.bdpph-card__title {
	font-size: 18px;
	line-height: 1.3;
	font-weight: 700;
	margin: 0 0 8px;
	padding: 0 16px;
}

.bdpph-card__title--single {
	font-size: 22px;
}

.bdpph-card__body {
	padding: 0 16px;
	font-size: 16px;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

.bdpph-card__body p {
	margin: 0 0 12px;
}

.bdpph-card__body figure {
	margin: 12px -16px;
}

.bdpph-card__body img,
.bdpph-card__body video {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	background: var(--bdpph-hover);
}

.bdpph-card__body img {
	cursor: zoom-in;
}

/* Collapsed long posts */
.bdpph-card--clamped .bdpph-card__body {
	max-height: 420px;
	overflow: hidden;
	position: relative;
}

.bdpph-card--clamped .bdpph-card__body::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 72px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #FFFFFF);
	pointer-events: none;
}

.bdpph-seemore {
	appearance: none;
	background: none;
	border: 0;
	margin: 0 16px 8px;
	padding: 4px 0;
	font: inherit;
	font-weight: 700;
	color: var(--bdpph-blue);
	cursor: pointer;
	align-self: flex-start;
}

/* ----------------------------------------------------------- tally + bar */

.bdpph-card__tally {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 500;
}

.bdpph-tally__reactions {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.bdpph-tally__dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--bdpph-blue);
}

.bdpph-tally__dot .bdpph-icon {
	width: 12px;
	height: 12px;
	color: #FFFFFF;
}

.bdpph-root .bdpph-tally__dot .bdpph-icon {
	color: #FFFFFF;
}

.bdpph-card__actions {
	display: flex;
	border-top: 1px solid var(--bdpph-line);
	margin: 0 16px;
	padding: 4px 0;
	gap: 4px;
}

.bdpph-btn {
	appearance: none;
	background: none;
	border: 0;
	border-radius: 6px;
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 6px;
	font: inherit;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	text-decoration: none;
	min-height: 44px;
}

.bdpph-root .bdpph-btn {
	color: var(--bdpph-text);
}

.bdpph-btn:hover {
	background: var(--bdpph-hover);
	text-decoration: none;
}

.bdpph-btn[aria-pressed="true"],
.bdpph-root .bdpph-btn[aria-pressed="true"] {
	color: var(--bdpph-blue);
}

.bdpph-btn[aria-pressed="true"] .bdpph-icon {
	color: var(--bdpph-blue);
}

.bdpph-btn[aria-busy="true"] {
	opacity: .55;
	pointer-events: none;
}

.bdpph-icon {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
}

/* ------------------------------------------------------------ pagination */

.bdpph-root .bdpph-pagination,
.bdpph-root .navigation.pagination {
	background: var(--bdpph-card);
	border-radius: var(--bdpph-radius);
	box-shadow: var(--bdpph-shadow);
	padding: 14px;
	text-align: center;
}

.bdpph-root .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 6px;
	font-weight: 700;
}

.bdpph-root .page-numbers.current {
	background: var(--bdpph-blue);
	color: #FFFFFF;
}

/* -------------------------------------------------------------- comments */

.bdpph-comments {
	background: var(--bdpph-card);
	border-radius: var(--bdpph-radius);
	box-shadow: var(--bdpph-shadow);
	padding: 16px;
}

.bdpph-comments .comment-list {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.bdpph-comments .comment-list ol.children {
	list-style: none;
	padding-left: 20px;
}

.bdpph-comments .comment-body {
	background: var(--bdpph-bg);
	border-radius: var(--bdpph-radius);
	padding: 10px 14px;
	margin: 0 0 10px;
}

.bdpph-comments .comment-author .fn {
	font-weight: 700;
	font-style: normal;
}

.bdpph-comments .comment-metadata {
	font-size: 13px;
}

.bdpph-comments textarea,
.bdpph-comments input[type="text"],
.bdpph-comments input[type="email"] {
	width: 100%;
	max-width: 100%;
	border: 1px solid var(--bdpph-line);
	border-radius: 8px;
	padding: 10px 12px;
	font: inherit;
	background: #FFFFFF;
	color: var(--bdpph-text);
}

.bdpph-comments .form-submit input[type="submit"],
.bdpph-comments .submit {
	background: var(--bdpph-blue);
	color: #FFFFFF;
	border: 0;
	border-radius: 8px;
	padding: 11px 22px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	min-height: 44px;
}

.bdpph-comments .form-submit input[type="submit"]:hover {
	background: var(--bdpph-blue-dark);
}

/* ------------------------------------------------------------- lightbox */

.bdpph-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, .92);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 16px;
}

.bdpph-lb[hidden] {
	display: none;
}

.bdpph-lb__stage {
	max-width: 100%;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bdpph-lb__stage img,
.bdpph-lb__stage video {
	max-width: 100%;
	max-height: calc(100vh - 112px);
	width: auto;
	height: auto;
	display: block;
}

.bdpph-lb__btn {
	position: absolute;
	appearance: none;
	background: rgba(255, 255, 255, .14);
	border: 0;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}

.bdpph-lb__btn .bdpph-icon,
.bdpph-root .bdpph-lb__btn .bdpph-icon {
	color: #FFFFFF;
	width: 24px;
	height: 24px;
}

.bdpph-lb__btn:hover {
	background: rgba(255, 255, 255, .28);
}

.bdpph-lb__close { top: 12px; right: 12px; }
.bdpph-lb__prev  { left: 12px; top: 50%; transform: translateY(-50%); }
.bdpph-lb__next  { right: 12px; top: 50%; transform: translateY(-50%); }

/* ----------------------------------------------------------------- toast */

.bdpph-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	background: #000000;
	border-radius: 8px;
	padding: 11px 18px;
	font-size: 15px;
	font-weight: 600;
	z-index: 100000;
	max-width: calc(100vw - 32px);
	text-align: center;
}

.bdpph-toast,
.bdpph-root .bdpph-toast {
	color: #FFFFFF;
}

.bdpph-toast[hidden] {
	display: none;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 680px) {
	.bdpph-head__bar {
		flex-direction: column;
		align-items: center;
		text-align: center;
		margin-top: -36px;
	}

	.bdpph-head__avatar {
		width: 104px;
		height: 104px;
	}

	.bdpph-head__name {
		font-size: 23px;
	}

	.bdpph-feed {
		padding: 0 8px;
	}

	.bdpph-card {
		border-radius: var(--bdpph-radius);
	}

	.bdpph-btn__label {
		font-size: 14px;
	}
}

@media (max-width: 400px) {
	.bdpph-btn {
		gap: 5px;
		padding: 10px 2px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bdpph-root * {
		transition: none !important;
		animation: none !important;
	}
}
