/**
 * Activity Feed — block styles.
 *
 * @package AmbassadorHub\Fundraisers\Blocks\ActivityFeed
 */
 
 /* TODO: move to generix ambh css file. */
  .ambh_fundraiser, .ambh_campaign {
    padding: 0 1.5rem;

 }

 .ambh-breadcrumb {
    padding-left: 0 !important;

}

/* ── Editor canvas preview ─────────────────────────────────────────────── */

.ambh-activity-feed.ambh-block-preview {
	padding: 2rem;
	background: #f0f0f1;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-align: center;
}

/* ── Feed wrapper ───────────────────────────────────────────────────────── */

.ambh-activity-feed {
	container-type: inline-size;
}

/* ── List ───────────────────────────────────────────────────────────────── */

.ambh-af-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 0;
	position: relative;
}

/* Left timeline line */
.ambh-af-list::before {
	content: '';
	position: absolute;
	left: 1rem;
	top: 0.5rem;
	bottom: 0.5rem;
	width: 2px;
	background: var(--ambh-border-color, #e0e0e0);
}

/* ── Item ───────────────────────────────────────────────────────────────── */

.ambh-af-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.875rem 0;
	position: relative;
}

.ambh-af-item__icon {
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 1;
}

.ambh-af-item__icon svg {
	width: 1rem;
	height: 1rem;
}

/* Donation item */
.ambh-af-item--donation .ambh-af-item__icon {
	background: #fff;
	border: 2px solid var(--ambh-border-color, #e0e0e0);
	color: #cc1818;
}

/* Milestone — "fundraiser started" */
.ambh-af-item--milestone-start .ambh-af-item__icon {
	background: var(--ambh-color-primary, #2271b1);
	border: 2px solid var(--ambh-color-primary, #2271b1);
	color: #fff;
}

/* Milestone — "first donation" */
.ambh-af-item--milestone-first .ambh-af-item__icon {
	background: #f0a500;
	border: 2px solid #f0a500;
	color: #fff;
}

/* Milestone — percentage (25/50/75/100) */
.ambh-af-item--milestone-pct .ambh-af-item__icon {
	background: var(--ambh-color-secondary, #00a32a);
	border: 2px solid var(--ambh-color-secondary, #00a32a);
	color: #fff;
}

/* ── Item content ───────────────────────────────────────────────────────── */

.ambh-af-item__content {
	flex: 1;
	min-width: 0;
	padding-top: 0.3rem;
}

.ambh-af-item__headline {
	margin: 0 0 0.2rem !important;
	font-size: var(--ambh-font-base, 1rem);
	line-height: 1.4;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.4rem;
}

/* ── Donation fields ────────────────────────────────────────────────────── */

.ambh-af-donor {
	font-weight: 600;
}

.ambh-af-amount {
	color: var(--ambh-text-color, #1e1e1e);
	font-weight: 600;
}

.ambh-af-via {
	font-size: var(--ambh-font-xs, 0.75rem);
	color: var(--ambh-text-muted, #646970);
}

.ambh-af-message {
	margin: 0 !important;
	font-size: var(--ambh-font-sm, 0.875rem);
	color: inherit;
	font-style: italic;
}

.ambh-af-date {
	display: block;
	font-size: var(--ambh-font-xs, 0.75rem);
	color: var(--ambh-text-muted, #646970);
	margin-top: 0.15rem;
}

/* ── Milestone fields ───────────────────────────────────────────────────── */

.ambh-af-milestone-label {
	font-weight: 600;
}

.ambh-af-item--milestone-start  .ambh-af-milestone-label { color: var(--ambh-color-primary, #2271b1); }
.ambh-af-item--milestone-first  .ambh-af-milestone-label { color: #f0a500; }
.ambh-af-item--milestone-pct    .ambh-af-milestone-label { color: var(--ambh-color-secondary, #00a32a); }

/* ── Collapse toggle ────────────────────────────────────────────────────── */

/* The collapse row itself takes no extra vertical space */
.ambh-af-item--collapse {
	display: block;
	padding: 0;
}

.ambh-af-collapse {
	width: 100%;
}

/* Summary row — inline toggle button, sits on the timeline */
.ambh-af-collapse__toggle {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 0 0.5rem 2.75rem; /* aligns content column (icon width + gap) */
	cursor: pointer;
	font-size: var(--ambh-font-xs, 0.75rem);
	color: var(--ambh-text-muted, #646970);
	list-style: none;
	user-select: none;
}

.ambh-af-collapse__toggle::-webkit-details-marker {
	display: none;
}

.ambh-af-collapse__toggle:hover {
	color: var(--ambh-color-primary, #2271b1);
}

.ambh-af-collapse__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease;
}

.ambh-af-collapse__icon svg {
	width: 1rem;
	height: 1rem;
}

/* Rotate chevron when open */
details[open] > .ambh-af-collapse__toggle .ambh-af-collapse__icon {
	transform: rotate(180deg);
}

/* When open, change label is handled by CSS content trick via attr if needed;
   for now the same text is fine — "show" becomes obvious from the open state. */

/* Inner list — no extra indent, items look like regular feed items */
.ambh-af-collapse__list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

