/* EJ Cookie Consent — Frontend Styles (GDPR & Law 219/2026 Anti-Dark-Pattern Compliant) */

:root {
	--ej-cc-bg: #ffffff;
	--ej-cc-text: #1e293b;
	--ej-cc-border: #cbd5e1;
	--ej-cc-btn-bg: #0f172a;
	--ej-cc-btn-text: #ffffff;
	--ej-cc-sec-bg: #f1f5f9;
	--ej-cc-sec-text: #0f172a;
	--ej-cc-radius: 10px;
	--ej-cc-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
	--ej-cc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ej-cc-root,
.ej-cc-root * {
	box-sizing: border-box;
	font-family: var(--ej-cc-font);
}

.ej-cc-root [hidden] {
	display: none !important;
}

html.ej-cc-modal-open {
	overflow: hidden;
}

/* ==========================================================================
   First-Layer Banner
   ========================================================================== */

.ej-cc-banner {
	position: fixed;
	z-index: 999990;
	background: var(--ej-cc-bg);
	color: var(--ej-cc-text);
	border: 1px solid var(--ej-cc-border);
	box-shadow: var(--ej-cc-shadow);
	line-height: 1.5;
	font-size: 14px;
}

.ej-cc-banner.ej-cc-layout-bar_bottom {
	left: 0;
	right: 0;
	bottom: 0;
	border-left: none;
	border-right: none;
	border-bottom: none;
	padding: 20px 24px;
}

.ej-cc-banner.ej-cc-layout-bar_bottom .ej-cc-banner-inner {
	max-width: 1240px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.ej-cc-banner.ej-cc-layout-box_bottom_left {
	left: 20px;
	bottom: 20px;
	max-width: 480px;
	width: calc(100vw - 40px);
	border-radius: var(--ej-cc-radius);
	padding: 22px;
}

.ej-cc-banner.ej-cc-layout-box_bottom_right {
	right: 20px;
	bottom: 20px;
	max-width: 480px;
	width: calc(100vw - 40px);
	border-radius: var(--ej-cc-radius);
	padding: 22px;
}

.ej-cc-banner.ej-cc-layout-modal_center {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 620px;
	width: calc(100vw - 32px);
	border-radius: var(--ej-cc-radius);
	padding: 28px;
}

.ej-cc-banner.ej-cc-layout-box_bottom_left .ej-cc-banner-inner,
.ej-cc-banner.ej-cc-layout-box_bottom_right .ej-cc-banner-inner,
.ej-cc-banner.ej-cc-layout-modal_center .ej-cc-banner-inner {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ej-cc-title {
	margin: 0 0 8px 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--ej-cc-text);
	line-height: 1.3;
}

.ej-cc-desc {
	margin: 0;
	font-size: 13.5px;
	color: var(--ej-cc-text);
	opacity: 0.9;
	line-height: 1.55;
}

.ej-cc-links {
	margin-top: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.ej-cc-links a {
	color: var(--ej-cc-text);
	text-decoration: underline;
	font-size: 13px;
	font-weight: 500;
}

.ej-cc-links a:hover {
	opacity: 0.75;
}

/* Buttons — STRICTLY EQUAL PROMINENCE for Reject All & Accept All (Law 219/2026 Art. 4) */

.ej-cc-banner-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex-shrink: 0;
	align-items: center;
}

.ej-cc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	border-radius: 7px;
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.1s ease;
	text-decoration: none;
	white-space: nowrap;
}

.ej-cc-btn:hover {
	opacity: 0.88;
}

.ej-cc-btn:focus-visible {
	outline: 2px solid var(--ej-cc-btn-bg);
	outline-offset: 2px;
}

.ej-cc-btn-equal {
	background: var(--ej-cc-btn-bg);
	color: var(--ej-cc-btn-text);
	border: 2px solid var(--ej-cc-btn-bg);
	min-width: 138px;
}

.ej-cc-btn-secondary {
	background: var(--ej-cc-sec-bg);
	color: var(--ej-cc-sec-text);
	border: 2px solid var(--ej-cc-border);
}

/* ==========================================================================
   Preferences Modal
   ========================================================================== */

.ej-cc-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(15, 23, 42, 0.58);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.ej-cc-modal {
	background: var(--ej-cc-bg);
	color: var(--ej-cc-text);
	width: 100%;
	max-width: 660px;
	max-height: 88vh;
	border-radius: var(--ej-cc-radius);
	border: 1px solid var(--ej-cc-border);
	box-shadow: var(--ej-cc-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.ej-cc-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	border-bottom: 1px solid var(--ej-cc-border);
}

.ej-cc-modal-header .ej-cc-title {
	margin: 0;
}

.ej-cc-close {
	background: transparent;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: var(--ej-cc-text);
	cursor: pointer;
	padding: 2px 8px;
	border-radius: 6px;
}

.ej-cc-close:hover {
	background: var(--ej-cc-sec-bg);
}

.ej-cc-modal-body {
	padding: 18px 22px;
	overflow-y: auto;
	flex: 1 1 auto;
}

.ej-cc-consent-meta {
	margin: 14px 0;
	padding: 10px 14px;
	background: var(--ej-cc-sec-bg);
	border: 1px solid var(--ej-cc-border);
	border-radius: 6px;
	font-size: 12.5px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
}

.ej-cc-categories {
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ej-cc-cat-card {
	border: 1px solid var(--ej-cc-border);
	border-radius: 8px;
	padding: 14px 16px;
	background: var(--ej-cc-bg);
}

.ej-cc-cat-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.ej-cc-cat-title {
	font-weight: 700;
	font-size: 15px;
}

.ej-cc-cat-count {
	font-size: 12.5px;
	opacity: 0.7;
	margin-left: 4px;
}

.ej-cc-cat-desc {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	opacity: 0.88;
}

.ej-cc-badge-always {
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--ej-cc-sec-bg);
	color: var(--ej-cc-sec-text);
	border: 1px solid var(--ej-cc-border);
}

/* Toggle Switch */

.ej-cc-switch {
	position: relative;
	display: inline-block;
	width: 46px;
	height: 26px;
	flex-shrink: 0;
}

.ej-cc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.ej-cc-slider {
	position: absolute;
	inset: 0;
	cursor: pointer;
	background-color: #94a3b8;
	border-radius: 999px;
	transition: background-color 0.2s ease;
}

.ej-cc-slider::before {
	content: "";
	position: absolute;
	height: 20px;
	width: 20px;
	left: 3px;
	bottom: 3px;
	background-color: #ffffff;
	border-radius: 50%;
	transition: transform 0.2s ease;
}

.ej-cc-switch input:checked + .ej-cc-slider {
	background-color: var(--ej-cc-btn-bg);
}

.ej-cc-switch input:checked + .ej-cc-slider::before {
	transform: translateX(20px);
}

.ej-cc-switch input:focus-visible + .ej-cc-slider {
	outline: 2px solid var(--ej-cc-btn-bg);
	outline-offset: 2px;
}

/* Expandable cookie details inside modal */

.ej-cc-cat-details {
	margin-top: 10px;
	font-size: 12.5px;
}

.ej-cc-cat-details summary {
	cursor: pointer;
	font-weight: 600;
	user-select: none;
}

.ej-cc-mini-list {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ej-cc-mini-item {
	background: var(--ej-cc-sec-bg);
	border-radius: 6px;
	padding: 8px 10px;
}

.ej-cc-mini-top {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

.ej-cc-mini-duration {
	font-size: 11.5px;
	opacity: 0.8;
}

.ej-cc-mini-provider {
	font-size: 12px;
	opacity: 0.85;
	margin-top: 2px;
}

.ej-cc-mini-purpose {
	font-size: 12px;
	margin-top: 3px;
}

.ej-cc-modal-footer {
	padding: 16px 22px;
	border-top: 1px solid var(--ej-cc-border);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
}

.ej-cc-credit {
	padding: 0 22px 12px;
	font-size: 11px;
	line-height: 1.4;
	text-align: center;
	opacity: 0.6;
}

.ej-cc-credit a {
	color: inherit;
	text-decoration: underline;
}

/* ==========================================================================
   Floating Withdrawal Button
   ========================================================================== */

.ej-cc-floating {
	position: fixed;
	bottom: 18px;
	z-index: 999980;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 14px;
	font-size: 13px;
	font-weight: 600;
	background: var(--ej-cc-bg);
	color: var(--ej-cc-text);
	border: 1px solid var(--ej-cc-border);
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ej-cc-floating:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2);
}

.ej-cc-floating.ej-cc-pos-bottom_left {
	left: 18px;
}

.ej-cc-floating.ej-cc-pos-bottom_right {
	right: 18px;
}

/* Theme-proof placement: many themes style every button (e.g. ":is(.btn, button) { position: relative }"),
   with the same specificity as the class above and loaded later. The #ej-cc-root prefix wins over those. */
#ej-cc-root .ej-cc-floating {
	position: fixed;
	top: auto;
	bottom: 18px;
	margin: 0;
	float: none;
	width: auto;
	max-width: calc(100vw - 36px);
	min-height: 0;
	z-index: 999980;
	/* Same look on every theme (themes often force uppercase, square corners or their own colours on buttons). */
	padding: 9px 14px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: normal;
	text-decoration: none;
	background: var(--ej-cc-bg);
	color: var(--ej-cc-text);
	border: 1px solid var(--ej-cc-border);
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

#ej-cc-root .ej-cc-floating:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2);
}

#ej-cc-root .ej-cc-floating.ej-cc-pos-bottom_left {
	left: 18px;
	right: auto;
}

#ej-cc-root .ej-cc-floating.ej-cc-pos-bottom_right {
	right: 18px;
	left: auto;
}

