/* Tour editor: 4-step layout. Scoped to .ttbm-tour-wizard.ttbm-wz-enabled (set by JS), so without JS the classic tabs still work. */
#ttbm_content.ttbm-tour-wizard:not(.ttbm-wz-enabled) .ttbm-wz-steps,
#ttbm_content.ttbm-tour-wizard:not(.ttbm-wz-enabled) .ttbm-wz-footer {
	display: none;
}

/* ---- Step bar ---- */
.ttbm-tour-wizard .ttbm-wz-steps {
	display: flex;
	align-items: stretch;
	gap: 0;
	padding: 22px 28px 18px;
	background: #fff;
	border-bottom: 1px solid #e5e9f0;
	border-radius: 12px 12px 0 0;
}
.ttbm-tour-wizard .ttbm-wz-step {
	position: relative;
	flex: 1 1 0;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 12px 0 0;
	margin: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: left;
	color: #8a94a6;
	font: inherit;
	min-width: 0;
}
.ttbm-tour-wizard .ttbm-wz-step:not(:last-child)::after {
	content: "";
	position: absolute;
	left: 52px;
	right: 12px;
	top: 20px;
	height: 2px;
	background: #e2e8f0;
	z-index: 0;
	transition: background .25s ease;
}
.ttbm-tour-wizard .ttbm-wz-step.is-complete:not(:last-child)::after {
	background: #2271b1;
}
.ttbm-tour-wizard .ttbm-wz-step__dot {
	position: relative;
	z-index: 1;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e2e8f0;
	color: #64748b;
	font-size: 15px;
	transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.ttbm-tour-wizard .ttbm-wz-step__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	position: relative;
	z-index: 1;
	background: #fff;
	padding-right: 8px;
}
.ttbm-tour-wizard .ttbm-wz-step__label {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: #8a94a6 !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ttbm-tour-wizard .ttbm-wz-step__hint {
	font-size: 12px;
	color: #94a3b8 !important;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ttbm-tour-wizard .ttbm-wz-step:hover .ttbm-wz-step__dot {
	background: #d3e3f4;
	color: #2271b1;
}
.ttbm-tour-wizard .ttbm-wz-step.is-active .ttbm-wz-step__label,
.ttbm-tour-wizard .ttbm-wz-step.is-complete .ttbm-wz-step__label {
	color: #1d2b44 !important;
}
.ttbm-tour-wizard .ttbm-wz-step.is-active .ttbm-wz-step__dot,
.ttbm-tour-wizard .ttbm-wz-step.is-complete .ttbm-wz-step__dot {
	background: #2271b1;
	color: #fff;
}
.ttbm-tour-wizard .ttbm-wz-step.is-active .ttbm-wz-step__dot {
	box-shadow: 0 0 0 5px rgba(34, 113, 177, .16);
}
.ttbm-tour-wizard .ttbm-wz-step,
.ttbm-tour-wizard .ttbm-wz-step:hover,
.ttbm-tour-wizard .ttbm-wz-step:focus,
.ttbm-tour-wizard .ttbm-wz-step:active {
	background: transparent !important;
	box-shadow: none;
	border: 0 !important;
	outline: 0;
}
.ttbm-tour-wizard .ttbm-wz-step:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 4px;
	border-radius: 8px;
}

/* ---- Wizard mode: no left tab list; panes are shown by step, not by legacy .active ---- */
.ttbm-tour-wizard.ttbm-wz-enabled .tabLists.meta-sidebar {
	display: none !important;
}
body.ttbm-modern-edit-page #ttbm_meta_box_panel .ttbm-tour-wizard.ttbm-wz-enabled .ttbmTabs.leftTabs > .tabsContent > .tabsItem[data-tabs] {
	display: none !important;
}
body.ttbm-modern-edit-page #ttbm_meta_box_panel .ttbm-tour-wizard.ttbm-wz-enabled .ttbmTabs.leftTabs > .tabsContent > .tabsItem[data-tabs].ttbm-wz-show {
	display: block !important;
	content-visibility: visible !important;
}
/* Plain panes stacked in one step read as separate sections. */
.ttbm-tour-wizard.ttbm-wz-enabled .tabsContent > .tabsItem.ttbm-wz-show + .tabsItem.ttbm-wz-show:not(.ttbm-wz-acc-pane) {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid #e5e9f0;
}
.ttbm-tour-wizard.ttbm-wz-enabled .ttbmTabs.leftTabs > .tabsContent {
	min-width: 0;
	overflow: visible; /* legacy overflow:auto would stop the footer sticking */
}

