/**
 * EKJL Cookie Consent, frontend styling
 * Huisstijl: Emigreren kun je leren
 *
 * Kleuren:
 *   Primary brown:  #543E2E
 *   Primary hover:  #694F3A
 *   Text:           #222222
 *   Muted text:     #694F3A
 *   Accent orange:  #EE9D52
 *   Accent hover:   #F7AE60
 *   Info green:     #7B8652
 *   Info green hov: #55643E
 *   Soft bg:        #F8F5F2
 *   Border:         #e5dfd9
 *
 * Font: Poppins (fallback Helvetica, Arial, sans-serif)
 */

/* CSS variables voor makkelijke aanpassingen */
.ekjl-cc-root {
	--ekjl-cc-primary: #543E2E;
	--ekjl-cc-primary-hover: #694F3A;
	--ekjl-cc-text: #222222;
	--ekjl-cc-muted: #694F3A;
	--ekjl-cc-accent: #EE9D52;
	--ekjl-cc-accent-hover: #F7AE60;
	--ekjl-cc-info: #7B8652;
	--ekjl-cc-info-hover: #55643E;
	--ekjl-cc-soft: #F8F5F2;
	--ekjl-cc-border: #e5dfd9;
	--ekjl-cc-white: #ffffff;
	--ekjl-cc-shadow: 0 -4px 32px rgba(84, 62, 46, 0.12);
	--ekjl-cc-radius: 12px;
	--ekjl-cc-font: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.ekjl-cc-root *,
.ekjl-cc-root *::before,
.ekjl-cc-root *::after {
	box-sizing: border-box;
}

/* Hidden attribute moet altijd display: none forceren, ongeacht andere display regels */
.ekjl-cc-root .ekjl-cc-banner[hidden],
.ekjl-cc-root .ekjl-cc-modal[hidden],
.ekjl-cc-banner[hidden],
.ekjl-cc-modal[hidden] {
	display: none !important;
}

/* ============================================
   BANNER
   ============================================ */
.ekjl-cc-banner {
	position: fixed;
	z-index: 999990;
	background: var(--ekjl-cc-white);
	box-shadow: var(--ekjl-cc-shadow);
	border-top: 3px solid var(--ekjl-cc-info);
	font-family: var(--ekjl-cc-font);
	color: var(--ekjl-cc-text);
	animation: ekjlCcSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ekjlCcSlideUp {
	from { transform: translateY(100%); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

@keyframes ekjlCcSlideDown {
	from { transform: translateY(-100%); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

/* Positie: onderaan volledige breedte */
.ekjl-cc-position-bottom .ekjl-cc-banner {
	bottom: 0;
	left: 0;
	right: 0;
}

/* Positie: bovenaan volledige breedte */
.ekjl-cc-position-top .ekjl-cc-banner {
	top: 0;
	left: 0;
	right: 0;
	border-top: 0;
	border-bottom: 3px solid var(--ekjl-cc-info);
	animation: ekjlCcSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 0 4px 32px rgba(84, 62, 46, 0.12);
}

/* Positie: onderaan links of rechts (popup stijl) */
.ekjl-cc-position-bottom-left .ekjl-cc-banner,
.ekjl-cc-position-bottom-right .ekjl-cc-banner {
	bottom: 24px;
	max-width: 440px;
	border-radius: var(--ekjl-cc-radius);
	border-top: 0;
	border-left: 3px solid var(--ekjl-cc-info);
}

.ekjl-cc-position-bottom-left .ekjl-cc-banner {
	left: 24px;
}

.ekjl-cc-position-bottom-right .ekjl-cc-banner {
	right: 24px;
}

.ekjl-cc-banner-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 32px;
	display: flex;
	gap: 32px;
	align-items: center;
}

.ekjl-cc-position-bottom-left .ekjl-cc-banner-inner,
.ekjl-cc-position-bottom-right .ekjl-cc-banner-inner {
	flex-direction: column;
	align-items: stretch;
	padding: 24px;
	gap: 20px;
}

.ekjl-cc-banner-content {
	flex: 1;
}

.ekjl-cc-banner-title {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 700;
	color: var(--ekjl-cc-primary);
	font-family: var(--ekjl-cc-font);
	line-height: 1.3;
	letter-spacing: -0.1px;
}

.ekjl-cc-banner-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--ekjl-cc-text);
	font-family: var(--ekjl-cc-font);
}

.ekjl-cc-banner-links {
	display: inline-block;
	margin-left: 6px;
	font-size: 13px;
}

.ekjl-cc-banner-links a {
	color: var(--ekjl-cc-accent);
	text-decoration: underline;
	font-weight: 500;
}

.ekjl-cc-banner-links a:hover {
	color: var(--ekjl-cc-accent-hover);
}

.ekjl-cc-sep {
	margin: 0 6px;
	color: var(--ekjl-cc-muted);
	opacity: 0.5;
}

.ekjl-cc-banner-actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
	flex-wrap: wrap;
}

.ekjl-cc-position-bottom-left .ekjl-cc-banner-actions,
.ekjl-cc-position-bottom-right .ekjl-cc-banner-actions {
	flex-direction: column;
}

/* ============================================
   KNOPPEN, hoge specificiteit om Elementor te overrulen
   ============================================ */
.ekjl-cc-root .ekjl-cc-btn,
.ekjl-cc-root button.ekjl-cc-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 11px 22px !important;
	font-family: var(--ekjl-cc-font) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	border: none !important;
	border-radius: 8px !important;
	cursor: pointer !important;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0.1px !important;
	white-space: nowrap !important;
	box-shadow: none !important;
	text-shadow: none !important;
	min-height: auto !important;
	height: auto !important;
	width: auto !important;
	margin: 0 !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	background-image: none !important;
}

.ekjl-cc-root .ekjl-cc-btn:active,
.ekjl-cc-root button.ekjl-cc-btn:active {
	transform: translateY(1px) !important;
}

.ekjl-cc-root .ekjl-cc-btn:focus-visible,
.ekjl-cc-root button.ekjl-cc-btn:focus-visible {
	outline: 3px solid var(--ekjl-cc-info) !important;
	outline-offset: 2px !important;
}

/* Primary: oranje CTA */
.ekjl-cc-root .ekjl-cc-btn-primary,
.ekjl-cc-root button.ekjl-cc-btn-primary {
	background-color: var(--ekjl-cc-accent) !important;
	color: var(--ekjl-cc-white) !important;
	border: none !important;
}

.ekjl-cc-root .ekjl-cc-btn-primary:hover,
.ekjl-cc-root .ekjl-cc-btn-primary:focus,
.ekjl-cc-root .ekjl-cc-btn-primary:active,
.ekjl-cc-root button.ekjl-cc-btn-primary:hover,
.ekjl-cc-root button.ekjl-cc-btn-primary:focus,
.ekjl-cc-root button.ekjl-cc-btn-primary:active {
	background-color: var(--ekjl-cc-accent-hover) !important;
	color: var(--ekjl-cc-white) !important;
	border: none !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

/* Secondary: witte knop met rand */
.ekjl-cc-root .ekjl-cc-btn-secondary,
.ekjl-cc-root button.ekjl-cc-btn-secondary {
	background-color: var(--ekjl-cc-white) !important;
	color: var(--ekjl-cc-primary) !important;
	border: 1.5px solid var(--ekjl-cc-border) !important;
}

.ekjl-cc-root .ekjl-cc-btn-secondary:hover,
.ekjl-cc-root .ekjl-cc-btn-secondary:focus,
.ekjl-cc-root .ekjl-cc-btn-secondary:active,
.ekjl-cc-root button.ekjl-cc-btn-secondary:hover,
.ekjl-cc-root button.ekjl-cc-btn-secondary:focus,
.ekjl-cc-root button.ekjl-cc-btn-secondary:active {
	background-color: var(--ekjl-cc-soft) !important;
	border-color: var(--ekjl-cc-primary) !important;
	color: var(--ekjl-cc-primary) !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

/* Tertiary: tekst link voor "Voorkeuren aanpassen" */
.ekjl-cc-root .ekjl-cc-btn-tertiary,
.ekjl-cc-root button.ekjl-cc-btn-tertiary {
	background: transparent !important;
	background-color: transparent !important;
	color: var(--ekjl-cc-muted) !important;
	padding: 11px 12px !important;
	text-decoration: underline !important;
	text-underline-offset: 3px !important;
	border: none !important;
}

.ekjl-cc-root .ekjl-cc-btn-tertiary:hover,
.ekjl-cc-root .ekjl-cc-btn-tertiary:focus,
.ekjl-cc-root .ekjl-cc-btn-tertiary:active,
.ekjl-cc-root button.ekjl-cc-btn-tertiary:hover,
.ekjl-cc-root button.ekjl-cc-btn-tertiary:focus,
.ekjl-cc-root button.ekjl-cc-btn-tertiary:active {
	color: var(--ekjl-cc-primary) !important;
	background: transparent !important;
	background-color: transparent !important;
	box-shadow: none !important;
	text-decoration: underline !important;
}

/* ============================================
   MODAL
   ============================================ */
.ekjl-cc-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: var(--ekjl-cc-font);
}

.ekjl-cc-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(84, 62, 46, 0.5);
	backdrop-filter: blur(2px);
	animation: ekjlCcFadeIn 0.2s ease;
}

@keyframes ekjlCcFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.ekjl-cc-modal-dialog {
	position: relative;
	background: var(--ekjl-cc-white);
	border-radius: var(--ekjl-cc-radius);
	max-width: 600px;
	width: 100%;
	max-height: calc(100vh - 40px);
	display: flex;
	flex-direction: column;
	box-shadow: 0 24px 64px rgba(84, 62, 46, 0.25);
	overflow: hidden;
	animation: ekjlCcModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ekjlCcModalIn {
	from { transform: scale(0.95) translateY(10px); opacity: 0; }
	to { transform: scale(1) translateY(0); opacity: 1; }
}

.ekjl-cc-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px 32px 16px;
	background: linear-gradient(135deg, var(--ekjl-cc-primary) 0%, var(--ekjl-cc-primary-hover) 100%);
	color: var(--ekjl-cc-white);
}

.ekjl-cc-modal-title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	font-family: var(--ekjl-cc-font);
	color: var(--ekjl-cc-white);
	line-height: 1.3;
	letter-spacing: -0.1px;
}