/* ==========================================================================
   Blocked Iframe Placeholder
   ========================================================================== */

.ej-cc-iframe-wrap {
	position: relative;
	display: block;
	width: 100%;
	min-height: 240px;
	background: var(--ej-cc-sec-bg);
	border: 1px solid var(--ej-cc-border);
	border-radius: var(--ej-cc-radius);
	overflow: hidden;
}

.ej-cc-iframe-wrap iframe {
	display: none;
	width: 100%;
}

.ej-cc-iframe-wrap.ej-cc-iframe-unblocked {
	background: transparent;
	border: none;
	min-height: 0;
}

.ej-cc-iframe-wrap.ej-cc-iframe-unblocked .ej-cc-iframe-placeholder {
	display: none;
}

.ej-cc-iframe-wrap.ej-cc-iframe-unblocked iframe {
	display: block;
}

.ej-cc-iframe-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 240px;
	padding: 24px;
	text-align: center;
	color: var(--ej-cc-text);
}

.ej-cc-iframe-placeholder-inner {
	max-width: 440px;
}

.ej-cc-iframe-title {
	display: block;
	font-size: 16px;
	margin-bottom: 8px;
}

.ej-cc-iframe-desc {
	margin: 0 0 14px 0;
	font-size: 13.5px;
	line-height: 1.5;
	opacity: 0.9;
}

