/**
 * Frontend styles for the Content Journey box block shell and inner content.
 *
 * @package WordPress_Content_Journey
 */

.wcj-box {
	display: flex;
	flex-direction: column;
	position: relative;
	min-height: 320px;
	overflow: auto;
}

.wcj-box--overflow-auto {
	overflow: auto;
}

.wcj-box--overflow-visible {
	overflow: visible;
}

.wcj-box--overflow-hidden {
	overflow: hidden;
}

.wcj-box--overflow-scroll {
	overflow: scroll;
}

.wcj-box--overflow-clip {
	overflow: clip;
}

.wcj-box__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 4rem;
}

.wcj-box__loading[hidden] {
	display: none !important;
}

.wcj-box--empty .wcj-box__loading {
	display: none !important;
}

.wcj-box__spinner {
	display: inline-block;
	width: 1.5rem;
	height: 1.5rem;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: wcj-spin 0.8s linear infinite;
}

@keyframes wcj-spin {
	to {
		transform: rotate(360deg);
	}
}

.wcj-box__content {
	/* Let pattern content define height; avoid flex clipping below the image. */
}

.wcj-box__content-inner {
	overflow: visible;
}

.wcj-box__content-inner .wp-block-post-title {
	margin-top: 0;
	margin-bottom: 0.5rem;
}

.wcj-box__content-inner .wp-block-post-excerpt {
	margin-top: 0.5rem;
	margin-bottom: 0;
}

.wcj-box__content-inner .wp-block-post-featured-image {
	margin-bottom: 0.5rem;
}

.wcj-box__content-inner .wp-block-post-featured-image img {
	max-width: 100%;
	height: auto;
	display: block;
}

.wcj-box__read-more {
	margin-top: 0.75rem;
	align-self: flex-start;
}

.wcj-box__read-more--link {
	display: inline-block;
	font-weight: 600;
	text-decoration: underline;
	color: inherit;
}

.wcj-box__read-more--link:hover,
.wcj-box__read-more--link:focus {
	text-decoration: underline;
	opacity: 0.85;
}

.wcj-box--empty {
	min-height: 0;
}

.wcj-box--editor .wcj-box__read-more a,
.wcj-box--editor a.wcj-box__read-more--link {
	pointer-events: none;
}

.wcj-box--editor .wcj-box__editor-placeholder {
	opacity: 0.75;
	font-size: 0.9em;
}

.wcj-box--refreshing .wcj-box__content-inner,
.wcj-box--refreshing .wcj-box__read-more,
.wcj-box--refreshing a.wcj-box__read-more--link {
	opacity: 0.55;
	transition: opacity 0.15s ease;
}
