.aio-atc-modal {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.aio-atc-modal.is-open {
	display: flex;
}

.aio-atc-modal[hidden] {
	display: none !important;
}

.aio-atc-modal.is-open[hidden] {
	display: flex !important;
}

.aio-atc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
}

.aio-atc-modal__panel {
	position: relative;
	z-index: 1;
	width: 50%;
	max-width: 50%;
	min-width: min(320px, 100%);
	max-height: calc(100vh - 48px);
}

@media (max-width: 768px) {
	.aio-atc-modal__panel {
		width: 100%;
		max-width: 100%;
	}
}

.aio-atc-modal__close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	transform: translateY(calc(-100% - 8px));
}

.aio-atc-modal__close:hover,
.aio-atc-modal__close:focus,
.aio-atc-modal__close:focus-visible {
	background: transparent !important;
	color: #fff !important;
	outline: none;
	box-shadow: none;
	opacity: 0.85;
}

.aio-atc-modal__close-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	pointer-events: none;
}

.aio-atc-modal__close-icon svg {
	display: block;
	width: 24px;
	height: 24px;
	color: #fff;
}

.aio-atc-modal__close-icon svg path {
	stroke: #fff !important;
}

.aio-atc-modal__dialog {
	width: 100%;
	max-height: calc(100vh - 48px);
	overflow: hidden;
	border-radius: 0;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.aio-atc-modal__dialog [class*="kb-row-layout"],
.aio-atc-modal__dialog .kt-row-column-wrap {
	border-radius: 0 !important;
}

/* Kadence sets transition:all .3s ease on .kt-inside-inner-col globally.
   Inside the modal this causes every layout property to animate on open,
   producing a visible "loading" jank. Kill it here. */
.aio-atc-modal__dialog .kt-inside-inner-col {
	transition: none !important;
}

.aio-atc-modal__dialog .aio-atc-scroll-shell {
	position: relative;
}

.aio-atc-modal__dialog .kadence-column328_6472a7-f9 {
	position: relative;
	max-height: 200px;
	height: 200px;
	overflow-y: auto;
	box-sizing: border-box;
	border: 1px solid transparent;
	border-radius: 8px;
	margin-bottom: 15px;
}

.aio-atc-modal__dialog .kadence-column328_6472a7-f9.aio-atc-scroll-coach {
	border-color: #47bfff;
	animation: aio-atc-coach-glow 1.6s ease-in-out infinite;
}

.aio-atc-modal__dialog .kadence-column328_6472a7-f9 .kt-inside-inner-col {
	position: relative;
	overflow: visible;
}

.aio-atc-modal__dialog .kadence-column328_120395-c5 {
	position: relative;
	height: auto;
	max-height: none;
	overflow-y: visible;
	box-sizing: border-box;
	border-radius: 4px;
}

.aio-atc-modal__dialog .kadence-column328_120395-c5 > .kt-inside-inner-col {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* When there are multiple items, cap list height and enable scrolling. */
.aio-atc-modal__dialog .kadence-column328_120395-c5.aio-atc-list--scroll {
	max-height: 200px;
	overflow-y: auto;
	overflow-x: hidden;
}

.aio-atc-modal__dialog .kadence-column328_120395-c5.aio-atc-list--animating {
	overflow-y: hidden;
	transition: height 220ms ease;
	will-change: height;
}

.aio-atc-modal__dialog .aio-atc-items-mount {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* Match Kadence item row (40/60 + gap-md), sized to real content blocks — not a flat 200px. */
.aio-atc-skeleton-item {
	display: grid;
	grid-template-columns:
		minmax(0, calc(40% - ((var(--global-kb-gap-md, 2rem) * 1) / 2)))
		minmax(0, calc(60% - ((var(--global-kb-gap-md, 2rem) * 1) / 2)));
	column-gap: var(--global-kb-gap-md, 2rem);
	row-gap: var(--global-kb-gap-md, 2rem);
	align-items: stretch;
	box-sizing: border-box;
	padding: 0;
}

.aio-atc-skeleton-thumb,
.aio-atc-skeleton-line {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.08);
}

.aio-atc-skeleton-thumb::after,
.aio-atc-skeleton-line::after {
	content: "";
	position: absolute;
	inset: 0;
	transform: translateX(-100%);
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.14) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	animation: aio-atc-skeleton-shimmer 1.2s ease-in-out infinite;
}

.aio-atc-skeleton-thumb {
	/* Stretches to details-column height (same as Kadence image col). */
	align-self: stretch;
	min-height: 0;
}

.aio-atc-skeleton-body {
	display: flex;
	flex-direction: column;
	gap: 0;
	justify-content: flex-start;
	min-width: 0;
}

/* Mirror real blocks: title 18px, platform icons ~50px, price pill, remove link. */
.aio-atc-skeleton-line {
	height: 14px;
}

.aio-atc-skeleton-line--title {
	width: 78%;
	height: 18px;
	margin-bottom: 5px;
}

.aio-atc-skeleton-line--icons {
	width: 50px;
	height: 50px;
	margin-bottom: 0;
	border-radius: 4px;
}

.aio-atc-skeleton-line--meta {
	width: 42%;
	height: 36px;
	margin-top: 0;
	align-self: flex-end;
}

.aio-atc-skeleton-line--action {
	width: 22%;
	height: 15px;
	margin-top: 10px;
	align-self: flex-end;
}

@keyframes aio-atc-skeleton-shimmer {
	100% {
		transform: translateX(100%);
	}
}

@media all and (max-width: 1024px) {
	.aio-atc-skeleton-item {
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	}
}

@media all and (max-width: 767px) {
	/* Keep dismiss/view-cart buttons visible: tighten vertical space. */
	.aio-atc-modal__dialog .kadence-column328_6472a7-f9 {
		height: 150px;
		max-height: 150px;
	}

	.aio-atc-modal__dialog .kadence-column328_837179-f7 {
		margin-top: 15px !important;
	}

	.aio-atc-modal__dialog .kadence-column328_120395-c5 > .kt-inside-inner-col,
	.aio-atc-modal__dialog .aio-atc-items-mount {
		gap: 8px;
	}

	/* Keep Kadence stacked mobile layout — only scale heights/fonts down. */
	.aio-atc-modal__dialog [class*="kb-row-layout-id328_09118f-1d"] > .kt-row-column-wrap {
		row-gap: 8px;
	}

	/* Featured image column: bg lives on .kt-inside-inner-col — keep height there. */
	.aio-atc-modal__dialog [class*="kadence-column328_ca01d3-76"] {
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
	}

	.aio-atc-modal__dialog [class*="kadence-column328_ca01d3-76"] > .kt-inside-inner-col {
		height: 100px !important;
		min-height: 100px !important;
		max-height: 100px !important;
		background-size: cover !important;
		background-position: center !important;
		background-repeat: no-repeat !important;
	}

	/* Product title */
	.aio-atc-modal__dialog [class*="kt-adv-heading328_36c57b-30"],
	.aio-atc-modal__dialog [class*="kt-adv-heading328_36c57b-30"] .kb-adv-text-inner {
		font-size: 14px !important;
		line-height: 1.3 !important;
	}

	/* Discount badge */
	.aio-atc-modal__dialog [class*="kt-adv-heading328_a6c542-df"],
	.aio-atc-modal__dialog [class*="kt-adv-heading328_a6c542-df"] .kb-adv-text-inner {
		font-size: 13px !important;
		padding: 6px 7px !important;
		line-height: 1.2 !important;
	}

	/* Price */
	.aio-atc-modal__dialog [class*="kt-adv-heading328_825ba2-dd"],
	.aio-atc-modal__dialog [class*="kt-adv-heading328_825ba2-dd"] .kb-adv-text-inner {
		font-size: 14px !important;
		line-height: 1.25 !important;
	}

	.aio-atc-modal__dialog [class*="kt-adv-heading328_825ba2-dd"] mark.kt-highlight,
	.aio-atc-modal__dialog [class*="kt-adv-heading328_825ba2-dd"] mark.kt-highlight s,
	.aio-atc-modal__dialog [class*="kt-adv-heading328_825ba2-dd"] > s {
		font-size: 11px !important;
	}

	/* Remove link */
	.aio-atc-modal__dialog [class*="kt-adv-heading328_fbddbd-77"],
	.aio-atc-modal__dialog [class*="kt-adv-heading-link328_fbddbd-77"] {
		font-size: 13px !important;
	}

	/* Platform icon row: shrink icons */
	.aio-atc-modal__dialog [class*="kadence-column328_7bb92e-a2"] img,
	.aio-atc-modal__dialog [class*="kadence-column328_7bb92e-a2"] svg,
	.aio-atc-modal__dialog [class*="kadence-column328_7bb92e-a2"] .kb-svg-icon-wrap {
		width: 18px !important;
		height: 18px !important;
		max-width: 18px !important;
		max-height: 18px !important;
	}

	/* Skeleton: same stacked UI, shorter. */
	.aio-atc-skeleton-item {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 8px;
	}

	.aio-atc-skeleton-thumb {
		width: 100%;
		height: 100px;
		min-height: 100px;
		align-self: auto;
	}

	.aio-atc-skeleton-line--title {
		width: 72%;
		height: 14px;
		margin-bottom: 6px;
	}

	.aio-atc-skeleton-line--icons {
		width: 40px;
		height: 18px;
		margin-bottom: 4px;
	}

	.aio-atc-skeleton-line--meta {
		width: 48%;
		height: 28px;
		margin-top: 2px;
	}

	.aio-atc-skeleton-line--action {
		width: 20%;
		height: 12px;
		margin-top: 6px;
	}
}

.aio-atc-modal__dialog .kadence-column328_6472a7-f9 .aio-atc-scroll-arrow {
	position: sticky;
	bottom: 10px;
	float: right;
	clear: both;
	width: 20px;
	height: 0;
	margin: 0 8px -48px auto;
	padding: 0;
	color: #47bfff;
	background: none;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	z-index: 5;
	overflow: visible;
}

.aio-atc-modal__dialog .kadence-column328_6472a7-f9 .aio-atc-scroll-arrow__icon {
	display: block;
	line-height: 0;
	height: 48px;
	filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.65));
}

