/* The Plus Addons - Cookie Notice */
/* Tokens live on the widget element so the re-open button (a sibling of the banner) can use them too. */
.elementor-widget-tp-cookie-notice {
	--tp-cn-bg: #ffffff;
	--tp-cn-text: #1f2937;
	--tp-cn-accent: #2563eb;
	--tp-cn-accent-text: #ffffff;
	--tp-cn-muted-bg: #f3f4f6;
}

.tp-cookie-notice {
	position: fixed;
	z-index: 99999;
	left: 0;
	right: 0;
	display: flex;
	pointer-events: none;
}

.tp-cookie-notice[hidden] {
	display: none !important;
}

.tp-cn-box {
	pointer-events: auto;
	box-sizing: border-box;
	background: var(--tp-cn-bg);
	color: var(--tp-cn-text);
	padding: 20px 24px;
	display: flex;
	align-items: center;
	gap: 20px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
	outline: none;
}

.tp-cn-text {
	flex: 1 1 auto;
	min-width: 0;
}

.tp-cn-title {
	font-weight: 600;
	font-size: 17px;
	line-height: 1.3;
	margin: 0 0 6px;
}

.tp-cn-message {
	font-size: 14px;
	line-height: 1.55;
}

.tp-cn-message p {
	margin: 0 0 6px;
}

.tp-cn-message p:last-child {
	margin-bottom: 0;
}

.tp-cn-message a,
.tp-cn-policy {
	color: var(--tp-cn-accent);
	text-decoration: underline;
}

