/* ==================================================================
 * Checkout Notifi – notifikácia po pridaní do košíka
 * Písmo dedí z témy; farby tlačidla sa nastavujú v administrácii.
 * ================================================================== */

/* ---------- Zámok scrollu pod otvoreným oknom ---------- */
html.ahn-cn-lock,
html.ahn-cn-lock body {
	overflow: hidden;
}

/* ---------- Koreň a pozadie ---------- */
.ahn-cn {
	--ahn-cn-accent: #f5b800;
	--ahn-cn-accent-text: #1d1f21;
	--ahn-cn-ink: #1d1f21;
	--ahn-cn-muted: #5b6168;
	--ahn-cn-line: #d5d8dc;

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	color: var(--ahn-cn-ink);
	font: inherit;
	line-height: 1.45;
}

.ahn-cn[hidden] {
	display: none;
}

.ahn-cn .ahn-cn__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 22, 25, 0.55);
	opacity: 0;
	transition: opacity 0.2s ease;
}

/* ---------- Dialóg ---------- */
.ahn-cn .ahn-cn__dialog {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 460px;
	padding: 22px 24px 24px;
	background: #fff;
	border-top: 5px solid var(--ahn-cn-accent);
	border-radius: 6px;
	box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.2s ease, transform 0.22s ease;
	outline: none;
}

.ahn-cn.is-open .ahn-cn__backdrop { opacity: 1; }
.ahn-cn.is-open .ahn-cn__dialog   { opacity: 1; transform: none; }

/* Reset okrajov, ktoré témy radi pridávajú */
.ahn-cn .ahn-cn__dialog p {
	margin: 0;
	padding: 0;
}

/* ---------- Zatváracie tlačidlo ---------- */
.ahn-cn .ahn-cn__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ahn-cn-muted);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
}

.ahn-cn .ahn-cn__close:hover {
	background: #f1f2f4;
	color: var(--ahn-cn-ink);
}

/* ---------- Stavový riadok ---------- */
.ahn-cn .ahn-cn__status {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-right: 40px;
	font-size: 1.05rem;
	font-weight: 700;
}

.ahn-cn .ahn-cn__check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #1f8a4c;
	color: #fff;
}

/* ---------- Produkt ---------- */
.ahn-cn .ahn-cn__product {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 18px;
	padding: 12px;
	border: 1px solid var(--ahn-cn-line);
	border-radius: 6px;
}

.ahn-cn .ahn-cn__img {
	flex: 0 0 auto;
	width: 88px;
	height: 88px;
	max-width: none;
	object-fit: contain;
	background: #f6f7f8;
	border-radius: 4px;
}

.ahn-cn .ahn-cn__info {
	min-width: 0;
}

.ahn-cn .ahn-cn__msg {
	font-size: 0.95rem;
	overflow-wrap: anywhere;
}

.ahn-cn .ahn-cn__msg strong {
	font-weight: 700;
}

.ahn-cn .ahn-cn__qty {
	margin-top: 4px;
	color: var(--ahn-cn-muted);
	font-size: 0.875rem;
}

.ahn-cn .ahn-cn__qty[hidden] {
	display: none;
}

.ahn-cn .ahn-cn__question {
	margin-top: 16px;
	color: var(--ahn-cn-muted);
	font-size: 0.95rem;
}

/* ---------- Tlačidlá ---------- */
.ahn-cn .ahn-cn__actions {
	display: flex;
	gap: 10px;
	margin-top: 16px;
}

.ahn-cn .ahn-cn__btn {
	display: inline-flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 48px;
	padding: 10px 14px;
	border-radius: 5px;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}

.ahn-cn .ahn-cn__btn--primary {
	background: var(--ahn-cn-accent);
	border: 2px solid var(--ahn-cn-accent);
	color: var(--ahn-cn-accent-text);
}

.ahn-cn .ahn-cn__btn--primary:hover {
	filter: brightness(0.93);
	color: var(--ahn-cn-accent-text);
}

.ahn-cn .ahn-cn__btn--secondary {
	background: #fff;
	border: 2px solid var(--ahn-cn-line);
	color: var(--ahn-cn-ink);
}

.ahn-cn .ahn-cn__btn--secondary:hover {
	border-color: var(--ahn-cn-muted);
	color: var(--ahn-cn-ink);
}

/* ---------- Viditeľný fokus pre klávesnicu ---------- */
.ahn-cn .ahn-cn__btn:focus-visible,
.ahn-cn .ahn-cn__close:focus-visible {
	outline: 3px solid #1a5fb4;
	outline-offset: 2px;
}

/* ---------- Mobil – spodný panel, tlačidlá pod sebou ---------- */
@media (max-width: 560px) {
	.ahn-cn {
		align-items: flex-end;
		padding: 0;
	}

	.ahn-cn .ahn-cn__dialog {
		max-width: none;
		padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
		border-radius: 12px 12px 0 0;
		transform: translateY(100%);
	}

	.ahn-cn .ahn-cn__img {
		width: 72px;
		height: 72px;
	}

	.ahn-cn .ahn-cn__actions {
		flex-direction: column-reverse;
	}

	.ahn-cn .ahn-cn__btn {
		flex: 0 0 auto;
		width: 100%;
	}
}

/* ---------- Obmedzený pohyb ---------- */
@media (prefers-reduced-motion: reduce) {
	.ahn-cn .ahn-cn__backdrop,
	.ahn-cn .ahn-cn__dialog,
	.ahn-cn .ahn-cn__btn {
		transition: none;
	}

	.ahn-cn .ahn-cn__dialog {
		transform: none;
	}
}
