/* Elegant Cookie Consent v1.0.1 - Compact, Modern & Fully Responsive */

:root {
	--ecc-primary: #5B7C99;
	--ecc-primary-hover: #4A6A86;
	--ecc-accent: #A8C5D4;
	--ecc-bg: #F8FAFC;
	--ecc-surface: #FFFFFF;
	--ecc-text: #2D3748;
	--ecc-text-muted: #64748B;
	--ecc-border: #E2E8F0;
	--ecc-shadow: 0 8px 30px -8px rgba(91, 124, 153, 0.16);
	--ecc-radius: 14px;
	--ecc-radius-sm: 9px;
	--ecc-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ecc-transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== BANNER ========== */
.ecc-banner {
	position: fixed;
	z-index: 999999;
	left: 0;
	right: 0;
	font-family: var(--ecc-font);
	color: var(--ecc-text);
	line-height: 1.45;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--ecc-transition), visibility var(--ecc-transition), transform var(--ecc-transition);
}

.ecc-banner.ecc-visible {
	opacity: 1;
	visibility: visible;
}

.ecc-banner * {
	box-sizing: border-box;
}

/* Positions */
.ecc-banner.ecc-pos-bottom {
	bottom: 0;
	transform: translateY(16px);
}
.ecc-banner.ecc-pos-bottom.ecc-visible {
	transform: translateY(0);
}

.ecc-banner.ecc-pos-top {
	top: 0;
	transform: translateY(-16px);
}
.ecc-banner.ecc-pos-top.ecc-visible {
	transform: translateY(0);
}

.ecc-banner.ecc-pos-center {
	top: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(45, 55, 72, 0.32);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	transform: none;
	padding: 16px;
}

.ecc-banner.ecc-pos-center .ecc-banner-inner {
	max-width: 480px;
	width: 100%;
	box-shadow: var(--ecc-shadow);
	border-radius: var(--ecc-radius);
	border: none;
}

/* Inner container - more compact */
.ecc-banner-inner {
	background: var(--ecc-surface);
	border-top: 1px solid var(--ecc-border);
	padding: 16px 20px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 18px;
	box-shadow: 0 -3px 24px -6px rgba(91, 124, 153, 0.12);
}

.ecc-banner.ecc-pos-top .ecc-banner-inner {
	border-top: none;
	border-bottom: 1px solid var(--ecc-border);
	box-shadow: 0 3px 24px -6px rgba(91, 124, 153, 0.12);
}

.ecc-banner.ecc-pos-center .ecc-banner-inner {
	padding: 22px 24px;
}

/* Content */
.ecc-banner-content {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	flex: 1 1 280px;
	min-width: 0;
}

.ecc-icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--ecc-accent), #D4E5EE);
	color: var(--ecc-primary);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ecc-icon svg {
	width: 20px;
	height: 20px;
}

.ecc-title {
	margin: 0 0 3px;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--ecc-text);
	line-height: 1.3;
}

.ecc-desc {
	margin: 0;
	font-size: 0.82rem;
	color: var(--ecc-text-muted);
	line-height: 1.5;
}

.ecc-privacy-link {
	color: var(--ecc-primary);
	text-decoration: none;
	font-weight: 500;
	margin-left: 3px;
	border-bottom: 1px solid transparent;
	transition: border-color var(--ecc-transition);
}

.ecc-privacy-link:hover {
	border-bottom-color: var(--ecc-primary);
}

/* Buttons */
.ecc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
	flex: 0 0 auto;
}

.ecc-btn {
	appearance: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 500;
	padding: 8px 14px;
	border-radius: var(--ecc-radius-sm);
	transition: background var(--ecc-transition), color var(--ecc-transition), border-color var(--ecc-transition), transform 0.12s ease;
	white-space: nowrap;
	line-height: 1.3;
}

.ecc-btn:active {
	transform: scale(0.97);
}

.ecc-btn-primary {
	background: var(--ecc-primary);
	color: #fff;
}

.ecc-btn-primary:hover {
	background: var(--ecc-primary-hover);
}

.ecc-btn-outline {
	background: transparent;
	color: var(--ecc-text);
	border: 1.5px solid var(--ecc-border);
}

.ecc-btn-outline:hover {
	border-color: var(--ecc-primary);
	color: var(--ecc-primary);
	background: rgba(91, 124, 153, 0.04);
}

.ecc-btn-ghost {
	background: transparent;
	color: var(--ecc-text-muted);
	padding: 8px 12px;
}

.ecc-btn-ghost:hover {
	color: var(--ecc-primary);
	background: rgba(91, 124, 153, 0.06);
}

/* ========== MODAL ========== */
.ecc-modal {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--ecc-transition), visibility var(--ecc-transition);
	font-family: var(--ecc-font);
}

.ecc-modal.ecc-visible {
	opacity: 1;
	visibility: visible;
}

.ecc-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(45, 55, 72, 0.38);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
}

.ecc-modal-box {
	position: relative;
	background: var(--ecc-surface);
	border-radius: var(--ecc-radius);
	width: 100%;
	max-width: 440px;
	max-height: 88vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: var(--ecc-shadow);
	transform: translateY(10px) scale(0.98);
	transition: transform var(--ecc-transition);
}

.ecc-modal.ecc-visible .ecc-modal-box {
	transform: translateY(0) scale(1);
}