.tp-cn-actions {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/*
 * Button rules carry the widget class so they outrank theme/kit button resets
 * (for example Hello Elementor's [type="button"] and .elementor-kit-N button).
 */
.elementor-widget-tp-cookie-notice .tp-cn-btn,
.elementor-widget-tp-cookie-notice .tp-cn-reopen {
	cursor: pointer;
	border: 1px solid transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	padding: 11px 20px;
	border-radius: 6px;
	text-transform: none;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.elementor-widget-tp-cookie-notice .tp-cn-accept,
.elementor-widget-tp-cookie-notice .tp-cn-reopen {
	background: var(--tp-cn-accent);
	color: var(--tp-cn-accent-text);
}

.elementor-widget-tp-cookie-notice .tp-cn-accept:hover,
.elementor-widget-tp-cookie-notice .tp-cn-accept:focus-visible {
	background: var(--tp-cn-accent);
	color: var(--tp-cn-accent-text);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.elementor-widget-tp-cookie-notice .tp-cn-decline {
	background: var(--tp-cn-muted-bg);
	color: var(--tp-cn-text);
}

.elementor-widget-tp-cookie-notice .tp-cn-decline:hover,
.elementor-widget-tp-cookie-notice .tp-cn-decline:focus-visible {
	background: var(--tp-cn-muted-bg);
	color: var(--tp-cn-text);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.elementor-widget-tp-cookie-notice .tp-cn-reopen:hover,
.elementor-widget-tp-cookie-notice .tp-cn-reopen:focus-visible {
	background: var(--tp-cn-accent);
	color: var(--tp-cn-accent-text);
}

.tp-cn-btn:focus-visible,
.tp-cn-reopen:focus-visible,
.tp-cn-message a:focus-visible {
	outline: 2px solid var(--tp-cn-accent);
	outline-offset: 2px;
}

/* Bars */
.tp-cn-layout-bar-bottom {
	bottom: 0;
	top: auto;
}

.tp-cn-layout-bar-top {
	top: 0;
	bottom: auto;
}

.tp-cn-layout-bar-bottom .tp-cn-box,
.tp-cn-layout-bar-top .tp-cn-box {
	width: 100%;
	border-radius: 0;
}

/* Corner boxes */
.tp-cn-layout-box-left,
.tp-cn-layout-box-right {
	bottom: 0;
	top: auto;
}

.tp-cn-layout-box-left {
	right: auto;
	justify-content: flex-start;
}

.tp-cn-layout-box-right {
	left: auto;
	justify-content: flex-end;
}

.tp-cn-layout-box-left .tp-cn-box,
.tp-cn-layout-box-right .tp-cn-box {
	width: 380px;
	max-width: 100%;
	margin: 20px;
	flex-direction: column;
	align-items: stretch;
	border-radius: 12px;
}

.tp-cn-layout-box-left .tp-cn-actions,
.tp-cn-layout-box-right .tp-cn-actions,
.tp-cn-layout-modal .tp-cn-actions {
	justify-content: flex-end;
}

/* Modal */
.tp-cn-layout-modal {
	top: 0;
	bottom: 0;
	align-items: center;
	justify-content: center;
	pointer-events: auto;
}

.tp-cn-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.tp-cn-layout-modal .tp-cn-box {
	position: relative;
	width: 480px;
	max-width: calc(100% - 32px);
	max-height: calc(100% - 32px);
	overflow: auto;
	flex-direction: column;
	align-items: stretch;
	border-radius: 14px;
}

/* Entrance animation (only once the banner is revealed) */
.tp-cookie-notice.tp-cn-anim-fade.tp-cn-visible .tp-cn-box,
.tp-cookie-notice.tp-cn-anim-fade.tp-cn-visible .tp-cn-overlay {
	animation: tp-cn-fade 0.35s ease both;
}

.tp-cookie-notice.tp-cn-anim-slide.tp-cn-visible .tp-cn-box {
	animation: tp-cn-slide-up 0.35s ease both;
}

.tp-cookie-notice.tp-cn-anim-slide.tp-cn-layout-bar-top.tp-cn-visible .tp-cn-box {
	animation-name: tp-cn-slide-down;
}

.tp-cookie-notice.tp-cn-anim-slide.tp-cn-visible .tp-cn-overlay {
	animation: tp-cn-fade 0.35s ease both;
}

@keyframes tp-cn-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes tp-cn-slide-up {
	from {
		opacity: 0;
		transform: translateY(24px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes tp-cn-slide-down {
	from {
		opacity: 0;
		transform: translateY(-24px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Re-open button */
.tp-cn-reopen {
	position: fixed;
	bottom: 16px;
	z-index: 99999;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.tp-cn-reopen[hidden] {
	display: none !important;
}

.tp-cn-reopen-left {
	left: 16px;
}

.tp-cn-reopen-right {
	right: 16px;
}

/* Editor: render inline so the banner never covers the page */
.tp-cookie-notice.tp-cn-editor {
	position: relative;
	display: block;
	pointer-events: auto;
}

.tp-cookie-notice.tp-cn-editor .tp-cn-overlay {
	display: none;
}

.tp-cookie-notice.tp-cn-editor .tp-cn-box {
	margin: 0;
	width: 100%;
	max-width: 100%;
}

.tp-cn-editor-note {
	padding: 12px 16px;
	font-size: 13px;
	background: #f3f4f6;
	color: #4b5563;
	border: 1px dashed #9ca3af;
	text-align: center;
}

/* Page scroll lock while the modal is open */
body.tp-cn-modal-open {
	overflow: hidden;
}

/* Small screens */
@media (max-width: 767px) {
	.tp-cn-layout-bar-bottom .tp-cn-box,
	.tp-cn-layout-bar-top .tp-cn-box {
		flex-direction: column;
		align-items: stretch;
		padding: 16px;
	}

	.tp-cn-actions {
		justify-content: stretch;
	}

	.tp-cn-actions .tp-cn-btn {
		flex: 1 1 0;
	}

	.tp-cn-layout-box-left .tp-cn-box,
	.tp-cn-layout-box-right .tp-cn-box {
		margin: 12px;
		width: calc(100% - 24px);
	}
}

/* RTL: positions are physical (left/right) on purpose; text and buttons follow dir. */
[dir="rtl"] .tp-cn-box {
	text-align: right;
}

@media (prefers-reduced-motion: reduce) {
	.tp-cookie-notice .tp-cn-box,
	.tp-cookie-notice .tp-cn-overlay {
		animation: none !important;
	}

	.tp-cn-btn,
	.tp-cn-reopen {
		transition: none;
	}
}
