/*!
 * Naty Cookie Consent — Banner CSS v1.0.0
 * Bottom-left card style, mobile-first, RTL-aware, accessible
 */

/* ============================================================
   ROOT CONTAINER
   ============================================================ */
.ncc-root {
	position: fixed;
	z-index: 999999;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #0F172A;
	box-sizing: border-box;
}
.ncc-root *, .ncc-root *::before, .ncc-root *::after {
	box-sizing: border-box;
}

/* ============================================================
   POSITIONS
   ============================================================ */
.ncc-pos-bottom-left { bottom: 20px; left: 20px; }
.ncc-pos-bottom-right { bottom: 20px; right: 20px; }

/* Bottom center = TRUE full-width bar (style "standard") */
.ncc-pos-bottom-center {
	bottom: 0;
	left: 0;
	right: 0;
}
.ncc-pos-bottom-center .ncc-banner {
	width: 100%;
	max-width: 100%;
	border-radius: 16px 16px 0 0;
	border-left: 0;
	border-right: 0;
	border-bottom: 0;
	padding: 22px 32px 20px;
}
/* Inner layout for full-width: content + buttons in a row on desktop */
.ncc-pos-bottom-center .ncc-banner-inner {
	max-width: 1200px;
	margin: 0 auto;
}
.ncc-pos-bottom-center .ncc-banner-head h2 {
	font-size: 17px;
}
.ncc-pos-bottom-center .ncc-banner-text {
	max-width: 760px;
}

.ncc-pos-top-banner { top: 0; left: 0; right: 0; }

/* RTL — flip left/right */
[dir="rtl"] .ncc-pos-bottom-left { left: auto; right: 20px; }
[dir="rtl"] .ncc-pos-bottom-right { right: auto; left: 20px; }

/* ============================================================
   BANNER (compact card)
   ============================================================ */
.ncc-banner {
	width: 420px;
	max-width: calc(100vw - 40px);
	background: #fff;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	padding: 20px 22px 18px;
	box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.08);
	font-size: 14px;
	line-height: 1.5;
	animation: ncc-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ncc-pos-top-banner .ncc-banner {
	width: 100%;
	max-width: 100%;
	border-radius: 0;
	border-left: 0;
	border-right: 0;
	border-top: 0;
}

@keyframes ncc-slide-in {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

.ncc-banner-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 8px;
}
.ncc-banner-head h2 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #0F172A;
	line-height: 1.4;
}
.ncc-close-btn {
	background: none;
	border: 0;
	padding: 4px;
	margin: -4px;
	cursor: pointer;
	color: #94A3B8;
	border-radius: 6px;
	display: inline-flex;
	transition: all 0.15s;
}
.ncc-close-btn:hover {
	color: #0F172A;
	background: #F1F5F9;
}
.ncc-close-btn:focus-visible {
	outline: 2px solid #465FFF;
	outline-offset: 1px;
}

.ncc-banner-text {
	margin: 0 0 12px;
	color: #475467;
	font-size: 13px;
	line-height: 1.55;
}

.ncc-gpc-notice {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 12px 0;
	padding: 10px 12px;
	background: #ECFDF3;
	border: 1px solid #6CE9A6;
	border-radius: 8px;
	font-size: 12px;
	color: #027A48;
	line-height: 1.4;
}
.ncc-gpc-notice svg {
	flex-shrink: 0;
	margin-top: 1px;
}

.ncc-banner-links {
	margin: 10px 0 14px;
	font-size: 12px;
	color: #64748B;
}
.ncc-banner-links a {
	color: #465FFF;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.ncc-banner-links a:hover {
	color: #1F40DD;
}

/* ============================================================
   BUTTONS (3 equivalent buttons — CNIL strict)
   ============================================================ */
.ncc-banner-actions, .ncc-panel-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 14px;
}
.ncc-banner-actions .ncc-btn,
.ncc-panel-actions .ncc-btn {
	flex: 1;
	min-width: 100px;
}

.ncc-btn {
	padding: 10px 16px;
	border: 0;
	border-radius: 10px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
	background: #fff;
	color: #0F172A;
}
.ncc-btn:focus-visible {
	outline: 2px solid #465FFF;
	outline-offset: 1px;
}

.ncc-btn-primary {
	background: #0A0A0A;
	color: #fff;
}
.ncc-btn-primary:hover {
	background: #1F2937;
	transform: translateY(-1px);
}

.ncc-btn-secondary {
	background: #F1F5F9;
	color: #0F172A;
	border: 1px solid #E2E8F0;
}
.ncc-btn-secondary:hover {
	background: #E2E8F0;
}

.ncc-btn-tertiary {
	background: transparent;
	color: #475467;
	border: 1px solid #D0D5DD;
}
.ncc-btn-tertiary:hover {
	background: #FAFAF7;
	color: #0F172A;
}

/* ============================================================
   PANEL (customize - granular categories)
   ============================================================ */
