/* Coming-soon header + "Notify me" modal. Loaded only while WooCommerce coming-soon mode is on. */

/* Reds follow the site's Blocksy colours; see showcase.css for what each is for. */
:root {
	--ns-red: var(--theme-palette-color-5, #a50000);
	--ns-red-text: var(--theme-link-initial-color, #d17575);
}

/* ---------- Header ---------- */

.noctshop-coming-soon #header [data-id="menu"],
.noctshop-coming-soon #header [data-id="search"],
.noctshop-coming-soon #header [data-id="trigger"],
.noctshop-coming-soon #header [data-id="cart"],
.noctshop-coming-soon #header [data-id="account"] {
	display: none !important;
}

.noctshop-cs-badge {
	display: inline-block;
	font-family: 'Asal Viral', var(--theme-font-family); /* loaded by the "Noctshop Custom Fonts" snippet */
	font-size: clamp(1.15625rem, 3.2375vw, 2.3125rem); /* 37px max; min and vw scaled by the same 37/32 */
	font-weight: 400; /* the font has one weight; anything heavier gets faux-bolded */
	letter-spacing: .5em;
	margin-right: -.5em; /* letter-spacing trails the last letter; keep the word optically centred */
	text-transform: uppercase;
	white-space: nowrap;
	/* Text colour per state: unlit tube grey, half-lit during failed attempts, white when fully on. */
	--nsn-unlit: #7d7d7d;
	--nsn-half-lit: #c8c8c8;
	color: var(--nsn-unlit);
	/* Neon "lit" state: a white halo, brightest at the letter edges and fading outward. In em so it scales with the text. */
	--nsn-glow:
		0 0 .03em #fff,
		0 0 .15em rgba(255, 255, 255, .9),
		0 0 .45em rgba(255, 255, 255, .65),
		0 0 1.1em rgba(255, 255, 255, .5),
		0 0 2.2em rgba(255, 255, 255, .38),
		0 0 4em rgba(255, 255, 255, .25);
	/* A weak half-lit halo for the failed attempts. */
	--nsn-glow-dim:
		0 0 .03em rgba(255, 255, 255, .7),
		0 0 .15em rgba(255, 255, 255, .45),
		0 0 .45em rgba(255, 255, 255, .3),
		0 0 1.1em rgba(255, 255, 255, .15),
		0 0 2.2em rgba(255, 255, 255, .08);
	animation: nsn-flicker 7s steps(1, end) infinite;
}
/* Normally unlit (plain text). Every 7s the tube struggles to start: a few weak flickers, a stutter, then a full-strength
   burst that holds about half a second before it dies. steps() makes each switch instant. */
@keyframes nsn-flicker {
	0%, 100% { color: var(--nsn-unlit); text-shadow: none; }
	60%    { color: var(--nsn-half-lit); text-shadow: var(--nsn-glow-dim); }
	60.7%  { color: var(--nsn-unlit); text-shadow: none; }
	64%    { color: var(--nsn-half-lit); text-shadow: var(--nsn-glow-dim); }
	64.5%  { color: var(--nsn-unlit); text-shadow: none; }
	65.3%  { color: var(--nsn-half-lit); text-shadow: var(--nsn-glow-dim); }
	66.4%  { color: var(--nsn-unlit); text-shadow: none; }
	69%    { color: #fff; text-shadow: var(--nsn-glow); }
	69.6%  { color: var(--nsn-unlit); text-shadow: none; }
	70.4%  { color: #fff; text-shadow: var(--nsn-glow); }
	71%    { color: var(--nsn-half-lit); text-shadow: var(--nsn-glow-dim); }
	71.6%  { color: #fff; text-shadow: var(--nsn-glow); }
	79%    { color: var(--nsn-unlit); text-shadow: none; }
}
/* Phones: the badge moves from the header's middle slot to a strip under the header. */
.noctshop-cs-strip {
	display: none;
}
@media (max-width: 999.98px) {
	#header [data-device="mobile"] [data-id="text"] {
		display: none;
	}
	.noctshop-cs-strip {
		display: block;
		padding: .7em 16px;
		background: #000;
		border-bottom: 1px solid color-mix(in srgb, var(--ns-red) 35%, transparent);
		text-align: center;
	}
	.noctshop-cs-strip .noctshop-cs-badge {
		font-size: 1.214rem; /* 1.05rem scaled by 37/32, in step with the desktop badge */
		letter-spacing: .6em;
		margin-right: -.6em;
	}
}

/* Blocksy header Button element linking to #notify. */
#header [data-id="button"] a.ct-button[href="#notify"] {
	--theme-button-min-height: 40px;
	padding-inline: 1.2em;
	border: 1px solid var(--ns-red);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	box-shadow: 0 0 16px -4px color-mix(in srgb, var(--ns-red) 60%, transparent), inset 0 0 12px -6px color-mix(in srgb, var(--ns-red) 80%, transparent);
	transition: background-color .25s, box-shadow .25s;
}
#header [data-id="button"] a.ct-button[href="#notify"]:hover,
#header [data-id="button"] a.ct-button[href="#notify"]:focus-visible {
	background: var(--ns-red);
	color: #fff;
	box-shadow: 0 0 24px -2px color-mix(in srgb, var(--ns-red) 80%, transparent);
}
@media (max-width: 480px) {
	#header [data-id="button"] a.ct-button[href="#notify"] {
		--theme-button-min-height: 34px;
		padding-inline: .9em;
		font-size: .68rem;
		letter-spacing: .1em;
	}
}

