/* ==========================================================================
   NuWeb Network — Black Friday event
   Everything here is scoped to classes that the head script adds to <html>
   only while the event is on: .nw-bf plus .nw-bf-fx-bar, -topbar,
   -ribbons, -shine, -sparkles and -sticker.
   Loaded after seasonal.css, so it can run alongside the Christmas mode:
   the Black Friday promo takes over the top bar, snow and lights carry on.
   Also styles NuCast's own cards and buttons (.rs-, .ra-, .nh-) so the
   effects show on sites that keep their custom page HTML.
   ========================================================================== */

:root {
	--nw-bf-black: #0B0C10;
	--nw-bf-ink: #15171F;
	--nw-bf-gold: #F4C146;
	--nw-bf-gold-hi: #FFE08A;
	--nw-bf-gold-lo: #D99A1E;
	--nw-bf-gold-grad: linear-gradient(135deg, #FFE08A 0%, #F4C146 45%, #D99A1E 100%);
}

/* Hidden unless the event is on (the markup is always printed so cached
   pages can switch on and off on schedule). */
.nw-bf-bar, .nw-bf-sticker, .nw-promo--bf { display: none; }

/* ---------- Announcement banner ---------- */

html.nw-bf-fx-bar .nw-bf-bar {
	display: block; position: relative; z-index: 10000;
	overflow: hidden;
	background:
		radial-gradient(circle at 12% -40%, rgba(244, 193, 70, .22), transparent 45%),
		radial-gradient(circle at 88% 140%, rgba(244, 193, 70, .16), transparent 45%),
		var(--nw-bf-black);
	color: #fff;
	font-family: var(--nw-font, "Plus Jakarta Sans", sans-serif);
	font-size: 14px; line-height: 1.4;
	border-bottom: 1px solid rgba(244, 193, 70, .35);
}
/* A gold line that sweeps along the bottom edge. */
html.nw-bf-fx-bar .nw-bf-bar::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
	background: linear-gradient(90deg, transparent, var(--nw-bf-gold), transparent);
	background-size: 40% 100%; background-repeat: no-repeat;
	animation: nw-bf-sweep 4.5s linear infinite;
}
.nw-bf-bar__inner {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
	gap: 8px 16px; margin: 0 auto; padding: 10px 52px 10px 20px;
}
.nw-bf-bar__label {
	display: inline-flex; align-items: center; padding: 6px 11px; border-radius: 100px;
	background: var(--nw-bf-gold-grad); color: var(--nw-bf-black);
	font-size: 11px; font-weight: 900; line-height: 1; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.nw-bf-bar__text { min-width: 0; color: rgba(255, 255, 255, .82); }
.nw-bf-bar__text strong { color: #fff; font-weight: 800; }
.nw-bf-bar__actions { display: inline-flex; align-items: center; gap: 10px; }

.nw-bf-countdown { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.nw-bf-countdown[hidden] { display: none; }
.nw-bf-countdown__label { color: rgba(255, 255, 255, .62); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.nw-bf-countdown__time { color: rgba(255, 255, 255, .7); font-size: 12px; font-variant-numeric: tabular-nums; }
.nw-bf-countdown__time b {
	display: inline-block; min-width: 26px; padding: 4px 5px; margin-left: 2px; border-radius: 6px;
	background: rgba(255, 255, 255, .08); border: 1px solid rgba(244, 193, 70, .3);
	color: var(--nw-bf-gold-hi); font-size: 13px; font-weight: 800; text-align: center;
}

.nw-bf-code {
	display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; margin: 0;
	border: 1px dashed rgba(244, 193, 70, .75); border-radius: 8px;
	background: rgba(244, 193, 70, .08); color: #fff;
	font: inherit; font-size: 12.5px; line-height: 1; cursor: pointer; white-space: nowrap;
}
.nw-bf-code span { color: rgba(255, 255, 255, .62); font-weight: 600; }
.nw-bf-code strong { color: var(--nw-bf-gold-hi); font-weight: 900; letter-spacing: .06em; }
.nw-bf-code:hover { background: rgba(244, 193, 70, .16); }
.nw-bf-code.is-copied strong::after { content: " ✓"; }

.nw-bf-cta {
	display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 8px;
	background: var(--nw-bf-gold-grad); color: var(--nw-bf-black) !important;
	font-size: 13px; font-weight: 800; line-height: 1; text-decoration: none !important; white-space: nowrap;
	transition: transform .2s ease, box-shadow .2s ease;
}
.nw-bf-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(244, 193, 70, .35); }

.nw-bf-close {
	position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
	display: grid; place-items: center; width: 30px; height: 30px; padding: 0; margin: 0;
	border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .8);
	cursor: pointer;
}
.nw-bf-close:hover { background: rgba(255, 255, 255, .16); color: #fff; }

@media (max-width: 1320px) {
	.nw-bf-bar__text span { display: none; }
}
@media (max-width: 760px) {
	.nw-bf-bar__inner { gap: 8px 12px; padding: 9px 46px 10px 14px; font-size: 13px; }
	.nw-bf-bar__text span { display: none; }
	.nw-bf-countdown__label { display: none; }
}
@media (max-width: 480px) {
	.nw-bf-bar__inner { padding-top: 8px; padding-bottom: 9px; }
	.nw-bf-bar__text { display: none; }
	.nw-bf-countdown__time b { min-width: 22px; padding: 3px 4px; font-size: 12px; }
	.nw-bf-code span { display: none; }
}

/* ---------- Top bar: black and gold, Black Friday promo ---------- */

/* Specificity is above the frosty Christmas top bar (seasonal.css), and this
   file loads later, so the Black Friday look wins while both are on. */
html.nw-bf.nw-bf-fx-topbar .nw-topbar,
html.nw-bf.nw-bf-fx-topbar .nc-header__topbar {
	background:
		radial-gradient(circle at 10% 120%, rgba(244, 193, 70, .18), transparent 40%),
		linear-gradient(90deg, #0B0C10 0%, #15171F 55%, #0B0C10 100%);
	border-bottom-color: rgba(244, 193, 70, .3);
	color: rgba(255, 255, 255, .85);
}
html.nw-bf.nw-bf-fx-topbar :is(.nw-topbar, .nc-header__topbar) :is(a, .nc-header__utility-link, .nc-header__promotion, .nw-snow-toggle) { color: rgba(255, 255, 255, .85); }
html.nw-bf.nw-bf-fx-topbar :is(.nw-topbar, .nc-header__topbar) a:hover { color: #fff; }
html.nw-bf.nw-bf-fx-topbar :is(.nw-topbar, .nc-header__topbar) :is(.nw-icon, .nc-header__utility-link svg) { color: var(--nw-bf-gold); }
html.nw-bf.nw-bf-fx-topbar .nw-promo--normal,
html.nw-bf.nw-bf-fx-topbar .nw-promo--season { display: none; }
html.nw-bf.nw-bf-fx-topbar .nw-promo--bf { display: inline-flex; }
.nw-promo--bf a { display: inline-flex; gap: 6px; color: inherit; text-decoration: none; min-width: 0; }
.nw-promo--bf a:hover span { text-decoration: underline; }
html.nw-bf .nw-promo--bf strong {
	background: var(--nw-bf-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
	text-transform: uppercase; letter-spacing: .06em; font-weight: 900;
}
/* The snow on/off button in the top bar stays readable on black. */
html.nw-bf.nw-bf-fx-topbar .nw-snow-toggle--bar { color: rgba(255, 255, 255, .85); }

/* ---------- Ribbons on plan cards ---------- */

/* ::before is used because Christmas snow caps use ::after. */
html.nw-bf-fx-ribbons :is(.nw-plan, .rs-plan, .ra-plan) { position: relative; }
html.nw-bf-fx-ribbons :is(.nw-plan, .rs-plan, .ra-plan)::before {
	content: var(--nw-bf-ribbon, "Black Friday");
	position: absolute; top: 14px; right: 14px; z-index: 2;
	padding: 6px 10px; border-radius: 100px;
	background: var(--nw-bf-black); color: var(--nw-bf-gold);
	box-shadow: inset 0 0 0 1px rgba(244, 193, 70, .55), 0 6px 14px rgba(11, 12, 16, .18);
	font-size: 9.5px; font-weight: 900; line-height: 1; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
	pointer-events: none;
}
html[data-theme="dark"].nw-bf-fx-ribbons :is(.nw-plan, .rs-plan, .ra-plan)::before { background: #000; }
/* Popular plans get a gold edge. */
html.nw-bf-fx-ribbons :is(.nw-plan, .rs-plan, .ra-plan).is-popular { box-shadow: 0 0 0 1px rgba(244, 193, 70, .55), 0 18px 40px rgba(244, 193, 70, .14); }

/* ---------- Gold shine on main buttons ---------- */

/* Drawn on the button's own background (no pseudo-elements), so it sits
   happily under Christmas snow caps. */
html.nw-bf-fx-shine :is(
	.nw-btn:not(.nw-btn--secondary):not(.nw-btn--ghost):not(.nw-btn--accent),
	.rs-btn:not(.rs-btn-secondary), .ra-btn, .nh-btn:not(.nh-btn-secondary)
) {
	background-image: linear-gradient(110deg, transparent 0%, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%, transparent 100%);
	background-size: 250% 100%;
	background-repeat: no-repeat;
	background-position: 150% 0;
	animation: nw-bf-shine 3.6s ease-in-out infinite;
}

/* ---------- Gold sparkles (see blackfriday.js) ---------- */

.nw-bf-sparkles-layer { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.nw-bf-sparkle {
	position: absolute; width: var(--s, 10px); height: var(--s, 10px);
	background: var(--nw-bf-gold-grad);
	clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
	opacity: 0;
	animation: nw-bf-twinkle var(--t, 3s) ease-in-out var(--d, 0s) infinite;
	filter: drop-shadow(0 0 4px rgba(244, 193, 70, .7));
}

/* ---------- Corner deal sticker ---------- */

html.nw-bf-fx-sticker .nw-bf-sticker {
	display: block; position: fixed; left: 16px; bottom: 16px; z-index: 9950;
	width: 214px;
	font-family: var(--nw-font, "Plus Jakarta Sans", sans-serif);
	animation: nw-bf-pop .5s cubic-bezier(.2, .9, .3, 1.3) 1.2s both;
}
/* Clear of the floating Christmas snow button. */
html.nw-fx-snow.nw-bf-fx-sticker .nw-bf-sticker { bottom: 62px; }
.nw-bf-sticker__link {
	display: block; padding: 14px 16px 15px; border-radius: 14px;
	background:
		radial-gradient(circle at 100% 0, rgba(244, 193, 70, .3), transparent 55%),
		var(--nw-bf-black);
	box-shadow: inset 0 0 0 1px rgba(244, 193, 70, .45), 0 18px 40px rgba(11, 12, 16, .35);
	color: #fff !important; text-decoration: none !important;
	transform: rotate(-2deg);
	transition: transform .2s ease;
}
.nw-bf-sticker__link:hover { transform: rotate(0) translateY(-2px); }
.nw-bf-sticker__label {
	display: inline-block; margin-bottom: 7px; padding: 5px 9px; border-radius: 100px;
	background: var(--nw-bf-gold-grad); color: var(--nw-bf-black);
	font-size: 10px; font-weight: 900; line-height: 1; letter-spacing: .08em; text-transform: uppercase;
}
.nw-bf-sticker__text { display: block; margin-bottom: 8px; color: #fff; font-size: 15px; font-weight: 800; line-height: 1.3; }
.nw-bf-sticker__cta { color: var(--nw-bf-gold-hi); font-size: 12.5px; font-weight: 800; }
.nw-bf-sticker .nw-bf-close {
	top: -9px; right: -9px; transform: none; width: 24px; height: 24px;
	background: var(--nw-bf-ink); box-shadow: inset 0 0 0 1px rgba(244, 193, 70, .5);
}
@media (max-width: 600px) {
	/* Phones: the banner already carries the offer, so skip the sticker. */
	html.nw-bf-fx-bar.nw-bf-fx-sticker .nw-bf-sticker { display: none; }
	html.nw-bf-fx-sticker .nw-bf-sticker { width: 180px; left: 12px; bottom: 12px; }
	html.nw-fx-snow.nw-bf-fx-sticker .nw-bf-sticker { bottom: 58px; }
	.nw-bf-sticker__text { font-size: 13.5px; }
}

/* ---------- Animations ---------- */

@keyframes nw-bf-sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@keyframes nw-bf-shine { 0%, 55% { background-position: 150% 0; } 100% { background-position: -60% 0; } }
@keyframes nw-bf-twinkle {
	0%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); }
	50% { opacity: .95; transform: scale(1) rotate(45deg); }
}
@keyframes nw-bf-pop { from { opacity: 0; transform: translateY(20px) scale(.9); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	html.nw-bf-fx-bar .nw-bf-bar::after,
	html.nw-bf-fx-shine :is(.nw-btn, .rs-btn, .ra-btn, .nh-btn),
	.nw-bf-sparkle,
	html.nw-bf-fx-sticker .nw-bf-sticker { animation: none; }
	.nw-bf-sparkle { opacity: .6; }
}

/* Printing: no promotional furniture. */
@media print { .nw-bf-bar, .nw-bf-sticker, .nw-bf-sparkles-layer { display: none !important; } }

/* ---------- Black Friday prices on plan cards (blackfriday.js) ---------- */

/* Ribbons also on the inner-page layouts' cards; never on excluded plans. */
html.nw-bf-fx-ribbons .nw-bf-card { position: relative; }
html.nw-bf-fx-ribbons .nw-bf-card:not(:is(.nw-plan, .rs-plan, .ra-plan))::before {
	content: var(--nw-bf-ribbon, "Black Friday");
	position: absolute; top: 14px; right: 14px; z-index: 2;
	padding: 6px 10px; border-radius: 100px;
	background: var(--nw-bf-black); color: var(--nw-bf-gold);
	box-shadow: inset 0 0 0 1px rgba(244, 193, 70, .55), 0 6px 14px rgba(11, 12, 16, .18);
	font-size: 9.5px; font-weight: 900; line-height: 1; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
	pointer-events: none;
}
html.nw-bf-fx-ribbons :is(.nw-plan, .rs-plan, .ra-plan).nw-bf-excluded::before { content: none; }

.nw-bf-deal {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
	margin: 10px 0 14px; padding: 10px 12px; border-radius: 10px;
	background: #0B0C10; color: rgba(255, 255, 255, .86);
	box-shadow: inset 0 0 0 1px rgba(244, 193, 70, .45);
	font-size: 12.5px; font-weight: 600; line-height: 1.35; text-align: left;
}
.nw-bf-deal[hidden] { display: none; }
.nw-bf-deal__label {
	padding: 3px 7px; border-radius: 100px; background: var(--nw-bf-gold-grad, #F4C146); color: #0B0C10;
	font-size: 9.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
}
.nw-bf-deal__price s { color: rgba(255, 255, 255, .5); }
.nw-bf-deal__price strong { color: #F4C146; font-size: 15px; font-weight: 900; }
.nw-bf-deal__off { color: #F4C146; font-weight: 800; }
.nw-bf-deal__code { width: 100%; color: rgba(255, 255, 255, .7); }
.nw-bf-deal__code button {
	margin-left: 4px; padding: 3px 8px; border: 1px dashed rgba(244, 193, 70, .75); border-radius: 6px;
	background: transparent; color: #fff; font: inherit; font-weight: 800; letter-spacing: .04em; cursor: pointer; width: auto;
}
.nw-bf-deal__code button.is-copied::after { content: " ✓ Copied"; color: #F4C146; }
.nw-bf-bar__terms { flex-basis: 100%; font-size: 11.5px; color: rgba(255, 255, 255, .62); text-align: center; }
html.nw-bf-fx-shine :is(.rh-btn:not(.rh-btn-secondary), .hm-btn:not(.hm-btn-secondary)) {
	background-image: linear-gradient(110deg, transparent 0%, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%, transparent 100%);
	background-size: 250% 100%; background-repeat: no-repeat; background-position: 150% 0;
	animation: nw-bf-shine 3.6s ease-in-out infinite;
}