.ekjl-cc-root .ekjl-cc-modal-close,
.ekjl-cc-root button.ekjl-cc-modal-close {
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	color: var(--ekjl-cc-white) !important;
	font-size: 32px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	cursor: pointer !important;
	padding: 0 !important;
	margin: 0 !important;
	width: 36px !important;
	height: 36px !important;
	min-height: auto !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: background-color 0.15s ease !important;
	opacity: 0.85;
	box-shadow: none !important;
	text-shadow: none !important;
	text-decoration: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

.ekjl-cc-root .ekjl-cc-modal-close:hover,
.ekjl-cc-root .ekjl-cc-modal-close:focus,
.ekjl-cc-root .ekjl-cc-modal-close:active,
.ekjl-cc-root button.ekjl-cc-modal-close:hover,
.ekjl-cc-root button.ekjl-cc-modal-close:focus,
.ekjl-cc-root button.ekjl-cc-modal-close:active {
	background: rgba(255, 255, 255, 0.15) !important;
	background-color: rgba(255, 255, 255, 0.15) !important;
	opacity: 1;
	color: var(--ekjl-cc-white) !important;
	box-shadow: none !important;
}

.ekjl-cc-modal-close:focus-visible {
	outline: 2px solid var(--ekjl-cc-white);
	outline-offset: 2px;
}

.ekjl-cc-modal-body {
	padding: 24px 32px;
	overflow-y: auto;
	flex: 1;
}

.ekjl-cc-modal-intro {
	margin: 0 0 24px;
	color: var(--ekjl-cc-text);
	font-size: 15px;
	line-height: 1.6;
}

.ekjl-cc-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding: 20px 32px;
	background: var(--ekjl-cc-soft);
	border-top: 1px solid var(--ekjl-cc-border);
}

