/* DentalQore Cookie Policy - front-end styles
   All selectors are namespaced with .dqcp- / .dq-privacy-choices.
   Override colors per site with --dqcp-* custom properties. */

:root {
	--dqcp-primary: #1a1a1a;
	--dqcp-primary-text: #ffffff;
	--dqcp-bg: #ffffff;
	--dqcp-text: #1f1f1f;
	--dqcp-muted: #4a4a4a;
	--dqcp-border: #d6d6d6;
	--dqcp-focus: #005fcc;
	--dqcp-radius: 6px;
	--dqcp-font: Arial, Helvetica, sans-serif;
	--dqcp-z: 2147483000;
}

.dqcp-banner,
.dqcp-overlay,
.dq-privacy-choices--auto {
	font-family: var(--dqcp-font);
	font-size: 15px;
	line-height: 1.5;
	color: var(--dqcp-text);
	box-sizing: border-box;
}
.dqcp-banner *,
.dqcp-overlay * {
	box-sizing: border-box;
	font-family: var(--dqcp-font);
}

/* ---------- Banner ---------- */

.dqcp-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: var(--dqcp-z);
	background: var(--dqcp-bg);
	border-top: 1px solid var(--dqcp-border);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
	padding: 12px 16px;
	max-height: 60vh;
	overflow-y: auto;
}
.dqcp-banner__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 24px;
}
.dqcp-banner__text {
	flex: 1 1 auto;
	font-size: 13px;
	line-height: 1.4;
}
.dqcp-banner h2.dqcp-heading {
	font-size: 15px;
	margin: 0 0 2px;
}
.dqcp-banner__text p {
	margin: 0;
}
.dqcp-banner__actions {
	flex: 0 0 auto;
	margin-top: 0;
}
.dqcp-banner .dqcp-btn {
	padding: 9px 16px;
	min-height: 38px;
	font-size: 13px;
	white-space: nowrap;
}
.dqcp-banner .dqcp-btn--choice {
	flex: 0 0 auto;
}
/* Themes style h2/h3 directly, so headings must reset every inherited-looking property. */
.dqcp-banner h2.dqcp-heading,
.dqcp-modal h2.dqcp-heading,
.dqcp-modal h3.dqcp-category__name {
	font-family: var(--dqcp-font);
	font-style: normal;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	text-align: left;
	text-shadow: none;
	padding: 0;
	border: 0;
	background: none;
	color: var(--dqcp-text);
}
.dqcp-heading {
	margin: 0 0 10px;
	font-size: 20px;
}
.dqcp-modal p {
	margin: 0 0 10px;
}
.dqcp-banner__text p,
.dqcp-modal p {
	color: var(--dqcp-muted);
}
.dqcp-banner__text a,
.dqcp-modal a {
	color: var(--dqcp-text);
	text-decoration: underline;
}
.dqcp-banner__actions,
.dqcp-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

/* ---------- Buttons: accept and reject are always identical ---------- */

.dqcp-btn {
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	border-radius: var(--dqcp-radius);
	border: 2px solid var(--dqcp-primary);
	padding: 12px 20px;
	min-height: 46px;
	line-height: 1.2;
	background: var(--dqcp-primary);
	color: var(--dqcp-primary-text);
	text-align: center;
	transition: filter 0.15s ease;
}
.dqcp-btn:hover {
	filter: brightness(1.15);
}
.dqcp-btn:focus-visible,
.dqcp-switch__input:focus-visible + .dqcp-switch__track,
.dq-privacy-choices--auto:focus-visible {
	outline: 3px solid var(--dqcp-focus);
	outline-offset: 2px;
}
.dqcp-btn--choice {
	flex: 1 1 200px;
}
.dqcp-btn--secondary {
	background: transparent;
	color: var(--dqcp-primary);
}
.dqcp-btn--secondary:hover {
	background: rgba(0, 0, 0, 0.05);
	filter: none;
}

/* ---------- Modal ---------- */

