/**
 * Building-block callouts & layout inserted via TinyMCE (announcements, blog, etc.).
 * Class-based only — inline styles are stripped by TinyMCE/kses in many cases.
 *
 * @package Campus
 */

/* ── Ask HR CTA (default rich-editor block) ───────────────────────────── */

.cp-bb-ask-hr {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cp-bb-ask-hr__wrap {
	margin: 16px 0;
	text-align: center;
}

.cp-bb-ask-hr__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 12px 28px;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	letter-spacing: 0.02em;
	color: #fff;
	background: linear-gradient(145deg, #3b82f6 0%, #2563eb 40%, #1d4ed8 100%);
	box-shadow:
		0 4px 14px rgba(37, 99, 235, 0.4),
		0 1px 2px rgba(15, 23, 42, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-sizing: border-box;
	transition: box-shadow 0.15s ease, filter 0.15s ease, transform 0.15s ease;
}

@media (hover: hover) {
	.cp-bb-ask-hr__btn:hover,
	.cp-bb-ask-hr__btn:focus {
		color: #fff;
		text-decoration: none;
		filter: brightness(1.04);
		box-shadow:
			0 8px 24px rgba(37, 99, 235, 0.45),
			0 2px 4px rgba(15, 23, 42, 0.1),
			inset 0 1px 0 rgba(255, 255, 255, 0.2);
		transform: translateY(-1px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cp-bb-ask-hr__btn {
		transition: none;
	}

	.cp-bb-ask-hr__btn:hover,
	.cp-bb-ask-hr__btn:focus {
		transform: none;
	}
}

/* Block library card — thumbnail preview (span, not a link) */
.cp-bb-ask-hr--preview .cp-bb-ask-hr__wrap {
	margin: 0;
}

.cp-bb-ask-hr--preview .cp-bb-ask-hr__btn {
	cursor: default;
	pointer-events: none;
	min-height: 0;
	padding: 7px 12px;
	font-size: 11px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* Legacy markup: campus-btn inside Ask HR block (before cp-bb-ask-hr__btn) */
.cp-rich-block[data-cp-rich="ask-hr"] .campus-btn.campus-btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 12px 28px;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	color: #fff;
	background: linear-gradient(145deg, #3b82f6 0%, #2563eb 40%, #1d4ed8 100%);
	box-shadow:
		0 4px 14px rgba(37, 99, 235, 0.4),
		0 1px 2px rgba(15, 23, 42, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (hover: hover) {
	.cp-rich-block[data-cp-rich="ask-hr"] .campus-btn.campus-btn-primary:hover,
	.cp-rich-block[data-cp-rich="ask-hr"] .campus-btn.campus-btn-primary:focus {
		color: #fff;
		text-decoration: none;
		filter: brightness(1.04);
		transform: translateY(-1px);
	}
}

/* ── Intranet Hub link (secondary CTA vs Ask HR primary) ───────────────── */

.cp-bb-hub-link {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cp-bb-hub-link__wrap {
	margin: 16px 0;
	text-align: center;
}

.cp-bb-hub-link__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 44px;
	padding: 10px 22px;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	color: #1d4ed8;
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	border: 1px solid #bfdbfe;
	box-shadow:
		0 2px 8px rgba(37, 99, 235, 0.12),
		inset 0 1px 0 rgba(255, 255, 255, 0.95);
	box-sizing: border-box;
	transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.cp-bb-hub-link__icon {
	font-size: 18px;
	line-height: 1;
}

.cp-bb-hub-link__label {
	flex: 0 1 auto;
}

.cp-bb-hub-link__arrow {
	font-size: 14px;
	line-height: 1;
	opacity: 0.88;
}

@media (hover: hover) {
	.cp-bb-hub-link__btn:hover,
	.cp-bb-hub-link__btn:focus {
		color: #1e40af;
		text-decoration: none;
		border-color: #93c5fd;
		box-shadow: 0 4px 16px rgba(37, 99, 235, 0.22);
		transform: translateY(-1px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cp-bb-hub-link__btn {
		transition: none;
	}

	.cp-bb-hub-link__btn:hover,
	.cp-bb-hub-link__btn:focus {
		transform: none;
	}
}

.cp-bb-hub-link--preview .cp-bb-hub-link__wrap {
	margin: 0;
}

.cp-bb-hub-link--preview .cp-bb-hub-link__btn {
	cursor: default;
	pointer-events: none;
	min-height: 0;
	padding: 6px 10px;
	font-size: 11px;
	gap: 5px;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(37, 99, 235, 0.15);
}

.cp-bb-hub-link--preview .cp-bb-hub-link__icon {
	font-size: 12px;
}

.cp-bb-hub-link--preview .cp-bb-hub-link__arrow {
	font-size: 10px;
}

/* ── Callouts (Success / Info / Warning / Error / Tip) ─────────────────── */

.cp-bb-callout {
	margin: 16px 0;
	padding: 14px 18px;
	border-radius: 0 12px 12px 0;
	border-left-width: 4px;
	border-left-style: solid;
}

.cp-bb-callout__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
}

.cp-bb-callout--success {
	background: linear-gradient(to right, #ecfdf5, #f0fdf4);
	border-left-color: #10b981;
}

.cp-bb-callout--success .cp-bb-callout__text {
	color: #065f46;
}

.cp-bb-callout--info {
	background: linear-gradient(to right, #eff6ff, #dbeafe);
	border-left-color: #3b82f6;
}

.cp-bb-callout--info .cp-bb-callout__text {
	color: #1e3a8a;
}

.cp-bb-callout--warning {
	background: linear-gradient(to right, #fffbeb, #fef3c7);
	border-left-color: #f59e0b;
}

.cp-bb-callout--warning .cp-bb-callout__text {
	color: #92400e;
}

.cp-bb-callout--error {
	background: linear-gradient(to right, #fef2f2, #fee2e2);
	border-left-color: #ef4444;
}

.cp-bb-callout--error .cp-bb-callout__text {
	color: #991b1b;
}

.cp-bb-callout--tip {
	background: linear-gradient(to right, #faf5ff, #f3e8ff);
	border-left-color: #a855f7;
}

.cp-bb-callout__eyebrow {
	margin: 0 0 4px;
	font-size: 12px;
	font-weight: 800;
	color: #7c3aed;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cp-bb-callout--tip .cp-bb-callout__text {
	margin: 0;
	color: #6b21a8;
}

/* ── Status timeline (3 steps) ─────────────────────────────────────────── */

.cp-bb-status-timeline {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px 0;
	margin: 24px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cp-bb-status-timeline__step {
	text-align: center;
	flex: 0 0 auto;
	min-width: 72px;
}

.cp-bb-status-timeline__dot {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	margin: 0 auto 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 14px;
	line-height: 1;
	font-family: inherit;
}

.cp-bb-status-timeline__dot--check {
	background: linear-gradient(135deg, #10b981, #059669);
	color: #fff;
	font-size: 16px;
}

.cp-bb-status-timeline__dot--number {
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	color: #fff;
}

.cp-bb-status-timeline__step--pending .cp-bb-status-timeline__dot--number {
	background: #e2e8f0;
	color: #94a3b8;
}

.cp-bb-status-timeline__label {
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
}

.cp-bb-status-timeline__step--done .cp-bb-status-timeline__label {
	color: #059669;
}

.cp-bb-status-timeline__step--active .cp-bb-status-timeline__label {
	color: #d97706;
}

.cp-bb-status-timeline__step--pending .cp-bb-status-timeline__label {
	color: #94a3b8;
}

.cp-bb-status-timeline__connector {
	height: 3px;
	width: 48px;
	min-width: 24px;
	border-radius: 2px;
	align-self: center;
	margin: 0 2px;
	margin-top: 18px;
	flex-shrink: 1;
}

.cp-bb-status-timeline__connector--to-active {
	background: linear-gradient(to right, #10b981, #fbbf24);
}

.cp-bb-status-timeline__connector--inactive {
	background: #e2e8f0;
}

/* ── Gradient divider (horizontal rule) ───────────────────────────────── */

.cp-bb-divider {
	display: block;
	width: 100%;
	height: 4px;
	margin: 24px 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	box-sizing: border-box;
	font-size: 0;
	line-height: 0;
	overflow: hidden;
}

.cp-bb-divider--gradient {
	background: linear-gradient(to right, #3b82f6, #8b5cf6, #ec4899);
}

/* Tighter spacing in block-library card previews */
.cp-bb-divider--sm {
	height: 3px;
	margin: 8px 0;
	border-radius: 2px;
}

/* ── Two-column layout ─────────────────────────────────────────────────── */

.cp-bb-two-col {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 20px 0;
	align-items: stretch;
	box-sizing: border-box;
}

.cp-bb-two-col__col {
	flex: 1 1 200px;
	min-width: 200px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px;
	box-sizing: border-box;
}

.cp-bb-two-col__text {
	margin: 0;
	color: #334155;
	font-size: 14px;
	line-height: 1.6;
	font-family: inherit;
}

/* Block picker card preview (compact) */
.cp-bb-two-col--preview {
	gap: 4px;
	margin: 0;
	font-size: 9px;
}

.cp-bb-two-col--preview .cp-bb-two-col__col {
	min-width: 0;
	flex: 1 1 0;
	padding: 4px 6px;
	border-radius: 4px;
	background: #f1f5f9;
	border: none;
}

.cp-bb-two-col--preview .cp-bb-two-col__text {
	font-size: 9px;
	color: #64748b;
	line-height: 1.3;
}

/* ── Stat card (metric + label) ─────────────────────────────────────────── */

.cp-bb-stat-card {
	display: inline-block;
	max-width: 100%;
	vertical-align: middle;
	text-align: center;
	margin: 16px 0;
	padding: 20px 32px;
	border-radius: 14px;
	box-sizing: border-box;
	background: linear-gradient(135deg, #6366f1, #4f46e5);
	box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cp-bb-stat-card__value {
	margin: 0;
	font-size: 36px;
	font-weight: 900;
	line-height: 1.1;
	color: #fff;
}

.cp-bb-stat-card__label {
	margin: 4px 0 0;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.7);
	line-height: 1.3;
}

.cp-bb-stat-card--preview {
	margin: 0;
	padding: 8px 10px;
	border-radius: 8px;
	box-shadow: none;
}

.cp-bb-stat-card--preview .cp-bb-stat-card__value {
	font-size: 16px;
}

.cp-bb-stat-card--preview .cp-bb-stat-card__label {
	margin: 2px 0 0;
	font-size: 8px;
}

/* ── User greeting card (avatar + name + email template tags) ─────────────── */

.cp-bb-greeting-card {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 16px 0;
	padding: 18px 22px;
	border-radius: 14px;
	box-sizing: border-box;
	background: linear-gradient(135deg, #f8fafc, #f1f5f9);
	border: 1px solid #e2e8f0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cp-bb-greeting-card__avatar {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #3b82f6, #1d4ed8);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
	font-size: 20px;
	font-weight: 800;
	line-height: 1;
	color: #fff;
}

.cp-bb-greeting-card__body {
	min-width: 0;
	flex: 1;
}

.cp-bb-greeting-card__title {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
	color: #1e293b;
	line-height: 1.25;
}

.cp-bb-greeting-card__meta {
	margin: 3px 0 0;
	font-size: 13px;
	color: #64748b;
	line-height: 1.4;
}

.cp-bb-greeting-card--preview {
	gap: 6px;
	margin: 0;
	padding: 6px 8px;
	border-radius: 8px;
	border: none;
	box-shadow: none;
}

.cp-bb-greeting-card--preview .cp-bb-greeting-card__avatar {
	width: 22px;
	height: 22px;
	font-size: 9px;
	font-weight: 700;
	box-shadow: none;
}

.cp-bb-greeting-card--preview .cp-bb-greeting-card__title {
	font-size: 10px;
	font-weight: 700;
}

.cp-bb-greeting-card--preview .cp-bb-greeting-card__meta {
	margin: 0;
	font-size: 8px;
	color: #94a3b8;
}

/* ── Next steps checklist (heading + numbered rows) ───────────────────── */

.cp-bb-next-steps {
	margin: 20px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cp-bb-next-steps__heading {
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 800;
	color: #1e293b;
	line-height: 1.3;
}

.cp-bb-next-steps__row {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 0;
}

.cp-bb-next-steps__row:not(:last-child) {
	border-bottom: 1px solid #f1f5f9;
}

.cp-bb-next-steps__badge {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #3b82f6, #1d4ed8);
	color: #fff;
	font-weight: 800;
	font-size: 14px;
	line-height: 1;
}

.cp-bb-next-steps__text {
	margin: 0;
	padding-top: 5px;
	color: #334155;
	font-size: 14px;
	line-height: 1.6;
	flex: 1;
	min-width: 0;
}

.cp-bb-next-steps--preview {
	margin: 0;
	font-size: 9px;
}

.cp-bb-next-steps--preview .cp-bb-next-steps__row {
	align-items: center;
	padding: 0;
	gap: 4px;
	margin-bottom: 2px;
	border-bottom: none;
}

.cp-bb-next-steps--preview .cp-bb-next-steps__row:not(:last-child) {
	border-bottom: none;
}

.cp-bb-next-steps--preview .cp-bb-next-steps__badge {
	width: 14px;
	height: 14px;
	font-size: 7px;
	font-weight: 700;
}

.cp-bb-next-steps--preview .cp-bb-next-steps__text {
	padding-top: 0;
	font-size: 9px;
	line-height: 1.2;
}

/* ── React hub widget placeholder (TinyMCE cannot run React — live UI on intranet only) ─ */

.cp-mce-react-embed {
	display: block;
	margin: 12px 0;
	padding: 14px 16px 12px;
	min-height: 76px;
	box-sizing: border-box;
	border: 2px dashed #94a3b8;
	border-radius: 12px;
	background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cp-mce-react-embed__lead {
	display: block;
	font-size: 11px;
	font-weight: 700;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	margin-bottom: 4px;
}

.cp-mce-react-embed__name {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
	line-height: 1.35;
	margin-bottom: 8px;
}

.cp-mce-react-embed__hint {
	display: block;
	font-size: 11px;
	font-weight: 500;
	color: #64748b;
	line-height: 1.45;
	max-width: 36rem;
}

.cp-mce-react-embed__ph {
	display: none;
}