/* ============================================
   CATEGORIES
   ============================================ */
.ekjl-cc-category {
	background: var(--ekjl-cc-soft);
	border-left: 3px solid var(--ekjl-cc-info);
	border-radius: 8px;
	padding: 18px 22px;
	margin-bottom: 14px;
}

.ekjl-cc-category:last-child {
	margin-bottom: 0;
}

.ekjl-cc-category-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 8px;
}

.ekjl-cc-category-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--ekjl-cc-primary);
	line-height: 1.3;
}

.ekjl-cc-category-status {
	margin: 2px 0 0;
	font-size: 12px;
	color: var(--ekjl-cc-muted);
	font-weight: 500;
}

.ekjl-cc-category-desc {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--ekjl-cc-text);
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.ekjl-cc-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
	cursor: pointer;
}

.ekjl-cc-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.ekjl-cc-toggle-slider {
	position: absolute;
	inset: 0;
	background-color: #c4bdb5;
	border-radius: 24px;
	transition: background-color 0.2s ease;
}

.ekjl-cc-toggle-slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: var(--ekjl-cc-white);
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.ekjl-cc-toggle input:checked + .ekjl-cc-toggle-slider {
	background-color: var(--ekjl-cc-info);
}

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

.ekjl-cc-toggle input:focus-visible + .ekjl-cc-toggle-slider {
	box-shadow: 0 0 0 3px rgba(123, 134, 82, 0.3);
}