.dqcp-overlay {
	position: fixed;
	inset: 0;
	top: 0; left: 0; right: 0; bottom: 0;
	z-index: calc(var(--dqcp-z) + 1);
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.dqcp-modal {
	position: relative;
	background: var(--dqcp-bg);
	border-radius: var(--dqcp-radius);
	max-width: 640px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 28px 24px 24px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.dqcp-modal:focus {
	outline: none;
}
.dqcp-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 40px;
	min-height: 40px;
	padding: 0;
	font-size: 26px;
	line-height: 1;
	border-color: transparent;
	background: transparent;
	color: var(--dqcp-text);
}
.dqcp-modal__close:hover {
	background: rgba(0, 0, 0, 0.06);
	filter: none;
}
.dqcp-modal__intro {
	margin-bottom: 14px;
}

.dqcp-categories {
	border-top: 1px solid var(--dqcp-border);
	margin: 16px 0 6px;
}
.dqcp-category {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--dqcp-border);
}
.dqcp-modal h3.dqcp-category__name {
	margin: 0 0 4px;
	font-size: 16px;
}
.dqcp-category__desc {
	margin: 0;
	font-size: 14px;
}
.dqcp-category__control {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	padding-top: 2px;
}
.dqcp-switch__status {
	font-size: 13px;
	font-weight: 600;
	color: var(--dqcp-muted);
}

/* ---------- Switch ---------- */

.dqcp-switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 28px;
	cursor: pointer;
}
.dqcp-switch__input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}
.dqcp-switch__track {
	position: absolute;
	inset: 0;
	top: 0; left: 0; right: 0; bottom: 0;
	background: #8a8a8a;
	border-radius: 14px;
	transition: background 0.15s ease;
}
.dqcp-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s ease;
}
.dqcp-switch__input:checked + .dqcp-switch__track {
	background: var(--dqcp-primary);
}
.dqcp-switch__input:checked + .dqcp-switch__track::after {
	transform: translateX(22px);
}
.dqcp-switch__input:disabled + .dqcp-switch__track {
	opacity: 0.55;
	cursor: not-allowed;
}
.dqcp-switch__input:disabled {
	cursor: not-allowed;
}

.dqcp-gpc-note {
	font-size: 13px;
	font-style: italic;
	margin-top: 6px;
}

.dqcp-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Persistent footer link (auto-injected variant) ---------- */

.dq-privacy-choices--auto {
	position: fixed;
	bottom: 10px;
	z-index: calc(var(--dqcp-z) - 1);
	font-size: 12px;
	line-height: 1;
	padding: 7px 10px;
	border-radius: var(--dqcp-radius);
	background: rgba(255, 255, 255, 0.92);
	color: var(--dqcp-text);
	border: 1px solid var(--dqcp-border);
	text-decoration: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.dq-privacy-choices--left {
	left: 10px;
}
.dq-privacy-choices--right {
	right: 10px;
}
.dq-privacy-choices--auto:hover {
	text-decoration: underline;
}
/* Hide the floating link while the banner is up (the banner covers it anyway). */
.dqcp-banner-open .dq-privacy-choices--auto {
	display: none;
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
	.dqcp-banner__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	.dqcp-banner__actions {
		gap: 8px;
	}
	.dqcp-banner .dqcp-btn--choice {
		flex: 1 1 calc(50% - 4px);
	}
	.dqcp-banner .dqcp-btn--secondary {
		flex-basis: 100%;
		border-color: transparent;
		min-height: 32px;
		padding: 4px 8px;
		text-decoration: underline;
	}
}

@media (max-width: 640px) {
	.dqcp-banner {
		padding: 10px 12px;
	}
	.dqcp-banner__text {
		font-size: 12px;
	}
	.dqcp-banner h2.dqcp-heading {
		font-size: 14px;
	}
	.dqcp-modal h2.dqcp-heading {
		font-size: 18px;
	}
	.dqcp-modal__actions {
		flex-direction: column;
	}
	.dqcp-modal .dqcp-btn--choice {
		flex-basis: auto;
		width: 100%;
	}
	.dqcp-modal {
		padding: 24px 16px 16px;
	}
	.dqcp-category {
		flex-direction: column;
		gap: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dqcp-btn,
	.dqcp-switch__track,
	.dqcp-switch__track::after {
		transition: none;
	}
}