.aio-atc-modal__dialog .kadence-column328_6472a7-f9.aio-atc-scroll-coach .aio-atc-scroll-arrow {
	opacity: 1;
	visibility: visible;
}

.aio-atc-modal__dialog .kadence-column328_6472a7-f9.aio-atc-scroll-coach .aio-atc-scroll-arrow__icon {
	animation: aio-atc-scroll-bounce 1.2s ease-in-out infinite;
}

.aio-atc-modal__dialog .kadence-column328_6472a7-f9 .aio-atc-scroll-arrow svg {
	display: block;
	width: 20px;
	height: 48px;
}

@keyframes aio-atc-scroll-bounce {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(5px);
	}
}

@keyframes aio-atc-coach-glow {
	0%,
	100% {
		border-color: #47bfff;
		box-shadow: 0 0 4px rgba(71, 191, 255, 0.35);
	}

	50% {
		border-color: #9bdcff;
		box-shadow:
			0 0 10px rgba(71, 191, 255, 0.9),
			0 0 22px rgba(71, 191, 255, 0.55),
			inset 0 0 8px rgba(71, 191, 255, 0.15);
	}
}

.aio-atc-modal__agree-item {
	display: block;
	width: 100%;
	list-style: none;
	margin-top: 10px;
	padding-left: 0;
}