.ekjl-cc-toggle-locked {
	cursor: not-allowed;
	opacity: 0.85;
}

.ekjl-cc-toggle-locked .ekjl-cc-toggle-slider {
	background-color: var(--ekjl-cc-primary);
}

/* ============================================
   SHORTCODE: Settings button
   ============================================ */
button.ekjl-cc-settings-link,
.ekjl-cc-settings-link {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	padding: 10px 18px !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	color: var(--ekjl-cc-accent) !important;
	border: 1.5px solid var(--ekjl-cc-accent) !important;
	border-radius: 8px !important;
	font-family: var(--ekjl-cc-font) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	cursor: pointer !important;
	transition: background-color 0.15s ease, color 0.15s ease !important;
	text-decoration: none !important;
	text-transform: none !important;
	box-shadow: none !important;
	text-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	min-height: auto !important;
	height: auto !important;
	width: auto !important;
	margin: 0 !important;
}

button.ekjl-cc-settings-link:hover,
button.ekjl-cc-settings-link:focus,
button.ekjl-cc-settings-link:active,
.ekjl-cc-settings-link:hover,
.ekjl-cc-settings-link:focus,
.ekjl-cc-settings-link:active {
	background-color: var(--ekjl-cc-accent) !important;
	background: var(--ekjl-cc-accent) !important;
	color: var(--ekjl-cc-white) !important;
	border-color: var(--ekjl-cc-accent) !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

/* ============================================
   SHORTCODE: Declaration table
   ============================================ */
.ekjl-cc-declaration {
	font-family: var(--ekjl-cc-font);
	color: var(--ekjl-cc-text);
}

.ekjl-cc-declaration-section {
	margin-bottom: 40px;
}

.ekjl-cc-declaration-title {
	color: var(--ekjl-cc-primary);
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 8px;
	letter-spacing: -0.1px;
}

.ekjl-cc-declaration-intro {
	color: var(--ekjl-cc-text);
	font-size: 15px;
	line-height: 1.6;
	margin: 0 0 16px;
}

.ekjl-cc-declaration-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--ekjl-cc-border);
	border-radius: 8px;
	overflow: hidden;
	font-size: 14px;
}

.ekjl-cc-declaration-table th {
	background-color: var(--ekjl-cc-primary);
	color: var(--ekjl-cc-white);
	font-weight: 600;
	text-align: left;
	padding: 12px 16px;
	font-size: 13px;
	letter-spacing: 0.2px;
	text-transform: uppercase;
}

.ekjl-cc-declaration-table td {
	padding: 12px 16px;
	border-top: 1px solid var(--ekjl-cc-border);
	color: var(--ekjl-cc-text);
	line-height: 1.5;
	vertical-align: top;
}

.ekjl-cc-declaration-table tr:nth-child(even) td {
	background-color: var(--ekjl-cc-soft);
}

.ekjl-cc-declaration-table code {
	background: var(--ekjl-cc-soft);
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 12.5px;
	color: var(--ekjl-cc-primary);
	font-weight: 500;
}

.ekjl-cc-declaration-table tr:nth-child(even) td code {
	background: var(--ekjl-cc-white);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
	.ekjl-cc-banner-inner {
		flex-direction: column;
		align-items: stretch;
		padding: 20px;
		gap: 16px;
	}

	.ekjl-cc-banner-actions {
		flex-direction: column;
		gap: 8px;
	}

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

	.ekjl-cc-btn-tertiary {
		order: -1;
	}

	.ekjl-cc-position-bottom-left .ekjl-cc-banner,
	.ekjl-cc-position-bottom-right .ekjl-cc-banner {
		left: 12px;
		right: 12px;
		bottom: 12px;
		max-width: none;
	}

	.ekjl-cc-modal {
		padding: 12px;
	}

	.ekjl-cc-modal-header,
	.ekjl-cc-modal-body,
	.ekjl-cc-modal-footer {
		padding-left: 20px;
		padding-right: 20px;
	}

	.ekjl-cc-modal-footer {
		flex-direction: column-reverse;
		gap: 8px;
	}

	.ekjl-cc-modal-footer .ekjl-cc-btn {
		width: 100%;
	}

	.ekjl-cc-declaration-table {
		display: block;
		overflow-x: auto;
	}
}

@media (max-width: 480px) {
	.ekjl-cc-banner-title {
		font-size: 16px;
	}

	.ekjl-cc-modal-title {
		font-size: 18px;
	}

	.ekjl-cc-category {
		padding: 16px 18px;
	}
}

/* Body lock wanneer modal open */
body.ekjl-cc-modal-open {
	overflow: hidden;
}
