/*
 * Create Cookie Consent - the nuviewtreatment.com cookie banner and
 * preferences window, styled as part of createrecoverycenter.com:
 *
 *   colors   Elementor kit: primary #F1B753, secondary #41674D, text #212321
 *   body     Poppins 18px / 300 / 1.6   (same on mobile)
 *   headings 20px / 600 card title, 60px / 300 section title
 *            (18 / 32 on tablet, 16 / 28 on mobile)
 *   button   "Call (866) 885-3042": gold uppercase pill 16px / 600 with a
 *            separate 64px white arrow circle outlined in gold; on mobile the
 *            pill gets smaller padding and the circle is hidden
 *
 * Everything is scoped under #crcc so theme/Elementor styles for button, h2,
 * p and a don't leak in (Hello Elementor colors every <button> pink).
 */

#crcc {
	--crcc-primary: #F1B753;
	--crcc-primary-soft: #FFF8ED;
	--crcc-secondary: #41674D;
	--crcc-text: #212321;
	--crcc-muted: #8E8B8B;
	--crcc-border: #EDEDED;
	--crcc-surface: #F8F8F8;
	--crcc-white: #FFFFFF;
	--crcc-font: "Poppins", sans-serif;
	font-family: var(--crcc-font);
	font-size: 18px;
	font-weight: 300;
	line-height: 1.6;
	color: var(--crcc-text);
	-webkit-font-smoothing: antialiased;
}

#crcc *,
#crcc *::before,
#crcc *::after {
	box-sizing: border-box;
}

#crcc [hidden] {
	display: none !important;
}

#crcc p {
	margin: 0 0 6px;
	padding: 0;
	font-family: var(--crcc-font);
	color: var(--crcc-text);
	letter-spacing: normal;
	text-transform: none;
}

#crcc a {
	color: var(--crcc-secondary);
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	font-weight: 500;
	text-decoration: none;
	box-shadow: none;
}

#crcc a:hover,
#crcc a:focus-visible {
	text-decoration: underline;
}

#crcc button {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font-family: var(--crcc-font);
	letter-spacing: normal;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
}

#crcc button:focus-visible,
#crcc a:focus-visible {
	outline: 2px solid var(--crcc-text);
	outline-offset: 3px;
}

/* ---------- Bottom banner (page stays usable) ---------- */

#crcc .crcc-banner {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	/* Highest possible layer: above the Tawk chat bubble and the OneTap
	   accessibility button, which also use the maximum (later element wins). */
	z-index: 2147483647;
	display: flex;
	justify-content: center;
	pointer-events: none; /* clicks pass through the empty space around the card */
}

#crcc .crcc-banner__content {
	pointer-events: auto;
	width: 100%;
	max-width: 1280px;
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 24px 32px;
	border-radius: 16px;
	background-color: var(--crcc-white);
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
	text-align: left;
}

#crcc .crcc-banner__icon {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	margin: 0;
	border: 0;
	box-shadow: none;
}

#crcc .crcc-banner__text {
	flex: 1;
	min-width: 0;
}

#crcc .crcc-banner__text p {
	font-size: 18px;
	font-weight: 300;
	line-height: 1.6;
}

#crcc .crcc-banner__text p:last-child {
	margin-bottom: 0;
}

#crcc .crcc-banner__title {
	font-size: 20px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
}

/* ---------- Text link buttons ("Manage Settings", "Reject Non-Essential Cookies") ---------- */

#crcc .crcc-link {
	padding: 0;
	color: var(--crcc-text);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

#crcc .crcc-link:hover {
	color: var(--crcc-secondary);
	background: none;
}

/* ---------- Primary button: gold uppercase pill + separate outlined arrow circle ---------- */

#crcc .crcc-btn {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	gap: 0;
	padding: 0;
	background: none;
	color: var(--crcc-white);
	font-size: 16px;
	font-weight: 600;
	line-height: 16px;
	text-transform: uppercase;
	white-space: nowrap;
}

#crcc .crcc-btn:hover,
#crcc .crcc-btn:focus-visible {
	background: none;
	color: var(--crcc-white);
}

#crcc .crcc-btn__text {
	display: block;
	padding: 24px 48px;
	border-radius: 100px;
	background-color: var(--crcc-primary);
	line-height: 16px;
	transition: filter 0.3s;
}

#crcc .crcc-btn:hover .crcc-btn__text {
	filter: brightness(0.95);
}

#crcc .crcc-btn__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 64px;
	height: 64px;
	border: 1px solid var(--crcc-primary);
	border-radius: 50%;
	background-color: var(--crcc-white);
	color: var(--crcc-primary);
}

#crcc .crcc-btn__icon svg {
	display: block;
	width: 32px;
	height: 32px;
}

/* ---------- Preferences window ---------- */

#crcc .crcc-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background-color: rgba(0, 0, 0, 0.4);
}

#crcc .crcc-modal {
	position: relative;
	width: 100%;
	max-width: 760px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	border-radius: 16px;
	background-color: var(--crcc-white);
	box-shadow: 0 0 50px rgba(0, 0, 0, 0.2);
	text-align: center;
	outline: none;
}