.aio-atc-modal__agree-item::marker {
	content: none;
}

.aio-atc-modal__agree-wrap {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 14px 16px;
	border: 1px solid #47bfff;
	border-radius: 8px;
	background: rgba(71, 191, 255, 0.1);
	box-shadow: 0 0 0 1px rgba(71, 191, 255, 0.15);
}

.aio-atc-modal__agree-wrap.aio-atc-agree-coach {
	animation: aio-atc-agree-glow 1.6s ease-in-out infinite;
}

.aio-atc-agree-coach-tip {
	display: none;
	position: absolute;
	bottom: calc(100% + 12px);
	left: 12px;
	z-index: 6;
	max-width: calc(100% - 24px);
	padding: 10px 14px;
	border-radius: 8px;
	background: #222222;
	color: #fff;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
	white-space: normal;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
	pointer-events: none;
}

.aio-atc-agree-coach-tip::after {
	content: '';
	position: absolute;
	bottom: -8px;
	left: 18px;
	width: 0;
	height: 0;
	border-top: 8px solid #222222;
	border-right: 8px solid transparent;
	border-left: 8px solid transparent;
}

.aio-atc-modal__agree-wrap.aio-atc-agree-coach .aio-atc-agree-coach-tip {
	display: block;
	animation: aio-atc-agree-tip-bounce 1.2s ease-in-out infinite;
}

