/* Consent panel and inert Google Maps placeholder. */
.yigit-cookie[hidden],
.yigit-cookie [hidden] {
	display: none !important;
}

.yigit-cookie {
	position: fixed;
	bottom: 18px;
	left: 50%;
	z-index: 1002; /* Above the sticky header (1000) and the mobile navigation (1001). */
	display: flex;
	width: min(760px, calc(100% - 24px));
	max-height: calc(100dvh - 36px);
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--color-line);
	border-top: 4px solid var(--color-brand);
	border-radius: var(--radius-md);
	background: var(--color-surface);
	box-shadow: var(--shadow-lg);
	color: var(--color-ink-soft);
	transform: translate(-50%, 0);
	/* Visibility is the [hidden] attribute alone. Nothing here may depend on a
	   class that only JavaScript adds, or an "unused CSS" optimiser would strip
	   it and leave the panel invisible. */
	animation: yigit-cookie-in 180ms ease both;
}

@keyframes yigit-cookie-in {
	from {
		opacity: 0;
		transform: translate(-50%, 18px);
	}

	to {
		opacity: 1;
		transform: translate(-50%, 0);
	}
}

.yigit-cookie__inner {
	display: flex;
	min-height: 0;
	max-height: inherit;
	flex-direction: column;
}

.yigit-cookie__scroll {
	min-height: 0;
	flex: 1 1 auto;
	padding: 24px 26px 10px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.yigit-cookie__footer {
	position: relative;
	z-index: 1;
	flex: 0 0 auto;
	padding: 0 26px 18px;
	background: var(--color-surface);
}

.yigit-cookie__intro {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.yigit-cookie__shield {
	display: inline-flex;
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--color-brand-light);
	color: var(--color-brand-dark);
}

.yigit-cookie__shield .yigit-icon {
	width: 23px;
	height: 23px;
}

.yigit-cookie h2 {
	margin: 0 0 6px;
	color: var(--color-ink);
	font-size: 1.16rem;
	font-weight: 750;
	line-height: 1.3;
}

.yigit-cookie p {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.55;
}

.yigit-cookie__necessary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 20px;
	padding: 12px 15px;
	border-radius: var(--radius-sm);
	background: var(--color-surface-soft);
	color: var(--color-ink);
	font-size: 0.87rem;
}

