/*
 * St Ides Support & Payment Helper
 * Front-end styles. Palette matches the site: #0a0a0a black, #c9a84c gold, #2a2a2a borders.
 */

.stides-support,
.stides-modal,
.stides-toast {
	font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.stides-support *,
.stides-modal *,
.stides-toast * {
	box-sizing: border-box;
}

:root {
	--stides-red: #d9000d;
	--stides-red-dark: #b8000b;
	--stides-red-light: #ff2a3a;
}

/* ==========================================================================
   1. Floating support button
   ========================================================================== */

.stides-support {
	position: fixed;
	right: 18px;
	bottom: 24px;
	z-index: 99992;
}

.stides-support__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--stides-red);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 14px 24px;
	font-family: inherit;
	font-weight: 800;
	font-size: 13.5px;
	letter-spacing: 1.3px;
	text-transform: uppercase;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 10px 30px rgba(217, 0, 13, 0.4);
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	/* entrance: slides up + fades in on first paint */
	animation: stidesBtnIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.15) backwards;
}

/* radiating pulse ring behind the pill */
.stides-support__btn::after {
	content: "";
	position: absolute;
	inset: -3px;
	border-radius: inherit;
	pointer-events: none;
	box-shadow: 0 0 0 0 rgba(217, 0, 13, 0.55);
	animation: stidesBtnRing 2.6s ease-out 1.1s infinite;
}

/* envelope wiggle every cycle so the button keeps drawing the eye */
.stides-support__btn svg {
	animation: stidesBtnWiggle 3.4s ease-in-out 1.4s infinite;
}