.ej-cc-iframe-accept {
	background: var(--ej-cc-btn-bg);
	color: var(--ej-cc-btn-text);
	border: 2px solid var(--ej-cc-btn-bg);
	border-radius: 7px;
	padding: 10px 18px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}

.ej-cc-iframe-accept:hover {
	opacity: 0.88;
}

/* ==========================================================================
   Shortcode [cookie_declaration]
   ========================================================================== */

.ej-cc-declaration {
	font-family: var(--ej-cc-font);
	color: inherit;
	margin: 24px 0;
}

.ej-cc-decl-status-box {
	background: var(--ej-cc-sec-bg);
	color: var(--ej-cc-sec-text);
	border: 1px solid var(--ej-cc-border);
	border-radius: var(--ej-cc-radius);
	padding: 20px;
	margin-bottom: 28px;
}

.ej-cc-decl-heading {
	margin: 0 0 8px 0;
	font-size: 18px;
}

.ej-cc-decl-state-text {
	margin: 0 0 12px 0;
	font-size: 14.5px;
}

.ej-cc-decl-meta-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	font-size: 13px;
	margin-bottom: 12px;
}

.ej-cc-decl-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.ej-cc-pill {
	font-size: 12.5px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid transparent;
}

.ej-cc-pill-on {
	background: #dcfce7;
	color: #166534;
	border-color: #86efac;
}