.ncc-panel {
	width: 480px;
	max-width: calc(100vw - 40px);
	max-height: calc(100vh - 60px);
	overflow-y: auto;
	background: #fff;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	padding: 20px 22px;
	box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.08);
	animation: ncc-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ncc-panel-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 8px;
}
.ncc-panel-head h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #0F172A;
}
.ncc-panel-intro {
	margin: 0 0 16px;
	color: #475467;
	font-size: 13px;
	line-height: 1.55;
}

/* ─── Category card ─── */
.ncc-categories {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 16px;
}
.ncc-cat {
	background: #FAFAF7;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	padding: 12px 14px;
}
.ncc-cat-essential   { border-left: 3px solid #10B981; }
.ncc-cat-functional  { border-left: 3px solid #3B82F6; }
.ncc-cat-analytics   { border-left: 3px solid #F59E0B; }
.ncc-cat-marketing   { border-left: 3px solid #EF4444; }
.ncc-cat-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 4px;
}
.ncc-cat-name {
	font-weight: 600;
	color: #0F172A;
	font-size: 14px;
}
.ncc-cat-desc {
	margin: 0;
	font-size: 12px;
	color: #64748B;
	line-height: 1.5;
}
.ncc-cat-required {
	background: #D1FADF;
	color: #027A48;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	flex-shrink: 0;
}

/* ─── Toggle switch ─── */
.ncc-toggle {
	position: relative;
	display: inline-block;
	width: 38px;
	height: 22px;
	flex-shrink: 0;
}
.ncc-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}
.ncc-toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0; left: 0; right: 0; bottom: 0;
	background: #D0D5DD;
	border-radius: 999px;
	transition: background 0.2s;
}
.ncc-toggle-slider::before {
	content: "";
	position: absolute;
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.ncc-toggle input:checked + .ncc-toggle-slider {
	background: #10B981;
}
.ncc-toggle input:checked + .ncc-toggle-slider::before {
	transform: translateX(16px);
}
.ncc-toggle input:focus-visible + .ncc-toggle-slider {
	outline: 2px solid #465FFF;
	outline-offset: 2px;
}

/* RTL toggle direction */
[dir="rtl"] .ncc-toggle-slider::before {
	left: auto;
	right: 3px;
}
[dir="rtl"] .ncc-toggle input:checked + .ncc-toggle-slider::before {
	transform: translateX(-16px);
}

/* ============================================================
   FLOATING REOPEN BUTTON
   ============================================================ */
.ncc-reopen-btn {
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 999998;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #E2E8F0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	color: #475467;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}
.ncc-reopen-btn:hover {
	transform: scale(1.1);
	color: #0F172A;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.ncc-reopen-btn:focus-visible {
	outline: 2px solid #465FFF;
	outline-offset: 2px;
}
[dir="rtl"] .ncc-reopen-btn {
	left: auto;
	right: 20px;
}

/* ============================================================
   INLINE SHORTCODE BUTTON
   ============================================================ */
.ncc-inline-btn {
	display: inline-block;
	padding: 10px 22px;
	background: #0A0A0A;
	color: #fff;
	border: 0;
	border-radius: 10px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s;
}
.ncc-inline-btn:hover {
	background: #1F2937;
	transform: translateY(-1px);
	color: #fff;
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 540px) {
	.ncc-pos-bottom-left, .ncc-pos-bottom-right {
		bottom: 12px;
		left: 12px;
		right: 12px;
	}
	.ncc-pos-bottom-center .ncc-banner {
		padding: 16px 18px;
	}
	.ncc-pos-bottom-left .ncc-banner, .ncc-pos-bottom-right .ncc-banner {
		width: 100%;
		max-width: 100%;
		padding: 16px 18px;
	}
	.ncc-panel {
		width: 100%;
		max-width: calc(100vw - 24px);
		padding: 16px 18px;
	}
	.ncc-banner-actions, .ncc-panel-actions {
		flex-direction: column;
	}
	.ncc-banner-actions .ncc-btn, .ncc-panel-actions .ncc-btn {
		width: 100%;
		flex: none;
	}
	.ncc-reopen-btn {
		bottom: 12px;
		left: 12px;
	}
	[dir="rtl"] .ncc-reopen-btn {
		left: auto;
		right: 12px;
	}
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	.ncc-banner, .ncc-panel { animation: none !important; }
	.ncc-btn, .ncc-reopen-btn, .ncc-toggle-slider, .ncc-toggle-slider::before { transition: none !important; }
}

/* ============================================================
   DARK MODE SUPPORT (respect OS preference)
   ============================================================ */
@media (prefers-color-scheme: dark) {
	.ncc-banner, .ncc-panel {
		background: #1F2937;
		border-color: #334155;
		color: #F1F5F9;
	}
	.ncc-banner-head h2, .ncc-panel-head h2, .ncc-cat-name { color: #F1F5F9; }
	.ncc-banner-text, .ncc-panel-intro, .ncc-cat-desc { color: #94A3B8; }
	.ncc-cat { background: #0F172A; border-color: #334155; }
	.ncc-btn-secondary { background: #334155; color: #F1F5F9; border-color: #475569; }
	.ncc-btn-tertiary { color: #94A3B8; border-color: #475569; }
	.ncc-banner-links { color: #94A3B8; }
}
