/**
 * Page Helpers — styles for editor blocks and shortcode output.
 * Loaded globally so cards render correctly inside columns on any page.
 */

/* ---------- Feature card ---------- */
.entry-content .mtp-ph-card,
.mtp-ph-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: clamp(1.25rem, 2.5vw, 1.65rem);
	background-color: #ffffff;
	border: 1px solid var(--brand-border, #e4e4e6);
	border-top: 3px solid var(--brand-purple, #705cc8);
	border-radius: var(--radius-md, 12px);
	color: #141414;
	box-shadow: var(--shadow-sm, 0 1px 2px rgba(10, 10, 10, 0.04));
	transition:
		border-color 0.2s var(--ease-out, ease),
		box-shadow 0.2s var(--ease-out, ease);
}

.entry-content .mtp-ph-card:hover,
.mtp-ph-card:hover {
	border-color: color-mix(in srgb, var(--brand-purple, #705cc8) 28%, var(--brand-border, #e4e4e6));
	box-shadow: var(--shadow-md, 0 4px 24px rgba(10, 10, 10, 0.06));
}

.entry-content .mtp-ph-card .mtp-ph-card__title,
.entry-content .mtp-ph-card h3,
.mtp-ph-card .mtp-ph-card__title,
.mtp-ph-card h3 {
	margin: 0 0 0.75rem;
	font-size: clamp(1rem, 1.2vw + 0.75rem, 1.125rem);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.015em;
	color: #422882;
}

.entry-content .mtp-ph-card .mtp-ph-card__list,
.entry-content .mtp-ph-card ul,
.mtp-ph-card .mtp-ph-card__list,
.mtp-ph-card ul {
	margin: 0;
	padding-left: 1.15em;
	list-style: disc;
}

.entry-content .mtp-ph-card .mtp-ph-card__list li,
.entry-content .mtp-ph-card ul li,
.mtp-ph-card .mtp-ph-card__list li,
.mtp-ph-card ul li {
	margin-bottom: 0.4rem;
	font-size: 0.925rem;
	line-height: 1.55;
	color: #4a4a4a;
}

.entry-content .mtp-ph-card .mtp-ph-card__list li:last-child,
.entry-content .mtp-ph-card ul li:last-child,
.mtp-ph-card .mtp-ph-card__list li:last-child,
.mtp-ph-card ul li:last-child {
	margin-bottom: 0;
}

.entry-content .mtp-ph-card .mtp-ph-card__list li::marker,
.entry-content .mtp-ph-card ul li::marker,
.mtp-ph-card .mtp-ph-card__list li::marker,
.mtp-ph-card ul li::marker {
	color: #705cc8;
}

/* ---------- Editor controls (inside the card preview) ---------- */
.mtp-ph-card-editor {
	gap: 0.75rem;
}

.mtp-ph-card-editor__title-input {
	width: 100%;
	margin: 0 0 0.85rem;
	padding: 0;
	font: inherit;
	font-size: clamp(1rem, 1.2vw + 0.75rem, 1.125rem);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.015em;
	color: var(--brand-purple-dark);
	background: transparent;
	border: none;
	border-bottom: 1px solid color-mix(in srgb, var(--brand-purple) 25%, transparent);
	border-radius: 0;
}

.mtp-ph-card-editor__title-input:focus {
	outline: none;
	border-bottom-color: var(--brand-purple);
}

.mtp-ph-card-editor__title-input[data-rich-text-placeholder]::before {
	color: color-mix(in srgb, var(--brand-purple) 45%, transparent);
	opacity: 1;
}

.mtp-ph-card-editor__bullets {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mtp-ph-card-editor__bullet-row {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.mtp-ph-card-editor__bullet-row::before {
	flex-shrink: 0;
	content: "";
	width: 0.35rem;
	height: 0.35rem;
	border-radius: var(--radius-full);
	background: color-mix(in srgb, var(--brand-purple) 55%, var(--brand-text-muted));
}

.mtp-ph-card-editor__bullet-input {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.2rem 0;
	font: inherit;
	font-size: 0.925rem;
	line-height: 1.55;
	color: var(--brand-text-muted);
	background: transparent;
	border: none;
	border-bottom: 1px solid color-mix(in srgb, var(--brand-border-strong) 80%, transparent);
	border-radius: 0;
}

.mtp-ph-card-editor__bullet-input:focus {
	outline: none;
	border-bottom-color: color-mix(in srgb, var(--brand-purple) 45%, transparent);
}

.mtp-ph-card-editor__bullet-input[data-rich-text-placeholder]::before {
	color: color-mix(in srgb, var(--brand-text-muted) 65%, transparent);
	opacity: 1;
}

.mtp-ph-card-editor__remove {
	flex-shrink: 0;
	padding: 0.15rem 0.35rem !important;
	min-height: 0 !important;
	font-size: 1rem !important;
	line-height: 1 !important;
	color: var(--brand-text-quiet) !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

.mtp-ph-card-editor__remove:hover {
	color: var(--brand-text) !important;
}

.mtp-ph-card-editor__add {
	align-self: flex-start;
	margin-top: 0.15rem;
	padding: 0.25rem 0.5rem !important;
	min-height: 0 !important;
	font-size: 0.75rem !important;
	font-weight: 600 !important;
	color: var(--brand-white) !important;
	background: var(--brand-purple) !important;
	border: none !important;
	border-radius: var(--radius-sm) !important;
	box-shadow: none !important;
}

.mtp-ph-card-editor__add:hover {
	background: var(--brand-purple-dark) !important;
}

/* ---------- Post feed (editor placeholder) ---------- */
.mtp-ph-post-feed-editor {
	padding: 1.25rem 1.35rem;
	background: var(--brand-surface);
	border: 1px dashed var(--brand-border-strong);
	border-radius: var(--radius-md);
}

.mtp-ph-post-feed-editor__label {
	margin: 0 0 0.35rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--brand-text-quiet);
}

.mtp-ph-post-feed-editor__detail {
	margin: 0 0 0.5rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--brand-black);
}

.mtp-ph-post-feed-editor__hint {
	margin: 0;
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--brand-text-muted);
}

.mtp-ph-post-feed__empty {
	margin: 0;
	padding: 1.25rem;
	text-align: center;
	font-size: 0.9rem;
	color: var(--brand-text-muted);
	background: var(--brand-surface);
	border: 1px solid var(--brand-border);
	border-radius: var(--radius-md);
}

/* ---------- Client callout ---------- */
.mtp-ph-callout {
	--callout-inset: clamp(1rem, 4vw, 1.75rem);
	position: relative;
	width: 100%;
	aspect-ratio: 819 / 1024;
	min-height: 280px;
	background-color: var(--brand-black);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
}

.mtp-ph-callout--no-image {
	background-image: linear-gradient(
		145deg,
		color-mix(in srgb, var(--brand-purple-dark) 80%, var(--brand-black)),
		var(--brand-black)
	);
}

a.mtp-ph-callout {
	display: block;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	transition: transform 0.2s var(--ease-out);
}

a.mtp-ph-callout:hover {
	transform: translateY(-2px);
}

a.mtp-ph-callout:hover .mtp-ph-callout__overlay {
	background: rgba(10, 10, 10, 0.58);
}

a.mtp-ph-callout:focus-visible {
	outline: 2px solid var(--brand-mint);
	outline-offset: 3px;
}

.mtp-ph-callout__overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 10, 0.48);
	pointer-events: none;
	transition: background 0.2s var(--ease-out);
}

.mtp-ph-callout__frame {
	position: absolute;
	inset: var(--callout-inset);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(1rem, 3vw, 1.75rem);
	border: 2px solid var(--brand-white);
	pointer-events: none;
}

.mtp-ph-callout__text,
.mtp-ph-callout__text p {
	margin: 0;
	font-size: clamp(1.35rem, 2.5vw + 0.75rem, 2rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-align: center;
	color: var(--brand-white);
}

.mtp-ph-callout__text p + p {
	margin-top: 0.35em;
}

/* Editor */
.mtp-ph-callout-editor .mtp-ph-callout__text {
	pointer-events: auto;
}

.mtp-ph-callout-editor .mtp-ph-callout__frame .mtp-ph-callout__text,
.mtp-ph-callout-editor .mtp-ph-callout__text.block-editor-rich-text__editable,
.mtp-ph-callout-editor .mtp-ph-callout__text .rich-text,
.mtp-ph-callout-editor .mtp-ph-callout__text [contenteditable="true"],
.editor-styles-wrapper .mtp-ph-callout-editor .mtp-ph-callout__text,
.editor-styles-wrapper .mtp-ph-callout-editor .block-editor-rich-text__editable {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	caret-color: #ffffff !important;
	font-size: clamp(1rem, 1.25vw + 0.65rem, 1.25rem) !important;
	line-height: 1.2;
}

.mtp-ph-callout-editor .mtp-ph-callout__text[data-rich-text-placeholder]::before,
.editor-styles-wrapper .mtp-ph-callout-editor .mtp-ph-callout__text[data-rich-text-placeholder]::before {
	color: rgba(255, 255, 255, 0.55) !important;
	opacity: 1;
}

.mtp-ph-callout-editor .mtp-ph-callout__text:focus {
	outline: none;
}

.mtp-ph-callout-editor__media-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.mtp-ph-callout-editor__link-badge {
	position: absolute;
	top: 0.65rem;
	right: 0.65rem;
	z-index: 2;
	padding: 0.2em 0.55em;
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--brand-black);
	background: var(--brand-mint);
	border-radius: var(--radius-sm);
	pointer-events: none;
}

.mtp-ph-callout-editor__placeholder {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 1.5rem;
	text-align: center;
}

.mtp-ph-callout-editor__placeholder p {
	margin: 0;
	font-size: 0.85rem;
	font-weight: 600;
	color: color-mix(in srgb, var(--brand-white) 75%, transparent);
}