#crcc .crcc-modal__header {
	position: relative;
	padding: 40px 48px 0;
}

#crcc .crcc-modal__title {
	margin: 0;
	padding: 0;
	font-family: var(--crcc-font);
	font-size: 60px;
	font-weight: 300;
	line-height: 1.3;
	color: var(--crcc-text);
	letter-spacing: normal;
	text-transform: none;
}

#crcc .crcc-close {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 36px;
	padding: 8px 12px;
	border-radius: 0 16px 0 8px;
	background-color: var(--crcc-surface);
	color: var(--crcc-text);
}

#crcc .crcc-close:hover {
	background-color: var(--crcc-border);
	color: var(--crcc-text);
}

#crcc .crcc-close svg {
	width: 16px;
	height: 16px;
}

#crcc .crcc-modal__body {
	padding: 32px 48px;
}

#crcc .crcc-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: -1px;
	padding: 16px;
	border: 1px solid var(--crcc-border);
}

#crcc .crcc-option__info {
	flex: 1;
	min-width: 0;
	text-align: left;
}

#crcc .crcc-option__title {
	margin-bottom: 4px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
}

#crcc .crcc-option__desc {
	margin-bottom: 0;
	font-size: 18px;
	font-weight: 300;
	line-height: 1.6;
}

#crcc .crcc-modal__actions {
	padding: 0 48px 40px;
}

#crcc .crcc-actions,
#crcc .crcc-modal__actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
}

#crcc .crcc-actions {
	flex-shrink: 0;
}

/* ---------- On/off switch ---------- */

#crcc .crcc-switch {
	position: relative;
	display: block;
	flex-shrink: 0;
	width: 56px;
	height: 28px;
	margin: 0;
	cursor: pointer;
}

#crcc .crcc-switch__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: inherit;
	z-index: 1;
}

#crcc .crcc-switch__track {
	position: absolute;
	inset: 0;
	border-radius: 50px;
	background-color: var(--crcc-surface);
	transition: background-color 0.3s ease-in-out;
}

#crcc .crcc-switch__track::after {
	content: "";
	position: absolute;
	top: 4px;
	left: 4px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background-color: var(--crcc-muted);
	transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

#crcc .crcc-switch__input:checked + .crcc-switch__track {
	background-color: var(--crcc-primary-soft);
}

#crcc .crcc-switch__input:checked + .crcc-switch__track::after {
	transform: translateX(28px);
	background-color: var(--crcc-primary);
}

#crcc .crcc-switch__input:focus-visible + .crcc-switch__track {
	outline: 2px solid var(--crcc-text);
	outline-offset: 3px;
}

#crcc .crcc-switch--locked {
	cursor: not-allowed;
}

/* ---------- Responsive ---------- */

/* Create's tablet type scale (Elementor tablet breakpoint): body text stays 18px. */
@media screen and (max-width: 1024px) {
	#crcc .crcc-banner__title {
		font-size: 18px !important;
	}

	#crcc .crcc-option__title {
		font-size: 18px;
	}

	#crcc .crcc-modal__title {
		font-size: 32px;
		line-height: 1.3;
	}
}

@media screen and (max-width: 991.98px) {
	#crcc .crcc-banner__content {
		flex-wrap: wrap;
		gap: 16px;
		padding: 20px 24px;
	}

	#crcc .crcc-banner__text {
		flex-basis: calc(100% - 72px);
	}

	#crcc .crcc-actions {
		width: 100%;
		justify-content: space-around;
		gap: 16px;
	}

	#crcc .crcc-modal__header {
		padding: 24px 24px 0;
	}

	#crcc .crcc-modal__body {
		padding: 24px;
	}

	#crcc .crcc-modal__actions {
		padding: 0 24px 24px;
		gap: 16px;
	}
}

/* Create's mobile type scale: body text stays 18px, titles and the button shrink. */
@media screen and (max-width: 767.98px) {
	#crcc .crcc-banner {
		left: 8px;
		right: 8px;
		bottom: calc(8px + env(safe-area-inset-bottom, 0px));
	}

	#crcc .crcc-banner__content {
		padding: 16px;
	}

	#crcc .crcc-banner__icon {
		display: none;
	}

	#crcc .crcc-banner__text {
		flex-basis: 100%;
	}

	#crcc .crcc-banner__title {
		font-size: 16px !important;
		line-height: 1.5 !important;
	}

	#crcc .crcc-actions,
	#crcc .crcc-modal__actions {
		flex-wrap: wrap-reverse;
		justify-content: center;
		gap: 12px 24px;
	}

	#crcc .crcc-link {
		font-size: 14px;
	}

	#crcc .crcc-modal__title {
		padding: 0 24px;
		font-size: 28px;
		line-height: 40px;
	}

	#crcc .crcc-option__title {
		font-size: 16px;
		line-height: 1.5;
	}

	/* Same as the site's mobile "Call (866) 885-3042" button: smaller pill, no arrow circle. */
	#crcc .crcc-btn__text {
		padding: 16px 32px;
	}

	#crcc .crcc-btn__icon {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	#crcc *,
	#crcc *::before,
	#crcc *::after {
		transition: none !important;
	}
}
