/*
 * Shared by the page blocks (Delivery, Returns, Wholesale, Kawaii World):
 * the section frame, its heading row, the pink highlight and the pill buttons.
 * Each block adds its own stylesheet on top. Values follow the static design
 * (Kawaii-Life-Static-HTML/style.css, .section / .head / h2 / .sub / .btn).
 */

/* The highlighted word in a heading ("Delivery areas & <mark>timelines</mark>"). */
mark.kawaii-hl {
	background: none;
	color: var(--wp--preset--color--accent-1);
}

/*
 * The reference's .section: 1350px at most, 5% of the page each side, 70px
 * above and below (48px on phones). The block itself is full width so the
 * page's narrow content column doesn't box it in; the inner div is the
 * container. Its margins collapse through the wrapper, so neighbouring
 * sections sit 70px apart, as in the reference.
 */
.kawaii-section {
	margin-block: 0;
}

.kawaii-section__inner {
	box-sizing: border-box;
	max-width: var(--wp--custom--width--categories, 1350px);
	margin: 70px auto;
	padding: 0 5%;
}

.kawaii-section__head {
	margin-bottom: 23px;
}

.kawaii-section__title {
	margin: 0;
	font-size: 34px;
	line-height: normal;
	letter-spacing: normal;
}

.kawaii-section__sub {
	margin: 7px 0;
	font-size: 14px;
	color: var(--wp--preset--color--accent-4);
}

/* Pills, as the reference's .btn: flat, no shadow or lift. */
.kawaii-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.kawaii-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 44px; /* the smallest tap target the theme allows */
	border: 0;
	border-radius: 999px;
	padding: 14px 20px;
	font-size: 12px;
	font-weight: 900;
	line-height: normal;
	letter-spacing: normal;
	text-decoration: none;
	cursor: pointer;
}

.kawaii-btn--primary {
	position: relative;
	z-index: 0;
	overflow: hidden;
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--white);
}

.kawaii-btn--light {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
}

.kawaii-btn:hover,
.kawaii-btn:focus {
	text-decoration: none;
}

.kawaii-btn--primary:hover,
.kawaii-btn--primary:focus {
	color: var(--wp--preset--color--white);
}

.kawaii-btn--light:hover,
.kawaii-btn--light:focus {
	color: var(--wp--preset--color--contrast);
}

/* The light that sweeps across a pink pill on hover, as in the reference. */
.kawaii-btn--primary::after {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	z-index: -1;
	width: 100%;
	height: 100%;
	transform: skew(-15deg);
	background-image: linear-gradient(90deg, transparent, rgb(243 243 243 / 25%), transparent);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.kawaii-btn--primary:hover::after {
		animation: kawaii-pages-shine 1000ms ease;
	}
}

@keyframes kawaii-pages-shine {
	to {
		left: 100%;
	}
}

/* Sprite icons take the size and colour of their slot. */
.kawaii-section .kawaii-icon {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/*
 * A taped-on photo with its caption (about.html's .polaroid), and the small
 * pink tag over a story's heading (.entry-tag). Shared by Story Cover, Story
 * Entry and Postcard.
 */
.kawaii-polaroid {
	box-sizing: border-box;
	width: 220px;
	max-width: 100%;
	/* A figure's own margin, which the design's polaroids keep. */
	margin: 16px 40px;
	padding: 12px 12px 40px;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 6px;
	background: var(--wp--preset--color--white);
	box-shadow: 0 12px 35px rgba(80, 50, 80, 0.09);
}

.kawaii-polaroid img,
.kawaii-polaroid__empty {
	display: block;
	width: 100%;
	height: 190px;
	border-radius: 3px;
	background: linear-gradient(135deg, #ffe0eb, #eee5ff);
	object-fit: contain;
}

.kawaii-polaroid__empty {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--wp--preset--color--accent-4);
}

.kawaii-polaroid figcaption {
	margin-top: 12px;
	font-size: 12.5px;
	font-weight: 700;
	line-height: normal;
	text-align: center;
	color: var(--wp--preset--color--accent-4);
}

.kawaii-story-tag {
	display: block;
	margin-bottom: 6px;
	font-size: 11px;
	font-weight: 900;
	line-height: normal;
	color: var(--wp--preset--color--accent-1);
}

@media (max-width: 650px) {
	.kawaii-section__inner {
		margin: 48px auto;
	}

	.kawaii-section__title {
		font-size: 29px;
	}
}