.ecc-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px 10px;
	border-bottom: 1px solid var(--ecc-border);
}

.ecc-modal-header h2 {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--ecc-text);
}

.ecc-modal-close {
	appearance: none;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 5px;
	border-radius: 8px;
	color: var(--ecc-text-muted);
	display: flex;
	transition: background var(--ecc-transition), color var(--ecc-transition);
}

.ecc-modal-close:hover {
	background: rgba(91, 124, 153, 0.08);
	color: var(--ecc-text);
}

.ecc-modal-body {
	padding: 6px 20px 12px;
	overflow-y: auto;
	flex: 1;
}

.ecc-category {
	padding: 13px 0;
	border-bottom: 1px solid var(--ecc-border);
}

.ecc-category:last-child {
	border-bottom: none;
}

.ecc-cat-header {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ecc-cat-info {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
}

.ecc-cat-info strong {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ecc-text);
}

.ecc-badge {
	font-size: 0.68rem;
	font-weight: 500;
	padding: 2px 7px;
	border-radius: 20px;
	background: rgba(91, 124, 153, 0.1);
	color: var(--ecc-primary);
}

.ecc-cat-desc {
	margin: 6px 0 0 48px;
	font-size: 0.8rem;
	color: var(--ecc-text-muted);
	line-height: 1.45;
}

/* Switch */
.ecc-switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
}

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

.ecc-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #CBD5E1;
	border-radius: 22px;
	transition: background var(--ecc-transition);
}

.ecc-slider::before {
	content: "";
	position: absolute;
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background: white;
	border-radius: 50%;
	transition: transform var(--ecc-transition);
	box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.ecc-switch input:checked + .ecc-slider {
	background: var(--ecc-primary);
}

.ecc-switch input:checked + .ecc-slider::before {
	transform: translateX(18px);
}

.ecc-switch input:disabled + .ecc-slider {
	opacity: 0.7;
	cursor: not-allowed;
}

.ecc-modal-footer {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	padding: 12px 20px 16px;
	border-top: 1px solid var(--ecc-border);
	background: var(--ecc-bg);
}

/* Reopen floating button */
.ecc-reopen {
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 999998;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	background: var(--ecc-surface);
	color: var(--ecc-primary);
	box-shadow: 0 3px 16px -3px rgba(91, 124, 153, 0.22);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform var(--ecc-transition), box-shadow var(--ecc-transition);
	opacity: 0;
	visibility: hidden;
}

.ecc-reopen.ecc-visible {
	opacity: 1;
	visibility: visible;
}

.ecc-reopen:hover {
	transform: scale(1.07);
	box-shadow: 0 5px 20px -3px rgba(91, 124, 153, 0.32);
}

.ecc-reopen svg {
	width: 20px;
	height: 20px;
}

/* ========== RESPONSIVE ========== */

/* Tablet */
@media (max-width: 768px) {
	.ecc-banner-inner {
		padding: 14px 16px;
		gap: 12px;
	}

	.ecc-banner-content {
		flex: 1 1 100%;
	}

	.ecc-actions {
		width: 100%;
		justify-content: stretch;
	}

	.ecc-actions .ecc-btn {
		flex: 1;
		text-align: center;
		justify-content: center;
	}

	.ecc-btn-ghost {
		order: 3;
		flex: 1 1 100%;
	}
}

/* Mobile */
@media (max-width: 480px) {
	.ecc-banner-inner {
		padding: 13px 14px 14px;
		gap: 11px;
	}

	.ecc-icon {
		width: 32px;
		height: 32px;
		border-radius: 8px;
	}

	.ecc-icon svg {
		width: 17px;
		height: 17px;
	}

	.ecc-title {
		font-size: 0.9rem;
	}

	.ecc-desc {
		font-size: 0.78rem;
		line-height: 1.45;
	}

	.ecc-btn {
		font-size: 0.8rem;
		padding: 9px 12px;
	}

	.ecc-modal {
		padding: 12px;
	}

	.ecc-modal-box {
		max-height: 92vh;
	}

	.ecc-modal-header {
		padding: 14px 16px 8px;
	}

	.ecc-modal-header h2 {
		font-size: 1rem;
	}

	.ecc-modal-body {
		padding: 4px 16px 10px;
	}

	.ecc-category {
		padding: 11px 0;
	}

	.ecc-cat-desc {
		margin-left: 0;
		margin-top: 7px;
		font-size: 0.78rem;
	}

	.ecc-modal-footer {
		padding: 10px 16px 14px;
		flex-wrap: wrap;
	}

	.ecc-modal-footer .ecc-btn {
		flex: 1;
		text-align: center;
	}

	.ecc-reopen {
		bottom: 14px;
		left: 14px;
		width: 42px;
		height: 42px;
	}
}

/* Very small phones */
@media (max-width: 360px) {
	.ecc-banner-inner {
		padding: 12px;
	}

	.ecc-actions {
		gap: 6px;
	}

	.ecc-btn {
		padding: 8px 10px;
		font-size: 0.78rem;
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.ecc-banner,
	.ecc-modal,
	.ecc-modal-box,
	.ecc-btn,
	.ecc-slider,
	.ecc-slider::before,
	.ecc-reopen {
		transition: none;
	}
}
