.eds-c-card {
	position: relative;
	text-decoration: none;
	display: flex;
	color: $t-a-palette-default-greyscale-800;

	&.eds-c-card--stretch-height {
		height: 100%;
	}

	&:focus {
		border-radius: $t-eds-c-card-border-radius;
	}
 }

 .eds-c-card__container {
	font-size: $t-eds-c-card-font-size;
	min-width: 0;
	position: relative;
	overflow: hidden;
	font-family: $t-eds-c-card-highlight-font-family;
	display: flex;
	justify-content: space-between;
	flex-direction: column-reverse;
	flex: 1;

	img {
		width: 100%;
		height: inherit;
		object-fit: cover;
		@supports (aspect-ratio: 1 / 1) {
			padding-bottom: 0;
			// Customizable aspect ratio: custom value , fallback
			aspect-ratio: var(--eds-c-card--image-aspect-ratio, #{$t-eds-c-card-image-aspect-ratio});
		}
	}

	&.eds-c-card__container--image,
	&.eds-c-card__container--no-image {
		background-color: $t-eds-c-card-highlight-background-color;
		border-radius: $t-eds-c-card-border-radius;

		&:hover {
			background-color: $t-eds-c-card-background-color-hover;
		}
	}

	&.eds-c-card__container--icon {
		border-radius: $t-eds-c-card-border-radius;

		.eds-c-card__inner {
			display: flex;
			align-items: center;
			flex-direction: row;
			flex: 1 0 100%;
			gap: $t-a-space-absolute-400;
			border: 1px solid $t-a-palette-default-blue-light;
			border-radius: $t-eds-c-card-border-radius;
		}

		.eds-c-card__icon-container {
			flex-shrink: 0;
			display: flex;
			justify-content: center;
			align-items: center;
			width: $t-eds-c-card-icon-container-space;
			height: $t-eds-c-card-icon-container-space;
			border-radius: 50%;
			background-color: $t-eds-c-card-highlight-background-color;
			padding: $t-a-space-absolute-400;
			margin-right: $t-a-space-absolute-400;
			color: $t-eds-c-card-highlight-border-color;
		}

		&:hover {
			background-color: $t-eds-c-card-background-color-hover;
			.eds-c-card__icon-container {
				background-color: $t-a-palette-default-white;
			}
		}
	}

	&.eds-c-card__container--metadata {
		flex-direction: column;
		border-radius: $t-eds-c-card-border-radius;

		.eds-c-card__inner {
			background-color: $t-eds-c-card-highlight-background-color;
			&--white-bg {
				border-radius: $t-eds-c-card-border-radius;
				background-color: $t-a-palette-default-white;
				border: 1px solid $t-a-palette-default-blue-light;
			}
		}

		&:hover {
			.eds-c-card__inner {
				background-color: $t-eds-c-card-background-color-hover;
			}
			.eds-c-card__metadata {
				&::before {
					border-top: 1px solid $t-a-palette-default-white;
				}
			}
		}
	}

	&.eds-c-card__container--highlight {
		border-top: $t-eds-c-card-highlight-border-width-style $t-eds-c-card-highlight-border-color;
		.eds-c-card__inner {
			&--white-bg {
				border-radius: unset;
				border-bottom-left-radius: $t-eds-c-card-border-radius;
				border-bottom-right-radius: $t-eds-c-card-border-radius;
				border-left: 1px solid $t-a-palette-default-blue-light;
				border-right: 1px solid $t-a-palette-default-blue-light;
				border-bottom: 1px solid $t-a-palette-default-blue-light;
			}
		}
	}
}

.eds-c-card__body {
	display: flex;
	flex: 1 1 auto;
	word-break: break-word;
	font-size: $t-eds-c-card-font-size;
	padding: $t-a-space-absolute-400;
}

.eds-c-card__content {
	font-weight: $t-eds-c-card-title-font-weight;
}

.eds-c-card__label {
	margin-bottom: $t-a-space-relative-200;
	font-weight: $t-a-typography-font-weight-bold;
}

.eds-c-card__title {
	@include u-heading(h3);
	margin-top: $t-a-space-absolute-0;
	margin-bottom: $t-a-space-absolute-200;
	max-width: $t-eds-c-card-content-max-width;
}

.eds-c-card__title {
	& > a {
		text-decoration: none;
		color: $t-a-palette-default-greyscale-800;
		@include u-link-faux-block;
	}
	& > a:visited {
		color: $t-a-palette-default-greyscale-800;
	}
}

.eds-c-card__title--small {
	@include u-heading(h4);
}

[lang="de"] .eds-c-card__title {
	-webkit-hyphens: auto;
	hyphens: auto;
}

.eds-c-card__summary {
	line-height: $t-eds-c-card-line-height;
	max-width: $t-eds-c-card-content-max-width;

	&.eds-c-card__summary--truncate-text {
		display: -webkit-box;
		-webkit-line-clamp: 3;
		line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
}

.eds-c-card__image {
	flex: 0 0 auto;
	width: 100%;
    display: inline-block;
    overflow: hidden;
    margin: 0;
}

.eds-c-card__icon {
	fill: $t-eds-c-card-icon-background-color;
    width: $t-eds-c-card-icon-space;
    height: $t-eds-c-card-icon-space;
}

.eds-c-card__metadata {
	padding: 0 $t-a-space-absolute-400 $t-a-space-absolute-400 $t-a-space-absolute-400;
	&::before {
		content: "";
		display: block;
		border-top: 1px solid $t-a-palette-default-blue-light;
	}

	.eds-c-card__metadata-list {
		@include u-list-reset;
		padding-top: $t-a-space-absolute-400;
	}

	.eds-c-card__metadata-list-description {
		font-weight: $t-a-typography-font-weight-bold;
	}

	.eds-c-card__metadata-list-description:not(:last-child) {
		margin-bottom: $t-a-space-absolute-400;
	}
}
