/*
 * Buy box of a phone on najlepsiemobily – steps layout (BuyBox, filter mobilky_buybox_steps; inc/buy-choice.php):
 * properties as the panel header, choices as a numbered stepper with a line, price + availability + cart in
 * a white summary card, installments full width under it, "Čo vložiť do košíka" in the card and in the
 * pinned bar (desktop too, nm-buy-choice.js).
 */

/* Properties (Záruka / eSIM / Distribúcia) as the panel header */
.amtc-npp .buy-panel--steps > .feature-badges {
	display: flex; justify-content: space-between; gap: 4px 14px; margin: 0; padding: 10px 18px;
	border-bottom: 1px solid var(--brand-tint2); background: #fff;
}
.amtc-npp .buy-panel--steps > .feature-badges .f-badge {
	height: auto; padding: 2px 0; border: 0; background: none; color: var(--nd-c-ink);
	text-decoration: underline dotted; text-underline-offset: 3px;
}
.amtc-npp .buy-panel--steps > .feature-badges .f-badge b { font-weight: 600; }

.amtc-npp .buy-panel--steps .buy-panel-body {
	display: flex; flex-wrap: wrap; align-items: stretch; column-gap: 10px; counter-reset: nm-step; padding: 18px !important;
}
.amtc-npp .buy-panel--steps .buy-panel-body > * { flex: 0 0 100%; order: 2; min-width: 0; }

