.afpm-list {
	--afpm-border: rgba(60, 60, 60, 0.12);
	--afpm-text: #1e1e1e;
	--afpm-muted: #787066;
	--afpm-accent: #10837d;
	--afpm-accent-contrast: #ffffff;
	--afpm-gold: #c7a64a;
	--afpm-row-height: 43px;
	position: relative;
	font-family: inherit;
}

.afpm-list__items {
	display: block;
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--afpm-border);
}

.afpm-item,
.afpm-empty-state {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 10px;
	min-height: var(--afpm-row-height);
	padding: 2px 0;
	border-bottom: 1px solid var(--afpm-border);
	background: transparent;
}

.afpm-item__main {
	min-width: 0;
}

.afpm-item__title {
	display: block;
	color: var(--afpm-text);
	font-size: 13px;
	line-height: 1;
	white-space: nowrap;
}

.afpm-item__actions {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	justify-content: flex-end;
	flex-shrink: 0;
}

.afpm-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 31px;
	min-width: 64px;
	padding: 0 14px;
	border: 1px solid var(--afpm-border);
	border-radius: 999px;
	background: #fff;
	color: var(--afpm-gold);
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
}

.afpm-button--primary {
	border-color: var(--afpm-accent);
	background: var(--afpm-accent);
	color: var(--afpm-accent-contrast);
}

.afpm-button--ghost {
	min-width: 88px;
	background: #fbfaf6;
	color: var(--afpm-accent);
}

.afpm-empty-state {
	justify-content: center;
	grid-template-columns: 1fr;
}

.afpm-empty-state__label {
	color: var(--afpm-muted);
	font-size: 15px;
}

.afpm-list__footer {
	display: flex;
	justify-content: center;
	margin-top: 10px;
}

.afpm-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 34px;
	padding: 0 18px;
	border: 1px solid rgba(199, 166, 74, 0.52);
	border-radius: 999px;
	background: #fff;
	color: var(--afpm-gold);
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.afpm-description-source {
	display: none;
}

.afpm-item[hidden],
.afpm-load-more[hidden],
.afpm-modal[hidden] {
	display: none !important;
}

.afpm-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483646;
	display: grid;
	place-items: center;
	padding: 24px;
	isolation: isolate;
}

.afpm-modal__overlay {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(17, 32, 49, 0.58);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.afpm-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(640px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	overflow: auto;
	overscroll-behavior: contain;
	margin: 0;
	padding: 24px;
	border: 1px solid var(--afpm-border);
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.98);
	box-shadow: 0 30px 72px rgba(17, 32, 49, 0.2);
}

.afpm-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--afpm-border);
	border-radius: 999px;
	background: #fff;
	color: var(--afpm-text);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.afpm-modal__title {
	margin: 0 40px 16px 0;
	color: var(--afpm-text);
	font-size: 20px;
}

.afpm-modal__body {
	color: var(--afpm-muted);
	font-size: 15px;
	line-height: 1.7;
}

.afpm-modal__body p {
	margin: 0 0 12px;
}

.afpm-modal__body p:last-child {
	margin-bottom: 0;
}

.afpm-lock-scroll {
	overflow: hidden;
	overscroll-behavior: none;
}

@media (max-width: 820px) {
	.afpm-item,
	.afpm-empty-state {
		grid-template-columns: 1fr;
		align-items: stretch;
		padding: 10px 0;
	}

	.afpm-item__actions {
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	.afpm-item__title {
		white-space: normal;
		font-size: 15px;
	}
}

@media (max-width: 640px) {
	.afpm-item__actions {
		display: grid;
		grid-template-columns: 1fr;
	}

	.afpm-button {
		width: 100%;
		min-width: 0;
	}

	.afpm-modal__dialog {
		padding: 18px;
		border-radius: 20px;
	}

	.afpm-modal {
		padding: 16px;
	}
}