.ej-cc-pill-off {
	background: #fee2e2;
	color: #991b1b;
	border-color: #fca5a5;
}

.ej-cc-decl-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ej-cc-decl-section {
	margin-bottom: 28px;
}

.ej-cc-decl-cat-title {
	margin: 0 0 6px 0;
	font-size: 18px;
}

.ej-cc-decl-count {
	font-size: 14px;
	font-weight: 400;
	opacity: 0.7;
}

.ej-cc-decl-cat-desc {
	margin: 0 0 12px 0;
	font-size: 14px;
	opacity: 0.88;
}

.ej-cc-table-scroll {
	overflow-x: auto;
	border: 1px solid var(--ej-cc-border);
	border-radius: 8px;
}

.ej-cc-decl-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
	text-align: left;
}

.ej-cc-decl-table th,
.ej-cc-decl-table td {
	padding: 11px 14px;
	border-bottom: 1px solid var(--ej-cc-border);
	vertical-align: top;
}

.ej-cc-decl-table thead th {
	background: var(--ej-cc-sec-bg);
	color: var(--ej-cc-sec-text);
	font-weight: 700;
}

.ej-cc-decl-table tbody tr:last-child td {
	border-bottom: none;
}

/* ==========================================================================
   GDPR Data Access / Erasure Request (DSAR) Form
   ========================================================================== */

.ej-cc-dsar-box {
	margin-top: 32px;
	padding: 24px;
	background: var(--ej-cc-bg);
	color: var(--ej-cc-text);
	border: 1px solid var(--ej-cc-border);
	border-radius: var(--ej-cc-radius);
}

.ej-cc-dsar-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 14px;
}

.ej-cc-dsar-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

.ej-cc-dsar-row {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.ej-cc-dsar-row > label {
	font-size: 13.5px;
	font-weight: 600;
}

.ej-cc-dsar-row input[type="text"],
.ej-cc-dsar-row input[type="email"],
.ej-cc-dsar-row input[type="tel"],
.ej-cc-dsar-row select,
.ej-cc-dsar-row textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--ej-cc-border);
	border-radius: 7px;
	font-size: 14px;
	background: var(--ej-cc-bg);
	color: var(--ej-cc-text);
	font-family: var(--ej-cc-font);
}

.ej-cc-dsar-row input[readonly] {
	background: var(--ej-cc-sec-bg);
	opacity: 0.85;
}

.ej-cc-dsar-check {
	display: flex !important;
	flex-direction: row !important;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400 !important;
	font-size: 13px !important;
	line-height: 1.45;
	cursor: pointer;
}

.ej-cc-dsar-check input {
	margin-top: 3px;
	flex-shrink: 0;
}

.ej-cc-dsar-feedback {
	padding: 12px 14px;
	border-radius: 7px;
	font-size: 13.5px;
	font-weight: 500;
}

.ej-cc-dsar-info {
	background: #eff6ff;
	color: #1e40af;
	border: 1px solid #bfdbfe;
}

.ej-cc-dsar-success {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #86efac;
}

.ej-cc-dsar-error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

@media (max-width: 680px) {
	.ej-cc-dsar-grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 820px) {
	.ej-cc-banner.ej-cc-layout-bar_bottom .ej-cc-banner-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}

	.ej-cc-banner-actions,
	.ej-cc-modal-footer {
		flex-direction: column;
		align-items: stretch;
	}

	.ej-cc-btn {
		width: 100%;
	}
}
