/* ---- Link Card: front-end ---- */

/* Fills the grid cell so the card can stretch to row height */
.dku-link-card-wrap {
	height: 100%;
}

.dku-link-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
	border: 1px solid var(--wp--preset--color--contrast-3, #e5e7eb);
	border-radius: 12px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dku-link-card__image {
	padding: 10px;
	flex-shrink: 0;
}

.dku-link-card__image img {
	display: block;
	object-fit: contain;
	object-position: center;
	border-radius: 6px;
}

/* Body grows to fill all remaining card height */
.dku-link-card__body {
	padding: 1rem 1.25rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	flex: 1;
}

.dku-link-card__site {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--primary, #1f295d);
	opacity: 0.75;
}

.dku-link-card__title {
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.35;
	margin: 0.2rem 0 0;
}

.dku-link-card__desc {
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--wp--preset--color--contrast-2, #555);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Pushed to the bottom of the body regardless of how much text is above */
.dku-link-card__url {
	font-size: 0.75rem;
	color: var(--wp--preset--color--contrast-2, #888);
	margin-top: auto;
	padding-top: 0.5rem;
}

/* ---- Editor: empty / placeholder state ---- */

.dku-link-card-placeholder {
	border: 2px dashed #b5bcc2;
	border-radius: 8px;
	padding: 1.5rem;
	text-align: center;
	background: #f6f7f8;
}

.dku-link-card-placeholder__label {
	font-weight: 600;
	color: #555;
	margin-bottom: 0.75rem;
}

.dku-link-card-placeholder__row {
	display: flex;
	gap: 8px;
	justify-content: center;
	align-items: flex-end;
	max-width: 480px;
	margin: 0 auto;
}

.dku-link-card-placeholder__row .components-base-control {
	flex: 1;
	margin: 0;
}

.dku-link-card-placeholder__overrides {
	margin-top: 12px;
	text-align: left;
	max-width: 480px;
	margin-inline: auto;
}

.dku-link-card-placeholder__error {
	color: #cc1818;
	font-size: 13px;
	margin-top: 8px;
}