/* ---------- Modal ---------- */

.nsn {
	width: min(440px, calc(100vw - 32px));
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: clamp(28px, 6vw, 44px);
	overflow: auto;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 20px;
	background:
		radial-gradient(120% 80% at 50% -20%, color-mix(in srgb, var(--ns-red) 35%, transparent), transparent 60%),
		#0b0b0b;
	color: #f5f5f5;
	box-shadow: 0 40px 120px -20px color-mix(in srgb, var(--ns-red) 45%, transparent), 0 0 0 1px rgba(0, 0, 0, .6);
	text-align: center;
}
.nsn::backdrop {
	background: rgba(0, 0, 0, .65);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}
.nsn[open] {
	animation: nsn-in .45s cubic-bezier(.2, .9, .25, 1.15);
}
.nsn[open]::backdrop {
	animation: nsn-fade .3s ease-out;
}
@keyframes nsn-in {
	from { opacity: 0; transform: translateY(24px) scale(.92); }
}
@keyframes nsn-fade {
	from { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.nsn[open],
	.nsn[open]::backdrop,
	.noctshop-cs-badge {
		animation: none;
	}
}

.nsn__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #9a9a9a;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.nsn__close:hover,
.nsn__close:focus-visible {
	background: rgba(255, 255, 255, .08);
	color: #fff;
}

.nsn__eyebrow {
	margin: 0 0 .75rem;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .3em;
	text-transform: uppercase;
	color: var(--ns-red-text);
}
.nsn__title {
	margin: 0 0 .75rem;
	font-size: clamp(1.5rem, 5vw, 2rem);
	line-height: 1.15;
	color: #fff;
}
.nsn__lede {
	margin: 0 0 1.75rem;
	color: #b5b5b5;
	line-height: 1.55;
}

.nsn__field {
	display: block;
	margin-bottom: 1rem;
	text-align: left;
}
.nsn__field span {
	display: block;
	margin-bottom: .4rem;
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #cfcfcf;
}
.nsn__field em {
	font-style: normal;
	text-transform: none;
	letter-spacing: 0;
	color: #7d7d7d;
}
.nsn .nsn__field input {
	width: 100%;
	height: 50px;
	padding: 0 16px;
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 12px;
	background: rgba(255, 255, 255, .04);
	color: #fff;
	font-size: 16px; /* 16px stops iOS zooming on focus */
	transition: border-color .2s, box-shadow .2s;
}
.nsn .nsn__field input::placeholder {
	color: #6b6b6b;
}
.nsn .nsn__field input:focus {
	outline: none;
	border-color: var(--ns-red-text);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ns-red-text) 30%, transparent);
}
.nsn .nsn__field input[aria-invalid="true"] {
	border-color: var(--ns-red-text);
}

.nsn__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.nsn .nsn__submit {
	display: block;
	width: 100%;
	height: 52px;
	margin-top: .5rem;
	padding: 0 20px;
	border: 0;
	border-radius: 12px;
	background: var(--ns-red);
	color: #fff;
	font-size: .9rem;
	font-weight: 800;
	letter-spacing: .2em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--ns-red) 60%, transparent);
	transition: transform .2s, box-shadow .2s, opacity .2s;
}
.nsn .nsn__submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 16px 36px -10px color-mix(in srgb, var(--ns-red) 75%, transparent);
}
.nsn .nsn__submit:disabled {
	opacity: .6;
	cursor: progress;
	transform: none;
}

.nsn__msg {
	min-height: 1.4em;
	margin: 1rem 0 0;
	font-size: .9rem;
	color: var(--ns-red-text);
}
.nsn__msg:empty {
	margin: 0;
}

/* A "Notify me" button placed in page content (e.g. a Buttons block linking to #notify). */
.noctshop-notify-cta {
	text-align: center;
	margin-block: clamp(2rem, 6vh, 4rem);
}
.noctshop-notify-cta .wp-block-button__link {
	padding: 1em 2.4em;
	border-radius: 999px;
	background: var(--ns-red);
	color: #fff;
	font-size: .9rem;
	font-weight: 800;
	letter-spacing: .2em;
	text-transform: uppercase;
	box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--ns-red) 60%, transparent);
	transition: transform .2s, box-shadow .2s;
}
.noctshop-notify-cta .wp-block-button__link:hover,
.noctshop-notify-cta .wp-block-button__link:focus-visible {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 18px 40px -10px color-mix(in srgb, var(--ns-red) 80%, transparent);
}
