/* SW Lesson Boxes — frontend styles */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=UnifrakturCook:wght@700&family=Oswald:wght@400;600&family=Dancing+Script:wght@500;700&display=swap');

.swlb-widget-wrap { width: 100%; }

.swlb-anchor {
	scroll-margin-top: var( --swlb-scroll-offset, 30px );
}

.swlb-box {
	position: relative;
	overflow: hidden;
	transition: box-shadow .3s ease;
	background-clip: padding-box;
}

/* Background image lives on a ::before layer so its opacity is
   independent of the text. */
.swlb-box--has-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--swlb-bg);
	background-size: var(--swlb-bg-size, cover);
	background-position: var(--swlb-bg-pos, center);
	background-repeat: no-repeat;
	opacity: var(--swlb-bg-opacity, 1);
	mix-blend-mode: var(--swlb-bg-blend, normal);
	pointer-events: none;
	z-index: 0;
}

/* Colour overlay sits above the image but below the text. */
.swlb-box--has-overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--swlb-overlay, transparent);
	pointer-events: none;
	z-index: 1;
}

.swlb-box__inner {
	position: relative;
	z-index: 2;
}

.swlb-box__title {
	margin: 0 0 .4em;
	font-size: 1.4em;
	font-weight: 700;
	letter-spacing: .04em;
}

.swlb-divider {
	display: block;
	width: 48px;
	height: 2px;
	margin: 0 auto .9em;
	opacity: .7;
}
.swlb-box[style*="text-align:left"] .swlb-divider { margin-left: 0; }
.swlb-box[style*="text-align:right"] .swlb-divider { margin-right: 0; margin-left: auto; }

.swlb-box__text {
	white-space: normal;
}

.swlb-quote {
	display: block;
	font-size: 3em;
	line-height: .5;
	opacity: .35;
	font-family: Georgia, serif;
}
.swlb-quote--open { margin-bottom: .1em; }
.swlb-quote--close { margin-top: .35em; }
.swlb-box[style*="text-align:center"] .swlb-quote { text-align: center; }

.swlb-box--missing {
	padding: 24px;
	border: 2px dashed #bbb;
	color: #888;
	text-align: center;
	border-radius: 8px;
	background: #fafafa;
}

/* Admin side preview scaling */
.swlb-side-preview .swlb-box { font-size: 15px !important; }

/* --- Table of contents --- */
.swlb-toc {
	box-sizing: border-box;
	margin: 0 0 28px;
	padding: 16px 20px;
	border: 1px solid rgba(0,0,0,.12);
	border-radius: 8px;
	background: rgba(0,0,0,.02);
}

.swlb-toc__heading {
	margin: 0 0 .6em;
	font-size: 1.05em;
	font-weight: 700;
}

.swlb-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.swlb-toc--list .swlb-toc__list li {
	margin: 0 0 .5em;
}

.swlb-toc--inline .swlb-toc__list {
	display: flex;
	flex-wrap: wrap;
	gap: .4em 1.2em;
}

.swlb-toc__link {
	text-decoration: underline;
	cursor: pointer;
}
.swlb-toc__link:hover {
	opacity: .8;
}
