/* TPH Sale Promotions */
:root {
	--tph-main: #3E2A5C;
	--tph-accent: #C9A227;
	--tph-ink: #2a1d3f;
	--tph-cream: #fbf7ee;
}

/* ------------------------------------------------------------- top bar */

.tph-sale-bar[hidden] { display: none !important; }

.tph-sale-bar {
	position: relative;
	z-index: 100000;
	background: var(--tph-main);
	color: #fff;
	border-bottom: 2px solid var(--tph-accent);
	font-size: 14px;
	line-height: 1.45;
	text-align: center;
}

.tph-sale-bar__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 9px 16px;
	letter-spacing: .01em;
	text-wrap: balance;
}

.tph-sale-bar .tph-code {
	display: inline-block;
	padding: 0 6px;
	border-radius: 3px;
	background: var(--tph-accent);
	color: var(--tph-ink);
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1.5;
}

/* Divi's transparent header is absolutely positioned at the top of the page:
   anchor it to the page container so it sits below the bar instead of over it. */
.tph-has-bar #page-container { position: relative; }

@media (max-width: 767px) {
	.tph-sale-bar { font-size: 12.5px; }
	.tph-sale-bar__inner { padding: 7px 12px; }
}

/* -------------------------------------------------------------- code box */

.tph-codebox {
	display: inline-flex;
	align-items: stretch;
	max-width: 100%;
	border: 2px dashed var(--tph-accent);
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}

.tph-codebox__code {
	display: flex;
	align-items: center;
	padding: 8px 14px;
	color: var(--tph-main);
	font-size: 20px;
	font-weight: 800;
	letter-spacing: .08em;
	line-height: 1.2;
	user-select: all;
	-webkit-user-select: all;
	white-space: nowrap;
}

.tph-copy {
	flex: none;
	margin: 0;
	padding: 8px 16px;
	border: 0;
	background: var(--tph-accent);
	color: var(--tph-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color .15s ease, transform .1s ease;
}

.tph-copy:hover { background: #d8b440; }
.tph-copy:active { transform: scale(.97); }
.tph-copy:focus-visible { outline: 3px solid var(--tph-main); outline-offset: -3px; }
.tph-copy.is-copied { background: #2f7a4f; color: #fff; }

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

.tph-sale-banner {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px 32px;
	width: 80%;
	max-width: 1080px;
	margin: 0 auto 30px;
	padding: 22px 28px;
	border: 1px solid var(--tph-accent);
	border-left: 6px solid var(--tph-accent);
	border-radius: 10px;
	background:
		radial-gradient(circle at 92% 18%, rgba(201, 162, 39, .22) 0, rgba(201, 162, 39, 0) 38%),
		var(--tph-main);
	color: #fff;
	box-shadow: 0 8px 24px rgba(62, 42, 92, .18);
}

.tph-sale-banner p { margin: 0; padding: 0; }

.tph-sale-banner__eyebrow {
	color: var(--tph-accent);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.tph-sale-banner__offer {
	margin-top: 4px !important;
	color: #fff;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
}

.tph-sale-banner__ends {
	margin-top: 6px !important;
	color: rgba(255, 255, 255, .8);
	font-size: 14px;
}

.tph-sale-banner__action { text-align: right; }

.tph-sale-banner__label {
	margin-bottom: 6px !important;
	color: rgba(255, 255, 255, .8);
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.tph-sale-banner__note {
	margin-top: 8px !important;
	color: #fff;
	font-size: 14px;
}

@media (max-width: 980px) {
	.tph-sale-banner {
		flex-direction: column;
		align-items: flex-start;
		width: 90%;
		padding: 20px;
	}
	.tph-sale-banner__action { text-align: left; }
	.tph-sale-banner__offer { font-size: 22px; }
}

/* --------------------------------------------------------------- popup */

.tph-popup {
	box-sizing: border-box;
	position: fixed;
	z-index: 100001;
	width: 340px;
	max-width: calc(100vw - 32px);
	padding: 22px 22px 18px;
	border: 1px solid var(--tph-accent);
	border-radius: 14px;
	background:
		radial-gradient(circle at 85% 12%, rgba(201, 162, 39, .25) 0, rgba(201, 162, 39, 0) 42%),
		var(--tph-main);
	color: #fff;
	text-align: center;
	box-shadow: 0 18px 48px rgba(20, 10, 35, .35);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease;
}

/* sale.js picks the first corner that keeps every Select button uncovered.
   Right-hand corners sit higher to clear the chat bubble and "Book a session" button. */
.tph-popup[data-dock$="left"] { left: 24px; }
.tph-popup[data-dock$="right"] { right: 24px; }
.tph-popup[data-dock="bottom-left"] { bottom: 24px; }
.tph-popup[data-dock="bottom-right"] { bottom: 110px; }
.tph-popup[data-dock^="top"] { top: 24px; }
.tph-popup.is-open { opacity: 1; transform: none; }
.tph-popup.is-open.is-tucked { opacity: 0; pointer-events: none; }

.tph-popup p { margin: 0; padding: 0; }

.tph-popup__moon {
	width: 30px;
	height: 30px;
	margin: 0 auto 8px !important;
	border-radius: 50%;
	box-shadow: inset -8px 3px 0 0 var(--tph-accent);
	transform: rotate(-20deg);
}

.tph-popup .tph-popup__title {
	padding: 0 28px;
	color: var(--tph-accent);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .14em;
	line-height: 1.4;
	text-transform: uppercase;
}

.tph-popup__offer {
	margin: 4px 0 14px !important;
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
}

.tph-popup__note { margin-top: 12px !important; font-size: 14px; line-height: 1.4; }
.tph-popup__ends { margin-top: 6px !important; color: rgba(255, 255, 255, .75); font-size: 13px; }

.tph-popup__close {
	position: absolute;
	top: 6px;
	right: 6px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.tph-popup__close:hover { background: rgba(255, 255, 255, .12); }
.tph-popup__close:focus-visible { outline: 2px solid var(--tph-accent); }

/* Tablets and phones: narrow card that fits beside the left-aligned Select buttons. */
@media (max-width: 980px) {
	.tph-popup {
		width: 200px;
		padding: 14px 12px 12px;
		border-radius: 12px;
		text-align: left;
	}
	.tph-popup[data-dock$="left"] { left: 10px; }
	.tph-popup[data-dock$="right"] { right: 10px; }
	.tph-popup[data-dock="bottom-left"] { bottom: 12px; }
	.tph-popup[data-dock="bottom-right"] { bottom: 96px; }
	.tph-popup[data-dock^="top"] { top: 12px; }
	.tph-popup__moon { display: none; }
	.tph-popup__close { top: 2px; right: 2px; width: 36px; height: 36px; }
	.tph-popup .tph-popup__title { padding-right: 30px; font-size: 10.5px; letter-spacing: .1em; }
	.tph-popup__offer { margin: 2px 0 10px !important; font-size: 17px; }
	.tph-popup .tph-codebox { display: flex; flex-direction: column; width: 100%; }
	.tph-popup .tph-codebox__code { justify-content: center; padding: 6px 8px; font-size: 18px; }
	.tph-popup .tph-copy { padding: 8px; font-size: 13px; }
	.tph-popup__note { margin-top: 8px !important; font-size: 12.5px; line-height: 1.35; }
	.tph-popup__ends { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.tph-popup, .tph-copy { transition: none; }
	.tph-popup { transform: none; }
}