/* Stepper */
.amtc-npp .buy-panel--steps .variant-group { counter-increment: nm-step; position: relative; margin: 0; padding: 0 0 16px 38px; }
.amtc-npp .buy-panel--steps .variant-group::before {
	content: counter(nm-step); position: absolute; top: -2px; left: 0; z-index: 1; display: grid; place-items: center;
	width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700;
}
.amtc-npp .buy-panel--steps .variant-group::after {
	content: ""; position: absolute; top: 26px; bottom: 0; left: 12px; width: 2px; background: var(--brand-tint2);
}
.amtc-npp .buy-panel--steps .variant-label {
	display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; color: var(--nd-c-ink);
	font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.amtc-npp .buy-panel--steps .variant-label b { color: var(--head); font-size: 15px; letter-spacing: 0; text-transform: none; }
.amtc-npp .buy-panel--steps .chips .chip { height: 40px; padding: 0 14px; border-radius: var(--nd-radius-m); background: #fff; line-height: 37px; }
.amtc-npp .buy-panel--steps .chips .chip.active b::before { content: "✓ "; color: var(--cta-dark, #8eb201); }
.amtc-npp .buy-panel--steps .swatches .swatch { width: 36px; height: 36px; border-radius: var(--nd-radius-m); background: #fff; }
.amtc-npp .buy-panel--steps .swatch .dot { width: 24px; height: 24px; border-radius: 5px; }

/* Summary card: price (top), availability, "Čo vložiť do košíka", cart (bottom) */
.amtc-npp .buy-panel--steps .buy-panel-body > .price-block,
.amtc-npp .buy-panel--steps .buy-panel-body > .avail-row,
.amtc-npp .buy-panel--steps .buy-panel-body > .nm-buy-choice,
.amtc-npp .buy-panel--steps .buy-panel-body > .cta-row {
	order: 3; margin: 0; padding-right: 16px; padding-left: 16px;
	border: 1px solid var(--brand-tint2); border-width: 0 1px; background: #fff;
}
.amtc-npp .buy-panel--steps .buy-panel-body > .price-block {
	display: grid; grid-template-columns: auto 1fr; grid-template-areas: "lbl save" "cur old" "cur vat" "cur promo";
	align-items: end; gap: 0 14px; padding-top: 14px; padding-bottom: 10px;
	border-top-width: 1px; border-radius: var(--nd-radius) var(--nd-radius) 0 0;
}
.amtc-npp .buy-panel--steps .price-label {
	grid-area: lbl; margin-bottom: 4px; color: var(--nd-c-ink); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.amtc-npp .buy-panel--steps .price-block .price-line { display: contents; }
.amtc-npp .buy-panel--steps .price-block .price-save { grid-area: save; justify-self: end; align-self: start; padding: 3px 8px; font-size: 12px; }
.amtc-npp .buy-panel--steps .price-block .price-old { grid-area: old; justify-self: start; font-size: 15px; }
.amtc-npp .buy-panel--steps .price-block .price-vat { grid-area: vat; font-size: 13px; }
.amtc-npp .buy-panel--steps .price-block .price-current { grid-area: cur; align-self: center; font-size: 38px; }

/* "Cena bez kupónu" under "Cena s DPH": no frame, grey like the old price; a click still opens the coupon window */
.amtc-npp .buy-panel--steps .price-block > .promo-strip {
	grid-area: promo; justify-self: start; display: inline; width: auto; margin: 0; padding: 0 0 4px;
	border: 0; border-radius: 0; background: none; color: var(--muted); font-size: 13px; line-height: 1.3; text-align: left; cursor: pointer;
}
.amtc-npp .buy-panel--steps .price-block > .promo-strip:hover { background: none; }
.amtc-npp .buy-panel--steps .price-block > .promo-strip .promo-ic { display: none; }
.amtc-npp .buy-panel--steps .price-block > .promo-strip :is(.promo-label, .promo-label u, .promo-label b, .promo-price) {
	display: inline; margin: 0; color: var(--muted); font-size: 13px; font-weight: 400; letter-spacing: 0; text-decoration: none;
}
.amtc-npp .buy-panel--steps .price-block > .promo-strip .promo-label u { text-decoration: underline dotted; text-underline-offset: 3px; }
.amtc-npp .buy-panel--steps .price-block > .promo-strip .promo-price::before { content: "· "; }

.amtc-npp .buy-panel--steps .buy-panel-body > .avail-row {
	order: 4; gap: 6px 14px; padding-top: 10px; padding-bottom: 2px; border-top: 1px dashed var(--brand-tint2); font-size: 13px;
}
.amtc-npp .buy-panel--steps .avail-row .stock-ok { font-size: 14px; }
.amtc-npp .buy-panel--steps .avail-row .ship-highlight { flex-basis: 100%; padding: 0; border: 0; background: none; font-weight: 400; }
.amtc-npp .buy-panel--steps .buy-panel-body > .nm-buy-choice { order: 5; padding-top: 12px; border-top: 1px dashed var(--brand-tint2); }
.amtc-npp .buy-panel--steps .buy-panel-body > .cta-row {
	order: 5; padding-top: 12px; padding-bottom: 16px; border-bottom-width: 1px; border-radius: 0 0 var(--nd-radius) var(--nd-radius);
}
.amtc-npp .buy-panel--steps .cta-row .btn-cart { height: 52px; font-size: 17px; }
.amtc-npp .buy-panel--steps .cta-row :is(.qty button, .qty input) { height: 52px; }
.amtc-npp .buy-panel--steps .btn-cart.is-addons,
.amtc-npp .amtc-sticky-buy .asb-cta.is-addons { background: var(--primary); }
.amtc-npp .buy-panel--steps .btn-cart.is-addons:hover { background: var(--primary-semi-dark, var(--brand-dark)); }
.amtc-npp .buy-panel--steps .btn-cart.is-none { background: #c3cdd4; }

/* Installments full width under the card, with their button */
.amtc-npp .buy-panel--steps .buy-panel-body > :is(.splatky-bar, .splatky-embed-hidden) { order: 6; }
.amtc-npp .buy-panel--steps .buy-panel-body > .splatky-bar { margin: 10px 0 0; }
.amtc-npp .buy-panel--steps .buy-panel-body > .services { order: 8; }

/* "Čo vložiť do košíka" – checkboxes */
.amtc-npp .nm-buy-choice[hidden] { display: none !important; }
.amtc-npp .nm-buy-choice { display: grid; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--brand-tint2); font-size: 14px; }
.amtc-npp .nm-buy-choice__head { color: var(--nd-c-ink); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.amtc-npp .nm-buy-choice label {
	display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 12px; cursor: pointer;
	border: 1px solid var(--brand-tint2); border-radius: var(--nd-radius-m); color: var(--head);
}
.amtc-npp .nm-buy-choice label:has(input:checked) { border-color: var(--cta); background: var(--accent-ultra-light); }
.amtc-npp .nm-buy-choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--cta-dark, #8eb201); }
.amtc-npp .nm-buy-choice label span { flex: 1 1 auto; font-weight: 600; }
.amtc-npp .nm-buy-choice label small { color: var(--nd-c-ink); font-size: 13px; font-weight: 400; }
.amtc-npp .nm-buy-choice label b { white-space: nowrap; }

/* Pinned bar: the same checkboxes, compact */
.amtc-npp .amtc-sticky-buy > .asb-head { order: 1; }
.amtc-npp .amtc-sticky-buy > .nm-buy-choice--bar { order: 2; }
.amtc-npp .amtc-sticky-buy > .asb-price { order: 3; }
.amtc-npp .amtc-sticky-buy > :is(.asb-cta, .asb-qty) { order: 4; }
.amtc-npp .nm-buy-choice--bar { display: flex; flex: 0 1 auto; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; background: none; font-size: 13px; }
.amtc-npp .nm-buy-choice--bar label { gap: 7px; padding: 6px 10px; font-size: 13px; white-space: nowrap; }
.amtc-npp .nm-buy-choice--bar label small { display: none; }
.amtc-npp .nm-buy-choice--bar input { width: 16px; height: 16px; }
/* With the choice (or with the accessories' sum on the button) the phone's price in the bar would mislead */
.amtc-npp .amtc-sticky-buy:is(.has-choice, :has(.asb-cta.is-addons)) .asb-price { display: none; }

/* Desktop: the pinned bar shows once the cart button has scrolled away (body.nm-asb-on) */
.amtc-npp .asb-head { display: none; }
@media (min-width: 769px) {
	.amtc-npp .amtc-sticky-buy {
		position: fixed; left: 50%; bottom: 0; z-index: 9990; display: flex; align-items: center; gap: 18px;
		width: min(1180px, calc(100vw - 32px)); padding: 10px 12px 10px 14px; transform: translate(-50%, 110%);
		border: 1px solid var(--brand-tint2); border-bottom: 0; border-radius: var(--nd-radius) var(--nd-radius) 0 0;
		background: #fff; box-shadow: 0 -6px 24px rgba(0, 0, 0, .10); transition: transform .25s ease;
	}
	.nm-asb-on .amtc-npp .amtc-sticky-buy { transform: translate(-50%, 0); }
	.amtc-npp .asb-head { display: flex; flex: 1 1 auto; align-items: center; gap: 12px; min-width: 0; }
	.amtc-npp .asb-head img { width: 44px; height: 44px; object-fit: contain; }
	.amtc-npp .asb-head span { min-width: 0; line-height: 1.3; }
	.amtc-npp .asb-head b { display: block; overflow: hidden; color: var(--head); font-size: 15px; white-space: nowrap; text-overflow: ellipsis; }
	.amtc-npp .asb-head small { color: var(--nd-c-ink); font-size: 13px; }
	.amtc-npp .amtc-sticky-buy .asb-price { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; line-height: 1.1; }
	.amtc-npp .amtc-sticky-buy .asb-old { color: var(--muted); font-size: 12px; text-decoration: line-through; }
	.amtc-npp .amtc-sticky-buy .asb-now { color: var(--head); font-size: 22px; font-weight: 700; }
	.amtc-npp .amtc-sticky-buy .asb-cta {
		display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; min-width: 260px; height: 48px;
		padding: 0 26px; border: 0; border-radius: var(--btn-radius); background: var(--cta); color: #fff;
		font-size: 16px; font-weight: 700; cursor: pointer;
	}
	.amtc-npp .amtc-sticky-buy .asb-cta:hover { background: var(--cta-dark); }
	.amtc-npp .amtc-sticky-buy .asb-cta.is-addons { background: var(--primary); }
	.amtc-npp .amtc-sticky-buy .asb-qty { display: none !important; }
}

/* ≤768 px the cart is in the pinned bar (cta-row hidden): the card ends with availability or the choice;
 * the bar's checkboxes take a full row above the price and button. */
@media (max-width: 768px) {
	.amtc-npp .buy-panel--steps .buy-panel-body > .avail-row { padding-bottom: 14px; border-bottom-width: 1px; border-radius: 0 0 var(--nd-radius) var(--nd-radius); }
	.amtc-npp .buy-panel--steps .buy-panel-body:has(> .nm-buy-choice:not([hidden])) > .avail-row { padding-bottom: 10px; border-bottom-width: 0; border-radius: 0; }
	.amtc-npp .buy-panel--steps .buy-panel-body > .nm-buy-choice { padding-bottom: 14px; border-bottom-width: 1px; border-radius: 0 0 var(--nd-radius) var(--nd-radius); }
	.amtc-npp .amtc-sticky-buy.has-choice { flex-wrap: wrap; row-gap: 8px; }
	.amtc-npp .nm-buy-choice--bar { order: 0 !important; flex: 1 1 100%; }
	.amtc-npp .nm-buy-choice--bar label { flex: 1 1 0; min-width: 0; padding: 6px 8px; font-size: 12px; }
	.amtc-npp .nm-buy-choice--bar label span { overflow: hidden; text-overflow: ellipsis; }
	.amtc-npp:has(.amtc-sticky-buy.has-choice) { padding-bottom: 130px; }
}
@media (max-width: 560px) {
	.amtc-npp .buy-panel--steps > .feature-badges { justify-content: flex-start; padding: 8px 12px; }
	.amtc-npp .buy-panel--steps .buy-panel-body { padding: 14px 12px !important; }
	.amtc-npp .buy-panel--steps .buy-panel-body > .price-block { grid-template-areas: "lbl lbl" "cur old" "cur vat" "promo promo" "save save"; }
	.amtc-npp .buy-panel--steps .price-block > .promo-strip { padding: 4px 0 0; }
	.amtc-npp .buy-panel--steps .price-block .price-save { justify-self: start; margin-top: 6px; }
	.amtc-npp .buy-panel--steps .price-block .price-current { font-size: 32px; }
}
