.fdg-link-hub {
	--fdg-lh-accent: #E0218A;
}

.fdg-link-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	background: #fafafa;
	/* Picks up the FDG Theme's own "Accent Color" setting automatically
	   (it's set as a CSS variable on :root there) — falls back to a
	   plain light pink if used on a site without that variable. */
	border: 1px solid var(--fdg-accent, #FFC1CC);
	border-radius: 14px;
	overflow: hidden;
	/* Grows/shrinks naturally as rows are added or removed — no fixed
	   height, the container just wraps whatever's inside it. */
}

.fdg-link-item {
	position: relative;
	border-bottom: 1px solid #ececec;
}

.fdg-link-item:last-child {
	border-bottom: none;
}

.fdg-link-anchor {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 14px;
	background: transparent;
	color: #222;
	text-decoration: none;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: .01em;
	transition: background .15s ease, color .15s ease;
}

.fdg-link-anchor:hover {
	background: var(--fdg-lh-accent);
	color: #fff;
	text-decoration: none;
}

.fdg-link-anchor:active {
	background: color-mix(in srgb, var(--fdg-lh-accent) 85%, black);
}

.fdg-link-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.05);
	transition: background .15s ease;
}

.fdg-link-anchor:hover .fdg-link-icon {
	background: rgba(255, 255, 255, 0.22);
}

.fdg-link-icon svg {
	display: block;
	width: 14px;
	height: 14px;
}

.fdg-link-label {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Edit/delete controls — only shown to a logged-in user who can
   edit_theme_options (data-can-edit="1" on the wrapper); everyone
   else never sees these at all. */
.fdg-link-hub[data-can-edit="0"] .fdg-link-edit-controls {
	display: none;
}

.fdg-link-edit-controls {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	display: none;
	gap: 4px;
}

.fdg-link-hub[data-can-edit="1"] .fdg-link-item:hover .fdg-link-edit-controls {
	display: flex;
}

.fdg-link-edit-btn,
.fdg-link-delete-btn {
	border: none;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.fdg-link-edit-btn:hover,
.fdg-link-delete-btn:hover {
	background: var(--fdg-lh-accent);
}

.fdg-link-empty {
	font-size: 13px;
	color: #888;
	margin: 6px 0 10px;
}

.fdg-link-add-toggle {
	margin-top: 10px;
	border: 1px dashed #ccc;
	background: transparent;
	color: #555;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
}

.fdg-link-add-toggle:hover {
	border-color: var(--fdg-lh-accent);
	color: var(--fdg-lh-accent);
}

.fdg-link-form {
	margin-top: 12px;
	padding: 12px;
	background: #f9f9f9;
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fdg-link-form-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	color: #555;
}

.fdg-link-form-field input,
.fdg-link-form-field select {
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
}

.fdg-link-form-error {
	color: #c0392b;
	font-size: 12px;
	margin: 0;
}

.fdg-link-form-actions {
	display: flex;
	gap: 8px;
}

.fdg-link-form-save,
.fdg-link-form-cancel {
	flex: 1 1 auto;
	padding: 8px 12px;
	border-radius: 6px;
	border: none;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
}

.fdg-link-form-save {
	background: var(--fdg-lh-accent);
	color: #fff;
}

.fdg-link-form-cancel {
	background: #e5e5e5;
	color: #333;
}
