/* DragDrop Essentials — cookie consent banner (self-contained, theme-agnostic). */
.ddes-consent {
	--ddes-accent: #4F46E5;
	--ddes-accent-d: #4338CA;
	--ddes-ink: #1f2430;
	--ddes-line: #e6e6ef;
	position: fixed;
	z-index: 2147483000;
	box-sizing: border-box;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	opacity: 0;
	transition: opacity .25s ease, transform .25s ease;
}
.ddes-consent * { box-sizing: border-box; }
.ddes-consent.is-visible { opacity: 1; }

/* Bottom bar */
.ddes-consent--bar-bottom { left: 0; right: 0; bottom: 0; transform: translateY(12px); }
.ddes-consent--bar-bottom.is-visible { transform: translateY(0); }
.ddes-consent--bar-bottom .ddes-consent__inner {
	max-width: 1180px;
	margin: 0 auto 14px;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 14px 26px;
	align-items: center;
}

/* Corner boxes */
.ddes-consent--box-left,
.ddes-consent--box-right { bottom: 20px; max-width: 420px; transform: translateY(12px); }
.ddes-consent--box-left { left: 20px; }
.ddes-consent--box-right { right: 20px; }
.ddes-consent--box-left.is-visible,
.ddes-consent--box-right.is-visible { transform: translateY(0); }
.ddes-consent--box-left .ddes-consent__inner,
.ddes-consent--box-right .ddes-consent__inner { display: block; }
.ddes-consent--box-left .ddes-consent__actions,
.ddes-consent--box-right .ddes-consent__actions { margin-top: 14px; }

.ddes-consent__inner {
	background: #fff;
	color: var(--ddes-ink);
	border: 1px solid var(--ddes-line);
	border-radius: 16px;
	box-shadow: 0 24px 60px -20px rgba(0,0,0,.45);
	padding: 20px 24px;
	margin-inline: 14px;
}
.ddes-consent__title { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--ddes-ink); }
.ddes-consent__text { margin: 0; font-size: 14px; line-height: 1.55; color: #4b5163; }
.ddes-consent__policy { color: var(--ddes-accent); font-weight: 600; text-decoration: underline; }

.ddes-consent__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }

.ddes-btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 11px 20px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ddes-btn--primary { background: var(--ddes-accent); color: #fff; }
.ddes-btn--primary:hover { background: var(--ddes-accent-d); }
.ddes-btn--ghost { background: #fff; color: var(--ddes-ink); border-color: var(--ddes-line); }
.ddes-btn--ghost:hover { border-color: #c9c9d6; background: #f7f7fb; }

/* Preferences */
.ddes-consent__prefs {
	grid-column: 1 / -1;
	margin-top: 16px;
	border-top: 1px solid var(--ddes-line);
	padding-top: 16px;
	max-height: 46vh;
	overflow-y: auto;
}
.ddes-cat { border: 1px solid var(--ddes-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.ddes-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ddes-cat__label { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14.5px; }
.ddes-cat__always { font-size: 12px; font-weight: 600; color: #16a34a; background: #dcfce7; padding: 3px 10px; border-radius: 999px; }
.ddes-cat__toggle { background: none; border: none; color: var(--ddes-accent); font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px; font-family: inherit; }
.ddes-cat__desc { margin: 8px 0 0; font-size: 13px; color: #5a6072; line-height: 1.5; }
.ddes-cat__cookies { margin-top: 12px; overflow-x: auto; }

.ddes-cookies { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ddes-cookies th { text-align: left; background: #f3f4fb; color: #3a3f52; font-weight: 600; padding: 7px 10px; border: 1px solid var(--ddes-line); }
.ddes-cookies td { padding: 7px 10px; border: 1px solid var(--ddes-line); color: #4b5163; vertical-align: top; }
.ddes-cookies code { background: #eef0f8; padding: 1px 6px; border-radius: 5px; font-size: 12px; }

/* iOS-style switch */
.ddes-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.ddes-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ddes-switch__slider { position: absolute; inset: 0; background: #cbd0dc; border-radius: 999px; transition: background .18s ease; }
.ddes-switch__slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .18s ease; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ddes-switch input:checked + .ddes-switch__slider { background: var(--ddes-accent); }
.ddes-switch input:checked + .ddes-switch__slider::before { transform: translateX(18px); }

.ddes-consent__prefs-actions { display: flex; justify-content: flex-end; margin-top: 6px; }

@media (max-width: 720px) {
	.ddes-consent--bar-bottom .ddes-consent__inner { grid-template-columns: 1fr; }
	.ddes-consent__actions { justify-content: stretch; }
	.ddes-btn { flex: 1 1 auto; text-align: center; }
	.ddes-consent--box-left, .ddes-consent--box-right { left: 12px; right: 12px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ddes-consent { transition: none; }
}
