/*
 * CaryTamura cookie consent — the banner, the "Your Privacy Choices" panel
 * and the footer link that reopens it (consent.js builds all three).
 *
 * SCOPE. Site-wide, like the consent itself. Every rule is scoped to the
 * #ct-consent-banner / .ct-consent-* elements consent.js creates, so nothing
 * else on a page is reached.
 *
 * VALUES. Measured from carytamura.com's own consent banner (Luxury Presence
 * lp-consent 1.3.0) at 1440, 1024, 768 and 375 wide (FACT): a white bar fixed
 * clamp(8px, 4vw, 32px) from the bottom and sides with a soft 16px shadow;
 * a 24px title over 12px grey copy; 12px bold uppercase buttons, the primary
 * one black; one row from 768, stacked below. The panel: 580px wide on a 55%
 * veil, toggle switches, Cancel and Save My Preferences.
 *
 * LAYERING. Both sit above everything else on the page, as live's do,
 * including the Elementor popups (z-index 9999).
 */

/* ---------------------------------------------------------------- banner -- */
#ct-consent-banner {
	position: fixed;
	right: clamp(8px, 4vw, 32px);
	bottom: clamp(8px, 4vw, 32px);
	left: clamp(8px, 4vw, 32px);
	z-index: 2147483645;
	display: flex;
	flex-direction: column;
	gap: clamp(16px, 3vw, 24px);
	padding: 20px 24px;
	background: #fff;
	box-shadow: 0 0 16px rgba(0, 0, 0, 0.16);
	font-family: var(--ct-font-body);
	color: #404040;
	text-align: left;
}

.ct-consent-banner__body {
	flex: 1;
	min-width: 0;
}

#ct-consent-banner .ct-consent-banner__title,
.ct-consent-modal .ct-consent-modal__title {
	margin: 0 0 8px;
	font-family: var(--ct-font-body);
	font-size: 24px;
	font-weight: 400;
	line-height: 1.33;
	letter-spacing: normal;
	text-transform: none;
	color: #000;
}

#ct-consent-banner .ct-consent-banner__text,
.ct-consent-modal .ct-consent-modal__intro,
.ct-consent-modal .ct-consent-modal__category-description {
	margin: 0;
	font-family: var(--ct-font-body);
	font-size: 12px;
	line-height: 1.6;
	letter-spacing: normal;
	color: #404040;
}

.ct-consent-banner__actions {
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	gap: 12px;
}

/* Buttons: the parent theme styles every <button>, so each property is set. */
#ct-consent-banner .ct-consent-button,
.ct-consent-modal .ct-consent-button {
	margin: 0;
	padding: 12px 24px;
	border: 1px solid #e7e7e7;
	border-radius: 0;
	background: #fff;
	font-family: var(--ct-font-body);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.33;
	letter-spacing: normal;
	text-transform: uppercase;
	color: #000;
	cursor: pointer;
	transition: none;
}

#ct-consent-banner .ct-consent-button:hover,
.ct-consent-modal .ct-consent-button:hover {
	border-color: #000;
	background: #fff;
	color: #000;
}

#ct-consent-banner .ct-consent-button--primary,
.ct-consent-modal .ct-consent-button--primary,
#ct-consent-banner .ct-consent-button--primary:hover,
.ct-consent-modal .ct-consent-button--primary:hover {
	border-color: #000;
	background: #000;
	color: #fff;
}

#ct-consent-banner .ct-consent-button:focus-visible,
.ct-consent-modal .ct-consent-button:focus-visible,
.ct-consent-modal .ct-consent-modal__close:focus-visible,
.ct-consent-footer-link .ct-consent-link:focus-visible {
	outline: 2px solid #4a90e2;
	outline-offset: 2px;
}

@media (min-width: 768px) {
	#ct-consent-banner {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: clamp(24px, 4vw, 48px);
	}

	.ct-consent-banner__body {
		flex: 1 1 20rem;
	}

	.ct-consent-banner__actions {
		flex-direction: row;
	}
}

/* ----------------------------------------------------------------- panel -- */
.ct-consent-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483646;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(8px, 4vw, 24px);
	background: rgba(0, 0, 0, 0.55);
}

.ct-consent-modal__dialog {
	position: relative;
	width: min(580px, 100%);
	max-height: 88vh;
	overflow: auto;
	padding: 24px;
	background: #fff;
	box-shadow: 0 0 16px rgba(0, 0, 0, 0.16);
	font-family: var(--ct-font-body);
	color: #404040;
	text-align: left;
}

.ct-consent-modal .ct-consent-modal__intro {
	margin-bottom: 16px;
}

.ct-consent-modal .ct-consent-modal__close {
	position: absolute;
	top: 24px;
	right: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	line-height: 0;
	color: #000;
	cursor: pointer;
}

.ct-consent-modal .ct-consent-modal__close:hover {
	background: none;
	color: #000;
}

.ct-consent-modal__category {
	padding: 16px 0 20px;
	border-top: 1px solid #f3f3f3;
}

.ct-consent-modal__category:first-of-type {
	padding-top: 0;
	border-top: 0;
}

.ct-consent-modal__category-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.ct-consent-modal .ct-consent-modal__category-title {
	margin: 0;
	font-family: var(--ct-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.15;
	color: #000;
}

.ct-consent-modal .ct-consent-modal__category-description {
	margin-top: 8px;
}

.ct-consent-modal__always-active {
	flex-shrink: 0;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.33;
	white-space: nowrap;
	color: #06623b;
}

/* The category switch: a 40 x 24 track, black when on. */
.ct-consent-modal .ct-consent-modal__switch {
	position: relative;
	display: inline-block;
	flex-shrink: 0;
	width: 40px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	outline: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.ct-consent-modal .ct-consent-modal__switch:hover {
	background: transparent;
}

.ct-consent-modal .ct-consent-modal__switch:focus-visible {
	box-shadow: 0 0 0 2px #4a90e2;
}

.ct-consent-modal__switch-track {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 12px;
	background: #bbb;
	transition: background 0.15s;
}

.ct-consent-modal__switch[aria-checked="true"] .ct-consent-modal__switch-track {
	background: #000;
}

.ct-consent-modal__switch-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);
	transition: transform 0.15s;
}

.ct-consent-modal__switch[aria-checked="true"] .ct-consent-modal__switch-thumb {
	transform: translateX(16px);
}

.ct-consent-modal__actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 24px;
}

@media (min-width: 768px) {
	.ct-consent-modal__actions {
		flex-direction: row;
	}

	.ct-consent-modal .ct-consent-modal__actions .ct-consent-button {
		flex: 1;
	}
}

/* ----------------------------------------------------------- footer link -- */
.ct-consent-footer-link {
	padding: 12px;
	font-family: var(--ct-font-body);
	font-size: 12px;
	text-align: center;
	color: rgba(0, 0, 0, 0.8);
}

.ct-consent-footer-link .ct-consent-link {
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
	.ct-consent-modal__switch-track,
	.ct-consent-modal__switch-thumb {
		transition: none;
	}
}
