/* ==========================================================================
   Karaaslan Tarım — KVKK/GDPR çerez onayı: alt bant + tercihler modalı + switch
   ========================================================================== */

.ka-cookie[hidden] {
	display: none;
}

/* ---- Modal overlay (yalnızca tercihler paneli açıkken) ---- */

.ka-cookie-overlay {
	position: fixed;
	inset: 0;
	background: rgba(18, 14, 20, .5);
	z-index: 120;
	animation: kaCookieFade .2s ease both;
}

.ka-cookie-overlay[hidden] {
	display: none;
}

/* ---- Alt bant ---- */

.ka-cookie-banner {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	z-index: 125;
	width: min(1120px, calc(100vw - 32px));
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 18px 50px rgba(20, 14, 24, .28);
	border: 1px solid #efe7db;
	padding: 20px 24px;
	display: flex;
	align-items: center;
	gap: 26px;
	animation: kaCookieUp .32s cubic-bezier(.2, .7, .2, 1) both;
}

.ka-cookie-banner[hidden] {
	display: none;
}

.ka-cookie-banner-text {
	flex: 1;
	min-width: 0;
}

.ka-cookie-title {
	font-size: 17px;
	font-weight: 800;
	color: var(--ka-ink);
	margin: 0 0 5px;
}

.ka-cookie-desc {
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--ka-muted, #6f6a60);
	margin: 0;
}

.ka-cookie-policy {
	color: var(--ka-magenta);
	font-weight: 600;
	text-decoration: underline;
	white-space: nowrap;
}

.ka-cookie-policy:hover {
	color: var(--ka-magenta-hover, #7d0e46);
}

.ka-cookie-banner-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: none;
	flex-wrap: wrap;
	justify-content: flex-end;
}

/* ---- Butonlar ---- */

.ka-cookie-btn {
	border: none;
	border-radius: 999px;
	padding: 11px 20px;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
	white-space: nowrap;
}

.ka-cookie-btn:hover {
	transform: translateY(-1px);
}

.ka-cookie-btn-solid {
	background: var(--ka-orange);
	color: #fff;
	box-shadow: 0 5px 14px rgba(241, 138, 35, .32);
}

.ka-cookie-btn-solid:hover {
	background: var(--ka-orange-hover);
	color: #fff;
}

.ka-cookie-btn-line {
	background: #fff;
	color: var(--ka-ink);
	border: 1.5px solid #ddd6ca;
}

.ka-cookie-btn-line:hover {
	border-color: var(--ka-ink);
}

.ka-cookie-btn-ghost {
	background: transparent;
	color: var(--ka-magenta);
	padding: 11px 14px;
}

.ka-cookie-btn-ghost:hover {
	color: var(--ka-magenta-hover, #7d0e46);
	text-decoration: underline;
}

/* ---- Tercihler paneli (modal) ---- */

.ka-cookie-panel {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 130;
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 24px 70px rgba(20, 14, 24, .34);
	padding: 26px 28px 24px;
	animation: kaCookiePop .26s cubic-bezier(.2, .7, .2, 1) both;
}

.ka-cookie-panel[hidden] {
	display: none;
}

.ka-cookie-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 6px;
}

.ka-cookie-panel-head .ka-cookie-title {
	font-size: 20px;
	margin: 0;
}

.ka-cookie-close {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: var(--ka-faint, #b9b2a4);
	cursor: pointer;
	padding: 2px 6px;
	transition: color .15s ease;
}

.ka-cookie-close:hover {
	color: var(--ka-magenta);
}

.ka-cookie-panel-desc {
	margin: 0 0 16px;
}

/* ---- Kategoriler ---- */

.ka-cookie-cats {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 22px;
}

.ka-cookie-cat {
	background: var(--ka-cream, #faf7f2);
	border: 1px solid #efe7db;
	border-radius: 12px;
	padding: 14px 16px;
}

.ka-cookie-cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 4px;
}

.ka-cookie-cat-name {
	font-size: 14.5px;
	font-weight: 700;
	color: var(--ka-ink);
}

.ka-cookie-cat-desc {
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--ka-muted, #6f6a60);
	margin: 0;
}

.ka-cookie-badge {
	font-size: 11px;
	font-weight: 700;
	color: var(--ka-orange-hover, #e07d16);
	background: var(--ka-cream-3, #fbe9d5);
	border-radius: 999px;
	padding: 4px 11px;
	white-space: nowrap;
}

/* ---- Switch ---- */

.ka-cookie-switch {
	position: relative;
	display: inline-flex;
	flex: none;
	width: 44px;
	height: 25px;
	cursor: pointer;
}

.ka-cookie-switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.ka-cookie-slider {
	position: absolute;
	inset: 0;
	background: #d5cdbf;
	border-radius: 999px;
	transition: background-color .18s ease;
}

.ka-cookie-slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 19px;
	height: 19px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
	transition: transform .18s ease;
}

.ka-cookie-switch input:checked + .ka-cookie-slider {
	background: var(--ka-orange);
}

.ka-cookie-switch input:checked + .ka-cookie-slider::before {
	transform: translateX(19px);
}

.ka-cookie-switch input:focus-visible + .ka-cookie-slider {
	outline: 2px solid var(--ka-magenta);
	outline-offset: 2px;
}

.ka-cookie-panel-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}

/* ---- Animasyonlar ---- */

@keyframes kaCookieUp {
	from { opacity: 0; transform: translate(-50%, 24px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes kaCookiePop {
	from { opacity: 0; transform: translate(-50%, -50%) scale(.96); }
	to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

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

@media (prefers-reduced-motion: reduce) {
	.ka-cookie-banner,
	.ka-cookie-panel,
	.ka-cookie-overlay {
		animation-duration: .01ms;
	}
}

/* ---- Responsive ---- */

@media (max-width: 720px) {
	.ka-cookie-banner {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		bottom: 12px;
		padding: 18px 18px 20px;
	}

	.ka-cookie-banner-actions {
		justify-content: stretch;
	}

	.ka-cookie-banner-actions .ka-cookie-btn-line,
	.ka-cookie-banner-actions .ka-cookie-btn-solid {
		flex: 1;
	}
}