@keyframes aio-atc-agree-glow {
	0%,
	100% {
		border-color: #47bfff;
		box-shadow: 0 0 4px rgba(71, 191, 255, 0.35);
	}

	50% {
		border-color: #9bdcff;
		box-shadow:
			0 0 10px rgba(71, 191, 255, 0.85),
			0 0 20px rgba(71, 191, 255, 0.45);
	}
}

@keyframes aio-atc-agree-tip-bounce {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-4px);
	}
}

.aio-atc-modal__agree-label {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	align-items: center;
	width: 100%;
	min-width: 0;
	color: #fff;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
}

@media all and (max-width: 767px) {
	.aio-atc-modal__agree-label {
		font-size: 13px;
	}
}

.aio-atc-modal__agree-label input[type="checkbox"] {
	width: 1em;
	height: 1em;
	min-width: 1em;
	margin: 0;
	flex-shrink: 0;
	accent-color: #47bfff;
	cursor: pointer;
	border: 1px solid #47bfff;
	border-radius: 2px;
}

.aio-atc-modal__agree-label input[type="checkbox"]:focus-visible {
	outline: 2px solid #47bfff;
	outline-offset: 2px;
}

.aio-atc-modal__agree-label span {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 400;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Product title: max 2 lines, then ellipsis (covers per-item id suffixes). */
.aio-atc-modal__dialog [class*="kt-adv-heading328_36c57b-30"],
.aio-atc-modal__dialog [class*="kt-adv-heading328_36c57b-30"] .kb-adv-text-inner {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

body.aio-atc-modal-open {
	overflow: hidden;
}

.aio-store-link-disabled {
	background: #191919 !important;
	color: #fff !important;
	opacity: 1 !important;
	cursor: not-allowed;
}

.aio-store-link-form {
	margin-bottom: 0;
}

.aio-store-link-form .button {
	cursor: pointer;
}

.aio-store-link-form .aio-store-link-disabled {
	cursor: not-allowed;
}

.aio-atc-modal.is-loading .aio-atc-modal__dialog {
	/* Keep panel fully visible while committing — only block clicks. */
	pointer-events: none;
}

.aio-atc-modal__dialog .aio-atc-remove,
.aio-atc-modal__dialog .kt-adv-heading-link328_fbddbd-77 {
	cursor: pointer;
}

.aio-atc-modal__dialog .aio-atc-modal-btn[role="button"] {
	cursor: pointer;
}

/* Button row: always one line; back = text width, confirm = fills rest. */
#aio-atc-modal .kb-btns328_72c5e4-23,
.aio-atc-modal__dialog .kb-btns328_72c5e4-23 {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: stretch;
	width: 100%;
	gap: 8px;
}

#aio-atc-modal .kb-btns328_72c5e4-23 > *,
.aio-atc-modal__dialog .kb-btns328_72c5e4-23 > * {
	min-width: 0;
}

#aio-atc-modal .kb-btns328_72c5e4-23 > :first-child,
#aio-atc-modal .kb-btns328_72c5e4-23 .kb-btn328_54c294-68,
.aio-atc-modal__dialog .kb-btns328_72c5e4-23 > :first-child,
.aio-atc-modal__dialog .kb-btns328_72c5e4-23 .kb-btn328_54c294-68 {
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: none !important;
	box-sizing: border-box;
}

#aio-atc-modal .kb-btns328_72c5e4-23 > :last-child,
#aio-atc-modal .kb-btns328_72c5e4-23 .kb-btn328_5fe1ec-17,
.aio-atc-modal__dialog .kb-btns328_72c5e4-23 > :last-child,
.aio-atc-modal__dialog .kb-btns328_72c5e4-23 .kb-btn328_5fe1ec-17 {
	flex: 1 1 auto !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	box-sizing: border-box;
}

/* Force regular weight — theme/Woo .button often inherits bold. */
#aio-atc-modal .kb-btns328_72c5e4-23 .kb-button,
#aio-atc-modal .kb-btns328_72c5e4-23 .kt-button,
#aio-atc-modal .kb-btns328_72c5e4-23 .button,
#aio-atc-modal .kb-btns328_72c5e4-23 .kt-btn-inner-text,
#aio-atc-modal .kb-btns328_72c5e4-23 .kb-button *,
.aio-atc-modal .kb-btns328_72c5e4-23 .kb-button,
.aio-atc-modal .kb-btns328_72c5e4-23 .kt-button,
.aio-atc-modal .kb-btns328_72c5e4-23 .button,
.aio-atc-modal .kb-btns328_72c5e4-23 .kt-btn-inner-text,
.aio-atc-modal .kb-btns328_72c5e4-23 .kb-button * {
	font-weight: 400 !important;
	font-style: normal !important;
}

@media all and (max-width: 767px) {
	#aio-atc-modal .kb-btns328_72c5e4-23 .kb-button,
	#aio-atc-modal .kb-btns328_72c5e4-23 .kt-button,
	#aio-atc-modal .kb-btns328_72c5e4-23 .button,
	#aio-atc-modal .kb-btns328_72c5e4-23 .kt-btn-inner-text,
	#aio-atc-modal .kb-btns328_72c5e4-23 .kb-button *,
	.aio-atc-modal .kb-btns328_72c5e4-23 .kb-button,
	.aio-atc-modal .kb-btns328_72c5e4-23 .kt-button,
	.aio-atc-modal .kb-btns328_72c5e4-23 .button,
	.aio-atc-modal .kb-btns328_72c5e4-23 .kt-btn-inner-text,
	.aio-atc-modal .kb-btns328_72c5e4-23 .kb-button * {
		font-size: 15px !important;
	}
}

#aio-atc-modal .kb-btns328_72c5e4-23 .kt-btn-inner-text,
.aio-atc-modal__dialog .kb-btns328_72c5e4-23 .kt-btn-inner-text {
	white-space: nowrap;
	line-height: 1.2;
}

.aio-atc-modal__dialog .aio-atc-view-cart.aio-atc-view-cart-coach,
.aio-atc-modal__dialog .kb-btn328_5fe1ec-17.aio-atc-view-cart-coach {
	animation: aio-atc-coach-glow 1.6s ease-in-out infinite;
	box-shadow:
		0 0 0 2px #47bfff,
		0 0 10px rgba(71, 191, 255, 0.85),
		0 0 20px rgba(71, 191, 255, 0.45);
}

.aio-atc-modal__dialog .kt-adv-heading328_825ba2-dd mark.kt-highlight,
.aio-atc-modal__dialog .kt-adv-heading328_825ba2-dd mark.kt-highlight s,
.aio-atc-modal__dialog .kt-adv-heading328_825ba2-dd > s {
	font-size: 12px !important;
	font-style: normal;
	color: rgba(255, 255, 255, 0.6);
	font-weight: inherit;
}

/* Discount % badge — black text on green chip. */
.aio-atc-modal__dialog [class*="kt-adv-heading328_a6c542-df"],
.aio-atc-modal__dialog [class*="kt-adv-heading328_a6c542-df"] .kb-adv-text-inner,
.aio-atc-modal__dialog [data-kb-block*="kb-adv-heading328_a6c542-df"] {
	color: #000000 !important;
}

.aio-atc-modal__dialog [class*="kt-adv-heading328_a6c542-df"] mark.kt-highlight,
.aio-atc-modal__dialog [data-kb-block*="kb-adv-heading328_a6c542-df"] mark.kt-highlight {
	color: #000000 !important;
}

.kwt-add-to-cart-_28f8bb-6c.aio-atc-state-in_cart .single_add_to_cart_button,
.kwt-add-to-cart-_28f8bb-6c.aio-atc-state-in_cart .single_add_to_cart_button:hover,
.kwt-add-to-cart-_28f8bb-6c.aio-atc-state-in_cart .single_add_to_cart_button:focus {
	background: #4e8007 !important;
	background-image: none !important;
	color: #d2efa9 !important;
	text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
	font-weight: 400 !important;
	opacity: 1 !important;
	cursor: pointer;
}

.kwt-add-to-cart-_28f8bb-6c.aio-atc-state-owned .single_add_to_cart_button {
	cursor: pointer;
	opacity: 0.85;
}

/* Never show WooCommerce inline "View cart" beside the AIO price column. */
.kwt-add-to-cart-_28f8bb-6c a.added_to_cart,
.kadence-column205_96cc85-be a.added_to_cart {
	display: none !important;
}