.yigit-cookie__necessary > span:first-child {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.yigit-cookie__necessary small {
	color: var(--color-muted);
	font-size: 0.76rem;
}

.yigit-cookie__necessary > span:last-child {
	flex: 0 0 auto;
	color: var(--color-brand-dark);
	font-weight: 720;
}

.yigit-cookie__services {
	display: grid;
	gap: 9px;
	margin: 10px 0 0;
	padding: 0;
	border: 0;
	grid-template-columns: 1fr;
}

.yigit-cookie__service {
	position: relative;
	display: flex;
	min-width: 0;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 15px;
	border: 1px solid var(--color-line);
	border-radius: var(--radius-sm);
	background: var(--color-surface);
	color: var(--color-ink);
	cursor: pointer;
	font-size: 0.86rem;
	font-weight: 720;
}

.yigit-cookie__service-copy {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 2px;
}

.yigit-cookie__service-copy strong {
	font-size: 0.86rem;
	line-height: 1.3;
}

.yigit-cookie__service-copy small {
	color: var(--color-muted);
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.4;
}

.yigit-cookie__service input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.yigit-cookie__switch {
	position: relative;
	width: 38px;
	height: 21px;
	flex: 0 0 38px;
	border-radius: 999px;
	background: #aeb6bc;
	transition: background-color 180ms ease;
}

.yigit-cookie__switch::after {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(17, 45, 69, 0.2);
	content: "";
	transition: transform 180ms ease;
}

.yigit-cookie__service input:checked + .yigit-cookie__switch {
	background: var(--color-brand);
}

.yigit-cookie__service input:checked + .yigit-cookie__switch::after {
	transform: translateX(17px);
}

.yigit-cookie__service input:focus-visible + .yigit-cookie__switch {
	outline: 3px solid #45cfc1;
	outline-offset: 3px;
}

.yigit-cookie .yigit-cookie__note {
	margin-top: 12px;
	color: var(--color-muted);
	font-size: 0.76rem;
	line-height: 1.5;
}

.yigit-cookie__note a {
	color: var(--color-brand-dark);
}

.yigit-cookie__actions {
	display: grid;
	gap: 10px;
	padding-top: 16px;
	border-top: 1px solid var(--color-line);
	grid-template-columns: 1.2fr 1.2fr 1fr;
}

.yigit-cookie__actions--summary {
	grid-template-columns: 1fr 1fr;
}

.yigit-cookie__actions--summary .yigit-cookie__customize {
	grid-column: 1 / -1;
}

.yigit-cookie__button {
	min-height: 46px;
	padding: 11px 18px;
	border: 1px solid transparent;
	border-radius: 999px;
	cursor: pointer;
	font: inherit;
	font-size: 0.87rem;
	font-weight: 720;
	line-height: 1.25;
	text-align: center;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.yigit-cookie__button--primary {
	background: var(--color-brand);
	box-shadow: 0 10px 24px rgba(15, 157, 145, 0.22);
	color: #ffffff;
}

.yigit-cookie__button--primary:hover {
	background: var(--color-brand-dark);
	box-shadow: 0 13px 28px rgba(15, 157, 145, 0.3);
}

.yigit-cookie__button--secondary {
	border-color: #b9c9d1;
	background: var(--color-surface);
	color: var(--color-ink);
}

.yigit-cookie__button--secondary:hover {
	border-color: var(--color-brand);
	color: var(--color-brand-dark);
}

.yigit-cookie__customize {
	justify-self: center;
	padding: 4px 8px;
	border: 0;
	background: transparent;
	color: var(--color-brand-dark);
	cursor: pointer;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 720;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.yigit-cookie__customize:hover {
	color: var(--color-ink);
}

.yigit-cookie__legal {
	display: flex;
	justify-content: center;
	gap: 18px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--color-line);
}

.yigit-cookie__legal a {
	color: var(--color-ink);
	font-size: 0.78rem;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.yigit-cookie__legal a:hover {
	color: var(--color-brand-dark);
}

/* Placeholder shown instead of an unconsented Google Maps embed. */
.yigit-cookie-placeholder {
	display: flex;
	width: 100%;
	min-height: 260px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 20px auto;
	padding: 30px;
	border: 1px solid var(--color-line);
	border-radius: var(--radius-md);
	background: var(--color-surface-soft);
	color: var(--color-ink-soft);
	text-align: center;
}

.yigit-cookie-placeholder__icon {
	display: inline-flex;
	width: 58px;
	height: 58px;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
	border-radius: 50%;
	background: var(--color-surface);
	box-shadow: var(--shadow-sm);
	color: var(--color-brand);
}

.yigit-cookie-placeholder__icon .yigit-icon {
	width: 28px;
	height: 28px;
}

.yigit-cookie-placeholder__title {
	color: var(--color-ink);
	font-size: 1.05rem;
	font-weight: 750;
}

.yigit-cookie-placeholder p {
	max-width: 560px;
	margin: 8px 0 18px;
	color: var(--color-muted);
	font-size: 0.87rem;
	line-height: 1.55;
}

.yigit-cookie-placeholder template {
	display: none;
}

/* Inside the contact map card the placeholder replaces the iframe, so it takes
   the same box instead of adding a second frame. */
.contact-map-card > .yigit-cookie-placeholder {
	min-height: clamp(390px, 52vw, 620px);
	margin: 0;
	border: 0;
	border-radius: 0;
	background: linear-gradient(145deg, var(--color-brand-light), var(--color-surface-soft));
}

/* Reopen link inside the dark footer bar. */
.yigit-cookie-settings {
	padding: 0;
	border: 0;
	background: transparent;
	color: #c5d5df;
	cursor: pointer;
	font: inherit;
	font-size: 0.75rem;
	text-decoration: none;
}

.yigit-cookie-settings:hover {
	color: #70ded3;
}

/* Keep the floating WhatsApp button clear of the open panel. The :has() rule
   works on its own; the class is the fallback for browsers without it. */
body.consent-is-open .floating-whatsapp,
body:has(.yigit-cookie:not([hidden])) .floating-whatsapp {
	opacity: 0;
	pointer-events: none;
}

@media (max-width: 680px) {
	.yigit-cookie {
		bottom: 8px;
		width: calc(100% - 16px);
		max-height: calc(100dvh - 16px);
	}

	.yigit-cookie__inner {
		max-height: calc(100dvh - 20px);
	}

	.yigit-cookie__scroll {
		padding: 20px 18px 10px;
	}

	.yigit-cookie__footer {
		padding: 0 18px 14px;
		box-shadow: 0 -8px 18px rgba(17, 45, 69, 0.05);
	}

	.yigit-cookie__shield {
		width: 38px;
		height: 38px;
		flex-basis: 38px;
	}

	.yigit-cookie__actions,
	.yigit-cookie__actions--summary {
		grid-template-columns: 1fr;
	}

	.yigit-cookie__actions--summary .yigit-cookie__customize {
		grid-column: auto;
	}

	.yigit-cookie__necessary {
		align-items: flex-start;
	}

	.yigit-cookie-placeholder {
		min-height: 230px;
		padding: 24px 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.yigit-cookie {
		animation: none;
	}

	.yigit-cookie__switch,
	.yigit-cookie__switch::after {
		transition: none;
	}
}

@media print {
	.yigit-cookie,
	.yigit-cookie-settings {
		display: none !important;
	}
}