/* ---- Collapsible cards ---- */
.ttbm-tour-wizard .ttbm-wz-acc {
	display: none;
	margin: 0 0 10px;
}
.ttbm-tour-wizard .ttbm-wz-acc.is-shown {
	display: block;
}
.ttbm-tour-wizard .ttbm-wz-acc__head {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	margin: 0;
	background: #fff;
	border: 1px solid #dfe5ee;
	border-radius: 10px;
	cursor: pointer;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: #1d2b44;
	text-align: left;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ttbm-tour-wizard .ttbm-wz-acc__head:hover,
.ttbm-tour-wizard .ttbm-wz-acc__head:focus {
	background: #f5f9fd !important;
	color: #1d2b44 !important;
	border-color: #2271b1;
	box-shadow: 0 1px 6px rgba(34, 113, 177, .12);
	outline: 0;
}
.ttbm-tour-wizard .ttbm-wz-acc__head:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}
.ttbm-tour-wizard .ttbm-wz-acc__title,
.ttbm-tour-wizard .ttbm-wz-acc__head span {
	color: inherit !important;
}
.ttbm-tour-wizard .ttbm-wz-acc__icon {
	color: #2271b1 !important;
}
.ttbm-tour-wizard .ttbm-wz-acc__icon {
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: #eaf2fb;
	color: #2271b1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
}
.ttbm-tour-wizard .ttbm-wz-acc__title {
	flex: 1 1 auto;
}
.ttbm-tour-wizard .ttbm-wz-acc__chev {
	color: #94a3b8;
	transition: transform .2s ease;
}
.ttbm-tour-wizard .ttbm-wz-acc.is-open .ttbm-wz-acc__head {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	border-color: #2271b1;
	background: #f5f9fd;
}
.ttbm-tour-wizard .ttbm-wz-acc.is-open .ttbm-wz-acc__chev {
	transform: rotate(180deg);
	color: #2271b1;
}
/* The open card's body: attach to its header. The card title replaces the pane's own heading. */
.ttbm-tour-wizard.ttbm-wz-enabled .tabsContent > .ttbm-wz-acc-pane.ttbm-wz-show {
	margin: -10px 0 10px;
	padding: 22px 24px;
	background: #fff;
	border: 1px solid #2271b1;
	border-top: 0;
	border-radius: 0 0 10px 10px;
}
.ttbm-tour-wizard .ttbm-wz-acc-pane > h2:first-child {
	display: none;
}

/* ---- Footer ---- */
/* Pinned to the bottom of the viewport while the step is taller than the screen. */
#ttbm_meta_box_panel .ttbm-tour-wizard.ttbm-wz-enabled .ttbmTabs.leftTabs {
	overflow: visible; /* overflow:hidden would stop the footer sticking */
}
.ttbm-tour-wizard .ttbm-wz-footer {
	position: sticky;
	bottom: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 28px 0 -28px;
	padding: 14px 20px;
	border-radius: 10px 10px 0 0;
	background: #fff;
	border-top: 1px solid #e5e9f0;
	box-shadow: 0 -4px 14px rgba(15, 23, 42, .06);
}
.ttbm-tour-wizard .ttbm-wz-footer .button {
	min-width: 96px;
	min-height: 38px;
	font-weight: 600;
	border-radius: 8px;
}
.ttbm-tour-wizard .ttbm-wz-footer .ttbm-wz-prev.is-hidden {
	visibility: hidden;
}
.ttbm-tour-wizard .ttbm-wz-progress {
	font-size: 13px;
	color: #94a3b8;
	font-weight: 600;
}

/* ---- Small screens: compact dots, label only for the active step ---- */
@media (max-width: 900px) {
	.ttbm-tour-wizard .ttbm-wz-steps {
		padding: 16px 14px 14px;
	}
	.ttbm-tour-wizard .ttbm-wz-step__hint {
		display: none;
	}
	.ttbm-tour-wizard .ttbm-wz-step__text {
		display: none;
	}
	.ttbm-tour-wizard .ttbm-wz-step.is-active {
		flex: 2 1 0;
	}
	.ttbm-tour-wizard .ttbm-wz-step.is-active .ttbm-wz-step__text {
		display: flex;
	}
	.ttbm-tour-wizard .ttbm-wz-step:not(:last-child)::after {
		left: 48px;
	}
}

/* On small screens core sets overflow-x:hidden on #post-body, which makes it a scroll container and breaks the sticky footer. clip hides overflow without that. */
body.ttbm-tour-edit-page div#post-body.metabox-holder {
	overflow-x: clip;
	overflow-y: visible;
}
