@use "~admin-stylesheets/colors";

.nelio-content-calendar-post {
	$author-size: 18px;
	--bg-color: #{colors.$calendar-item--hover-background};
	--main-color: #{colors.$post-colors__border};

	background: colors.$calendar-item--hover-background;
	border-radius: 3px;
	border: 1px solid colors.$layout-colors__border--is-subtle;
	min-height: $author-size;
	overflow: hidden;
	padding: 0;
	margin-bottom: 1em;

	&__info-wrapper {
		background: var(--bg-color, #{colors.$calendar-item--hover-background});
		border-left: 3px solid var(--main-color, #{colors.$post-colors__border});
		padding: 0.4em;
	}

	&__sticky {
		font-weight: 600;
		color: #50575e;
	}

	&__author-icon {
		font-size: $author-size;
		float: right;
		margin-left: 0.2em;
	}

	&__status-icon {
		display: inline-block;
		line-height: 1;
		font-weight: 400;
		font-style: normal;
		text-decoration: inherit;
		text-transform: none;
		text-rendering: auto;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		width: 20px;
		height: 20px;
		font-size: 20px;
		vertical-align: bottom;
		text-align: center;
		transition: color 0.1s ease-in;

		svg {
			width: 1em;
			height: 1em;
		}
	}

	&__details {
		font-size: 11px;
		opacity: 0.7;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;

		svg {
			width: 1.3em;
			vertical-align: bottom;
		}

		.dashicons {
			font-size: 1em;
			width: 1em;
			transform: translateY(2px);
		}
	}

	&__extra-details {
		font-size: 10.5px;
		line-height: 1.15;
		margin-top: 4px;
		opacity: 0.75;
		overflow: hidden;
		padding-right: #{$author-size + 4px};
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	&__related-items-title {
		cursor: pointer;
		padding: 5px;
		hyphens: auto;
		overflow-wrap: break-word;

		.dashicons {
			margin-left: -6px;
		}

		strong {
			color: colors.$component-colors__text-dark-grey;
		}
	}

	&__related-items-secondary-title {
		color: colors.$component-colors__text-dark-grey;
		font-size: 0.9em;
		margin-left: 0;
	}

	&.nelio-content-calendar-item--is-blurred #{&}__related-items,
	&.nelio-content-calendar-item--is-locked #{&}__related-items {

		.nelio-content-calendar-item--is-blurred,
		.nelio-content-calendar-item--is-locked {
			opacity: 1;
		}
	}
}

:not(.nelio-content-calendar-post) + .nelio-content-calendar-post {
	margin-top: 1em;
}
