
$eds-c-status-message-theme: (
	"info": $t-eds-c-status-message-theme-info,
	"error": $t-eds-c-status-message-theme-error,
	"success": $t-eds-c-status-message-theme-success,
	"warning": $t-eds-c-status-message-theme-warning
);

.eds-c-status-message {
	display: flex;
	gap: $t-a-space-relative-200;
	font-family: $t-eds-c-status-message-font-family;
	font-size: $t-eds-c-status-message-font-size;
	position: relative;
	box-sizing: border-box;
	border-radius: $t-eds-c-status-message-border-radius;
	background-color: $t-eds-c-status-message-background-color;
	border: $t-eds-c-status-message-border;
	line-height: $t-eds-c-status-message-line-height;
	padding: $t-eds-c-status-message-gutter;
	padding-bottom: $t-eds-c-status-message-padding;

	*:last-child {
		margin-bottom: 0;
	}
}

.eds-c-status-message__message a {
	color: inherit;
}

.eds-c-status-message__text {
	padding-right: $t-eds-c-status-message-padding;
	margin-top: $t-eds-c-status-message-text-margin;
}

.eds-c-status-message__text h5 {
	margin-top: 0;
}


.eds-c-status-message__icon {
	@include u-icon($t-eds-c-status-message-icon-size, $t-eds-c-status-message-icon-size);
	flex: 0 0 auto;
	margin-right: $t-a-space-absolute-200;
}

.eds-c-status-message__icon--top {
	align-self: flex-start;
}

.eds-c-status-message__dismiss-button {
	position: absolute;
	border: none;
    background: none;
	right: $t-a-space-absolute-200;
	cursor: pointer;
}

.eds-c-status-message__dismiss-icon {
	@include u-icon($t-eds-c-status-message-icon-size, $t-eds-c-status-message-icon-size);
	color: $t-eds-c-status-message-close-icon-color;
}

.eds-c-status-message__title {
	font-weight: $t-eds-c-status-message-font-weight;
	margin-bottom: $t-a-space-absolute-200;
}

@each $status, $color in $eds-c-status-message-theme {
	.eds-c-status-message--#{$status} {
		.eds-c-status-message__icon {
			color: $color;
		}
	}

	.eds-c-status-message--#{$status} {
		border-bottom: $t-eds-c-status-message-boxed-border solid $color;
	}
}
