/* BetterChecked homepage: the curved edges between the dark, white and grey sections, and the
   demo box ([bc-unbox]). Markup: theme-functions/bc-home.php, page-casino-archive-style-9.php */

/* ==========================================================================
   Transitions
   The hero and the footer carry an inline SVG (bc_home_wave()). The grey bands are cover
   blocks that clip what leaves them, so their own grey layer is cut to shape instead and
   the white page shows through.
   ========================================================================== */

.bc-wave {
	display: block;
	width: 100%;
	height: 72px;
	pointer-events: none;
}
.bc-wave--hero {
	position: absolute;
	left: 0;
	bottom: -1px;   /* no hairline between the curve and the page */
	z-index: 1;
}
.hero.homepage-header {
	padding-bottom: 104px;   /* room for the curve under the ranking */
}
.bc-wave--footer {
	margin-bottom: -1px;
	background: #fff;
}

.home .space-page-content > .wp-block-cover.alignfull {
	--bc-edge: 48px;
	padding-top: 30px;
	padding-bottom: 30px;
}
.home .space-page-content > .wp-block-cover.alignfull > .wp-block-cover__background {
	-webkit-mask-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 41V24C210 2 430 36 730 20s500-24 710-2v23Z'/%3E%3C/svg%3E"),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0-1v19c240 24 480-10 760 4s480 20 680-6V-1Z'/%3E%3C/svg%3E"),
		linear-gradient(#000, #000);
	mask-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 41V24C210 2 430 36 730 20s500-24 710-2v23Z'/%3E%3C/svg%3E"),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0-1v19c240 24 480-10 760 4s480 20 680-6V-1Z'/%3E%3C/svg%3E"),
		linear-gradient(#000, #000);
	-webkit-mask-size: 100% var(--bc-edge), 100% var(--bc-edge), 100% calc(100% - var(--bc-edge) * 2 + 2px);
	mask-size: 100% var(--bc-edge), 100% var(--bc-edge), 100% calc(100% - var(--bc-edge) * 2 + 2px);
	-webkit-mask-position: top, bottom, center;
	mask-position: top, bottom, center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}
/* The second band (the team) is cut as two arcs, so the page does not repeat one shape. */
.home .space-page-content > .wp-block-cover.alignfull ~ .wp-block-cover.alignfull > .wp-block-cover__background {
	-webkit-mask-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 41V36C360-8 1080-8 1440 36v5Z'/%3E%3C/svg%3E"),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0-1v5c360 44 1080 44 1440 0v-5Z'/%3E%3C/svg%3E"),
		linear-gradient(#000, #000);
	mask-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 41V36C360-8 1080-8 1440 36v5Z'/%3E%3C/svg%3E"),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0-1v5c360 44 1080 44 1440 0v-5Z'/%3E%3C/svg%3E"),
		linear-gradient(#000, #000);
}

@media (max-width: 767px) {
	.bc-wave {
		height: 40px;
	}
	.hero.homepage-header {
		padding-bottom: 64px;
	}
	.home .space-page-content > .wp-block-cover.alignfull {
		--bc-edge: 22px;
		padding-top: 14px;
		padding-bottom: 14px;
	}
}

/* ==========================================================================
   The demo box
   ========================================================================== */

.bc-unbox {
	--u-ink: #f4f6f2;
	--u-soft: #c9cfc6;
	--u-muted: #969d94;
	--u-line: rgba(255, 255, 255, .1);
	--u-tile: rgba(255, 255, 255, .055);
	--u-green: #72a449;
	--u-t1: #8d958c;
	--u-t2: #a5d67a;
	--u-t3: #4fc3a1;
	--u-t4: #ff6b8b;
	--u-t5: #f0c14b;
	--tier: var(--u-t1);   /* an item's colour; the rarer tiers set their own */
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
	padding: 20px 20px 14px;
	border-radius: 22px;
	background:
		radial-gradient(110% 80% at 90% 0%, rgba(114, 164, 73, .26), transparent 60%),
		#111;
	box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 28px 50px -28px rgba(17, 17, 17, .7);
	color: var(--u-ink);
	font-size: 14px;
	line-height: 1.5;
}
.bc-unbox [hidden] {
	display: none !important;   /* the theme sets div { display: block } */
}
.bc-unbox .bc-icon {
	display: block;
	flex: none;
}

/* ---- Head: what box this is ---- */

.bc-unbox__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.bc-unbox__name {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--u-ink);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.bc-unbox__name .bc-icon {
	color: var(--u-t2);
}
.bc-unbox__meta {
	display: inline-flex;
	gap: 6px;
}
.bc-unbox__tag {
	padding: 3px 9px;
	border: 1px solid var(--u-line);
	border-radius: 999px;
	color: var(--u-soft);
	font-size: 11.5px;
	font-weight: 600;
	line-height: 16px;
	white-space: nowrap;
}

/* ---- Steps ---- */

.space-page-content ol.bc-unbox__steps,
ol.bc-unbox__steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}
.space-page-content ol.bc-unbox__steps li.bc-unbox__step,
li.bc-unbox__step {
	margin: 0;
	padding: 0;
	list-style: none;
}
.bc-unbox button.bc-unbox__pill {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	min-width: 0;
	height: 36px;
	margin: 0;
	padding: 0 6px;
	border: 0;
	border-radius: 999px;
	background: var(--u-tile);
	box-shadow: none;
	color: var(--u-muted);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease;
	-webkit-tap-highlight-color: transparent;
}
.bc-unbox:not(.is-live) button.bc-unbox__pill {
	pointer-events: none;
}
.bc-unbox button.bc-unbox__pill:hover {
	background: rgba(255, 255, 255, .1);
	color: var(--u-ink);
}
.bc-unbox button.bc-unbox__pill:focus-visible,
.bc-unbox button.bc-unbox__btn:focus-visible {
	outline: 2px solid var(--u-t2) !important;   /* the theme switches outlines off */
	outline-offset: 2px !important;
}
.bc-unbox__no {
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .1);
	font-size: 11px;
	font-weight: 700;
}
.bc-unbox .is-done button.bc-unbox__pill {
	color: var(--u-soft);
}
.bc-unbox .is-done .bc-unbox__no {
	background: rgba(114, 164, 73, .35);
	color: var(--u-t2);
}
.bc-unbox .is-active button.bc-unbox__pill {
	background: var(--u-green);
	color: #fff;
}
.bc-unbox .is-active .bc-unbox__no {
	background: rgba(255, 255, 255, .25);
	color: #fff;
}

/* ---- Stage: the box's items, the reel, the receipt ---- */

.bc-unbox__stage {
	display: grid;
	align-items: center;
	min-height: 158px;
	margin-top: 14px;
}
.bc-unbox__view {
	min-width: 0;
}
.space-page-content ul.bc-unbox__items,
ul.bc-unbox__items {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.space-page-content ul.bc-unbox__items li.bc-unbox__item,
.bc-unbox__item {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	min-width: 0;
	margin: 0;
	padding: 12px 6px 9px;
	border: 1px solid var(--u-line);
	border-radius: 12px;
	background: var(--u-tile);
	list-style: none;
	text-align: center;
}
.bc-unbox__item--t2 { --tier: var(--u-t2); }
.bc-unbox__item--t3 { --tier: var(--u-t3); }
.bc-unbox__item--t4 { --tier: var(--u-t4); }
.bc-unbox__item--t5 { --tier: var(--u-t5); }
.bc-unbox__item .bc-icon {
	margin-bottom: 5px;
	color: var(--tier);
}
.bc-unbox__iname {
	display: block;
	max-width: 100%;
	overflow: hidden;
	color: var(--u-ink);
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.bc-unbox__ivalue {
	color: var(--u-muted);
	font-size: 11.5px;
	line-height: 1.3;
}
.bc-unbox__iodds {
	margin-top: 6px;
	padding: 1px 8px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--tier) 18%, transparent);
	color: var(--tier);
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
}
/* Every item's share of the opens, to scale. */
.bc-unbox__oddsbar {
	display: flex;
	gap: 2px;
	height: 6px;
	margin-top: 12px;
}
.bc-unbox__seg {
	flex: 0 0 3px;
	border-radius: 999px;
	background: var(--u-t1);
}
.bc-unbox__seg--t2 { background: var(--u-t2); }
.bc-unbox__seg--t3 { background: var(--u-t3); }
.bc-unbox__seg--t4 { background: var(--u-t4); }
.bc-unbox__seg--t5 { background: var(--u-t5); }

.bc-unbox__window {
	position: relative;
	overflow: hidden;
	border-radius: 14px;
	background: rgba(255, 255, 255, .03);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.bc-unbox__strip {
	position: relative;   /* the tiles' offsets are measured from here */
	display: flex;
	gap: 8px;
	padding: 10px 0;
	will-change: transform;
}
.bc-unbox__strip .bc-unbox__item {
	flex: 0 0 104px;
	width: 104px;
	transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.bc-unbox__strip .bc-unbox__item.is-won {
	border-color: var(--tier);
	background: color-mix(in srgb, var(--tier) 14%, transparent);
	box-shadow: 0 0 0 1px var(--tier), 0 0 22px -4px var(--tier);
}
.bc-unbox__marker {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	margin-left: -1px;
	background: linear-gradient(var(--u-t5), rgba(240, 193, 75, .25) 30%, rgba(240, 193, 75, .25) 70%, var(--u-t5));
}
.bc-unbox__marker::before,
.bc-unbox__marker::after {
	content: "";
	position: absolute;
	left: 50%;
	border: 6px solid transparent;
	transform: translateX(-50%);
}
.bc-unbox__marker::before {
	top: 0;
	border-top-color: var(--u-t5);
}
.bc-unbox__marker::after {
	bottom: 0;
	border-bottom-color: var(--u-t5);
}
.space-page-content p.bc-unbox__result,
p.bc-unbox__result {
	min-height: 21px;
	margin: 10px 0 0;
	padding: 0;
	color: var(--u-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
}

.space-page-content dl.bc-unbox__receipt,
dl.bc-unbox__receipt {
	margin: 0;   /* the theme gives lists of terms a bottom margin */
	border: 1px solid var(--u-line);
	border-radius: 14px;
	background: rgba(255, 255, 255, .03);
}
.space-page-content .bc-unbox__receipt > div,
.bc-unbox__receipt > div {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 14px;
	border-bottom: 1px solid var(--u-line);
}
.bc-unbox__receipt > div:last-child {
	border-bottom: 0;
}
.space-page-content .bc-unbox__receipt dt,
.space-page-content .bc-unbox__receipt dd,
.bc-unbox__receipt dt,
.bc-unbox__receipt dd {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}
.bc-unbox__receipt dt {
	color: var(--u-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
}
.bc-unbox__receipt dd {
	min-width: 0;
	overflow: hidden;
	color: var(--u-ink);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12.5px;
	text-align: right;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---- The step's text: one at a time (all four without JavaScript, see the noscript styles
        the shortcode prints) ---- */

.bc-unbox__captions {
	min-height: 114px;   /* the longest text: the card keeps its height from step to step */
	margin-top: 14px;
}
.bc-unbox__caption:not(.is-active) {
	display: none;
}
.space-page-content .bc-unbox h3.bc-unbox__title,
.bc-unbox h3.bc-unbox__title {
	margin: 0 0 3px;
	padding: 0;
	color: var(--u-ink);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}
.bc-unbox__titleno {
	color: var(--u-t2);
}
.space-page-content .bc-unbox p.bc-unbox__text,
.bc-unbox p.bc-unbox__text {
	margin: 0;
	padding: 0;
	color: var(--u-soft);
	font-size: 14.5px;
	line-height: 1.5;
}
.space-page-content .bc-unbox a.bc-unbox__more,
.bc-unbox a.bc-unbox__more {
	color: var(--u-t2);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}
.bc-unbox a.bc-unbox__more:hover {
	color: #fff;
}

/* ---- Buttons ---- */

.bc-unbox__actions {
	display: flex;
	gap: 8px;
	margin-top: 14px;
}
.bc-unbox button.bc-unbox__btn {
	flex: 1 1 0;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid #fff;
	border-radius: 999px;
	background: #fff;
	box-shadow: none;
	color: #111;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
	-webkit-tap-highlight-color: transparent;
}
.bc-unbox button.bc-unbox__btn:hover {
	border-color: var(--u-t2);
	background: var(--u-t2);
	color: #111;
}
.bc-unbox button.bc-unbox__btn:active {
	transform: scale(.985);
}
.bc-unbox button.bc-unbox__btn:disabled {
	border-color: var(--u-line);
	background: var(--u-tile);
	color: var(--u-muted);
	cursor: default;
}
.bc-unbox button.bc-unbox__btn--sell {
	border-color: rgba(255, 255, 255, .35);
	background: transparent;
	color: var(--u-ink);
}

/* ---- Foot: the running count and the small print ---- */

.space-page-content .bc-unbox p.bc-unbox__foot,
.bc-unbox p.bc-unbox__foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0 14px;
	margin: 14px 0 0;
	padding: 10px 0 0;
	border-top: 1px solid var(--u-line);
	color: var(--u-muted);
	font-size: 12px;
	line-height: 1.5;
}
.bc-unbox__tally {
	color: var(--u-soft);
	font-weight: 600;
}

@media (max-width: 600px) {
	.bc-unbox {
		padding: 16px 14px 12px;
		border-radius: 18px;
	}
	.bc-unbox button.bc-unbox__pill {
		gap: 5px;
		font-size: 12.5px;
	}
	.bc-unbox__stage {
		min-height: 264px;   /* the items take two rows here */
	}
	/* Three and two: the second row's tiles are the wider ones. */
	.space-page-content ul.bc-unbox__items,
	ul.bc-unbox__items {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
	.space-page-content ul.bc-unbox__items li.bc-unbox__item,
	ul.bc-unbox__items .bc-unbox__item {
		grid-column: span 2;
	}
	.space-page-content ul.bc-unbox__items li.bc-unbox__item:nth-child(n+4),
	ul.bc-unbox__items .bc-unbox__item:nth-child(n+4) {
		grid-column: span 3;
	}
	.bc-unbox__captions {
		min-height: 136px;
	}
	.space-page-content .bc-unbox__receipt > div,
	.bc-unbox__receipt > div {
		padding: 8px 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bc-unbox__strip {
		transition: none !important;
	}
}