@keyframes stidesBtnIn {
	from { opacity: 0; transform: translateY(26px) scale(0.85); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes stidesBtnRing {
	0%   { box-shadow: 0 0 0 0 rgba(217, 0, 13, 0.5); }
	70%  { box-shadow: 0 0 0 18px rgba(217, 0, 13, 0); }
	100% { box-shadow: 0 0 0 22px rgba(217, 0, 13, 0); }
}

@keyframes stidesBtnWiggle {
	0%, 84%, 100% { transform: rotate(0deg); }
	87%  { transform: rotate(-9deg); }
	90%  { transform: rotate(9deg); }
	93%  { transform: rotate(-6deg); }
	96%  { transform: rotate(4deg); }
}

.stides-support__btn:hover,
.stides-support__btn:focus-visible {
	background: var(--stides-red-dark);
	transform: translateY(-3px);
	box-shadow: 0 16px 40px rgba(217, 0, 13, 0.55);
}

.stides-support__btn:active {
	transform: translateY(-1px) scale(0.98);
}

.stides-support__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.stides-support__btn svg {
	width: 19px;
	height: 19px;
	fill: #fff;
	flex: none;
}

.stides-support__panel {
	position: absolute;
	right: 0;
	bottom: 66px;
	width: 306px;
	background: #0a0a0a;
	border: 1px solid #2a2a2a;
	border-radius: 14px;
	box-shadow: 0 20px 55px rgba(0, 0, 0, 0.65);
	overflow: hidden;
	display: none;
	transform-origin: bottom right;
}

.stides-support.open .stides-support__panel {
	display: block;
	animation: stidesSupportIn 0.22s ease both;
}

@keyframes stidesSupportIn {
	from { opacity: 0; transform: translateY(10px) scale(0.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.stides-support__head {
	background: linear-gradient(135deg, var(--stides-red-light) 0%, var(--stides-red) 55%, var(--stides-red-dark) 100%);
	color: #fff;
	padding: 16px 18px;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: 0.3px;
}

.stides-support__head small {
	display: block;
	font-weight: 600;
	font-size: 12.5px;
	letter-spacing: 0.2px;
	text-transform: none;
	opacity: 0.85;
	margin-top: 3px;
	line-height: 1.4;
}

.stides-support__panel a {
	display: flex;
	align-items: center;
	gap: 13px;
	padding: 15px 18px;
	color: #e8e8e8;
	text-decoration: none;
	border-top: 1px solid #1c1c1c;
	transition: background 0.18s ease;
}

.stides-support__panel a:hover,
.stides-support__panel a:focus-visible {
	background: #141414;
	color: #fff;
}

.stides-support__panel a b {
	display: block;
	font-size: 14.5px;
	font-weight: 800;
	color: #fff;
}

.stides-support__panel a span {
	font-size: 12.5px;
	color: #8a8a8a;
	word-break: break-all;
}

.stides-support__ic {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--stides-red);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
}

.stides-support__ic svg {
	width: 19px;
	height: 19px;
	fill: #fff;
}

/* ==========================================================================
   2. Order placed popup
   ========================================================================== */

.stides-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.stides-modal[hidden] {
	display: none;
}

.stides-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 4, 4, 0.86);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	animation: stidesFade 0.25s ease both;
}

@keyframes stidesFade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.stides-modal__card {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: linear-gradient(180deg, #131313 0%, #0a0a0a 100%);
	border: 1px solid #262626;
	border-radius: 20px;
	padding: 40px 36px 30px;
	box-shadow:
		0 34px 90px rgba(0, 0, 0, 0.75),
		0 0 0 1px rgba(201, 168, 76, 0.16);
	text-align: center;
	animation: stidesPop 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.stides-modal__card::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 3px;
	border-radius: 20px 20px 0 0;
	background: linear-gradient(90deg, #a8862f 0%, #f0be2e 50%, #a8862f 100%);
}

@keyframes stidesPop {
	from { opacity: 0; transform: translateY(18px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.stides-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid #2a2a2a;
	border-radius: 50%;
	color: #8a8a8a;
	cursor: pointer;
	padding: 0;
	transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.stides-modal__close:hover {
	border-color: #c9a84c;
	color: #c9a84c;
	background: rgba(201, 168, 76, 0.08);
}

.stides-modal__close svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
}

.stides-modal__badge {
	width: 66px;
	height: 66px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: linear-gradient(135deg, #f0be2e 0%, #c9a84c 60%, #a8862f 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 9px rgba(201, 168, 76, 0.12);
}

.stides-modal__badge svg {
	width: 34px;
	height: 34px;
	fill: #0a0a0a;
}

.stides-modal__title {
	margin: 0 0 10px;
	color: #fff;
	font-size: 26px;
	line-height: 1.25;
	font-weight: 800;
	letter-spacing: -0.4px;
}

.stides-modal__intro {
	margin: 0 auto 24px;
	max-width: 430px;
	color: #b9b9b9;
	font-size: 15.5px;
	line-height: 1.65;
}

.stides-modal__facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	margin: 0 0 24px;
	padding: 0;
	background: #232323;
	border: 1px solid #232323;
	border-radius: 14px;
	overflow: hidden;
	text-align: left;
}

.stides-modal__fact {
	background: #101010;
	padding: 14px 18px;
}

.stides-modal__fact dt {
	margin: 0 0 4px;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #8a8a8a;
}

.stides-modal__fact dd {
	margin: 0;
	color: #fff;
	font-size: 15.5px;
	font-weight: 800;
	line-height: 1.35;
}

/* --- the hero email button --- */

.stides-modal__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	padding: 20px 22px;
	border-radius: 14px;
	background: linear-gradient(135deg, #f0be2e 0%, #c9a84c 55%, #b8952f 100%);
	color: #0a0a0a;
	text-decoration: none;
	font-weight: 800;
	font-size: 15.5px;
	line-height: 1.4;
	letter-spacing: 0.2px;
	box-shadow: 0 12px 34px rgba(201, 168, 76, 0.3);
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.stides-modal__cta:hover,
.stides-modal__cta:focus-visible {
	transform: translateY(-2px);
	filter: brightness(1.08);
	box-shadow: 0 18px 46px rgba(201, 168, 76, 0.45);
	color: #0a0a0a;
}

.stides-modal__cta:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.stides-modal__cta svg {
	width: 26px;
	height: 26px;
	fill: #0a0a0a;
	flex: none;
}

.stides-modal__note {
	margin: 12px 0 18px;
	color: #8a8a8a;
	font-size: 12.5px;
	line-height: 1.5;
}

.stides-modal__later {
	display: block;
	width: 100%;
	padding: 12px 18px;
	background: transparent;
	border: 1px solid #2a2a2a;
	border-radius: 999px;
	color: #c4c4c4;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color 0.18s ease, color 0.18s ease;
}

.stides-modal__later:hover {
	border-color: #c9a84c;
	color: #c9a84c;
}

/* ==========================================================================
   3. On-screen notification — centre-screen ad-style popup
   (pops in over a dimmed backdrop, countdown progress bar, click-outside)
   ========================================================================== */

.stides-toast {
	position: fixed;
	inset: 0;
	z-index: 1000001; /* above the modal so it pops over everything, like an ad */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.28s ease;
	pointer-events: none;
}

.stides-toast[hidden] {
	display: none;
}

.stides-toast.is-in {
	opacity: 1;
	pointer-events: auto;
}

.stides-toast.is-out {
	opacity: 0;
	pointer-events: none;
}

/* dimmed backdrop — clicking it dismisses the notification (ad behaviour) */
.stides-toast__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 4, 4, 0.55);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	border: 0;
	padding: 0;
}

.stides-toast__inner {
	position: relative;
	width: min(404px, calc(100vw - 32px));
	display: flex;
	gap: 14px;
	align-items: flex-start;
	background: linear-gradient(180deg, #161616 0%, #0b0b0b 100%);
	border: 1px solid #2b2b2b;
	border-radius: 18px;
	padding: 22px 46px 24px 20px;
	overflow: hidden;
	box-shadow: 0 34px 90px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(217, 0, 13, 0.2);
	/* start state for the pop-in */
	transform: scale(0.78) translateY(24px);
	opacity: 0;
}

/* the "ad pop" — quick scale-in with a springy overshoot */
.stides-toast.is-in .stides-toast__inner {
	animation: stidesToastPop 0.52s cubic-bezier(0.2, 0.9, 0.3, 1.28) forwards;
}

.stides-toast.is-out .stides-toast__inner {
	animation: none;
	opacity: 0;
	transform: scale(0.92);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

@keyframes stidesToastPop {
	0%   { opacity: 0; transform: scale(0.78) translateY(24px); }
	55%  { opacity: 1; transform: scale(1.05) translateY(0); }
	75%  { transform: scale(0.985); }
	100% { opacity: 1; transform: scale(1); }
}

.stides-toast__inner::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: linear-gradient(180deg, var(--stides-red-light), var(--stides-red-dark));
}

.stides-toast__ic {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--stides-red);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	box-shadow: 0 0 0 6px rgba(217, 0, 13, 0.15);
	animation: stidesToastIcPulse 2.4s ease-in-out 0.9s infinite;
}

@keyframes stidesToastIcPulse {
	0%, 100% { box-shadow: 0 0 0 6px rgba(217, 0, 13, 0.15); }
	50%      { box-shadow: 0 0 0 12px rgba(217, 0, 13, 0.04); }
}

.stides-toast__ic svg {
	width: 21px;
	height: 21px;
	fill: #fff;
}

.stides-toast__body {
	flex: 1;
	min-width: 0;
}

.stides-toast__title {
	display: block;
	color: #fff;
	font-size: 16.5px;
	font-weight: 800;
	letter-spacing: 0.2px;
	line-height: 1.3;
	margin-bottom: 6px;
}

.stides-toast__text {
	display: block;
	color: #b3b3b3;
	font-size: 13.5px;
	line-height: 1.6;
	margin-bottom: 14px;
}

.stides-toast__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 15px 16px;
	border-radius: 11px;
	background: var(--stides-red);
	color: #fff;
	text-decoration: none;
	font-weight: 800;
	font-size: 14px;
	letter-spacing: 0.5px;
	line-height: 1.35;
	text-align: center;
	transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
	box-shadow: 0 10px 26px rgba(217, 0, 13, 0.4);
}

.stides-toast__cta:hover,
.stides-toast__cta:focus-visible {
	background: var(--stides-red-dark);
	transform: translateY(-2px);
	color: #fff;
	box-shadow: 0 14px 32px rgba(217, 0, 13, 0.55);
}

.stides-toast__cta:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.stides-toast__cta svg {
	width: 18px;
	height: 18px;
	fill: #fff;
	flex: none;
}

.stides-toast__close {
	position: absolute;
	top: 11px;
	right: 11px;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: #8a8a8a;
	cursor: pointer;
	padding: 0;
	z-index: 2;
	transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.stides-toast__close:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
	transform: rotate(90deg);
}

.stides-toast__close svg {
	width: 12px;
	height: 12px;
	fill: currentColor;
}

/* countdown progress bar along the card's bottom edge */
.stides-toast__track {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 5px;
	background: #1d1d1d;
	border-radius: 0 0 18px 18px;
	overflow: hidden;
}

/* looping countdown bar — decorative; the notification never auto-closes */
.stides-toast__bar {
	display: block;
	height: 100%;
	width: 100%;
	background: linear-gradient(90deg, var(--stides-red-light), var(--stides-red));
	transform-origin: left center;
	animation: stidesToastBar var(--stides-toast-dur, 12s) linear infinite;
}

@keyframes stidesToastBar {
	from { width: 100%; }
	to   { width: 0%; }
}

/* ==========================================================================
   4. Responsive
   ========================================================================== */

@media (max-width: 640px) {
	.stides-support {
		right: 12px;
		bottom: 16px;
	}

	.stides-support__btn {
		padding: 12px 18px;
		font-size: 12.5px;
		letter-spacing: 1px;
	}

	.stides-support__panel {
		width: 282px;
		bottom: 60px;
	}

	.stides-modal {
		padding: 12px;
	}

	.stides-modal__card {
		padding: 32px 20px 22px;
		border-radius: 16px;
	}

	.stides-modal__title {
		font-size: 22px;
	}

	.stides-modal__intro {
		font-size: 14.5px;
		margin-bottom: 18px;
	}

	.stides-modal__facts {
		grid-template-columns: 1fr;
	}

	.stides-modal__cta {
		font-size: 14px;
		padding: 17px 16px;
		gap: 11px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.stides-support.open .stides-support__panel,
	.stides-modal__backdrop,
	.stides-modal__card,
	.stides-support__btn,
	.stides-support__btn::after,
	.stides-support__btn svg,
	.stides-toast,
	.stides-toast__ic,
	.stides-toast__bar {
		animation: none;
	}

	.stides-support__btn::after {
		box-shadow: none;
	}

	/* keep the notification visible without the pop animation */
	.stides-toast.is-in .stides-toast__inner {
		animation: none;
		opacity: 1;
		transform: none;
	}
}
