/**
 * Chefit plugin extensions to chefit-ui.css (kit v4). Loaded after it; kept separate so the kit file can be replaced.
 */

.cfk {
	--cfk-font: var(--chefit-font-family, Heebo, Arial, sans-serif);
}

/* Single slot hidden (coach "hide this pose" / missing asset): same layout as data-characters=off. */
.cfk-banner--no-art {
	grid-template-columns: 1fr;
}
.cfk-rest--no-art {
	grid-template-columns: 1fr;
}
.cfk-entry-intro--no-art {
	grid-template-columns: 1fr;
	min-height: 0;
}
.cfk-celebration--no-art .cfk-stats {
	margin-top: 17px;
}

.cfk[data-characters=off] .cfk-entry-intro {
	grid-template-columns: 1fr;
	min-height: 0;
}
.cfk[data-characters=off] .cfk-entry-character,
.cfk[data-characters=off] .cfk-celebration__art {
	display: none;
}

/*
 * Framing. The kit oversized each mascot and shifted her toward the text, so the
 * slot clipped her front (the side with the face and the gesture). Anchor the image
 * to the text-facing edge instead: she stays clear of the copy, and only a little
 * of the outer side — the back — can be clipped.
 */
.cfk .cfk-banner__art .cfk-mascot {
	inset-inline-start: auto;
	inset-inline-end: 0;
	inline-size: calc(100% + 18px);
	top: 0;
	transform: none;
	animation-name: cfk-idle;
}

/* Coach-uploaded images: the whole photo stays inside the slot, face included. */
.cfk .cfk-banner__art .cfk-mascot--custom {
	inline-size: 100%;
	block-size: 100%;
	inset-inline-end: 0;
	top: auto;
	bottom: 0;
	object-fit: contain;
	object-position: center bottom;
	transform: none;
}

/* Entry dialog: the character column is on the left, so the text is to her right. */
.cfk .cfk-entry-intro {
	grid-template-columns: minmax(0, 1fr) 124px;
}
.cfk .cfk-entry-character .cfk-mascot {
	width: 156px;
	height: 156px;
	top: 0;
	bottom: auto;
	left: auto;
	right: 0;
}
.cfk .cfk-entry-character .cfk-mascot--custom {
	width: 100%;
	height: 100%;
	left: 0;
	right: 0;
	top: auto;
	bottom: 0;
	object-fit: contain;
	object-position: center bottom;
}

/* Rest card: the character column is on the left. A breath without the centering shift. */
.cfk .cfk-rest__art .cfk-mascot {
	left: auto;
	right: 4px;
	width: calc(100% + 16px);
	height: auto;
	top: 0;
	bottom: auto;
	transform: none;
	animation: cfk-rest-idle 4s ease-in-out infinite;
}
@keyframes cfk-rest-idle {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.018); }
}
.cfk .cfk-rest__art .cfk-mascot--custom {
	left: 0;
	right: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center bottom;
	animation: none;
}

/*
 * Mirror. A few default banners face the copy (hand toward the button). Coach photos
 * flip only when that coach turned the mirror on (cfk-mascot--mirror), so the two never stack.
 */
.cfk .cfk-banner--mirror .cfk-banner__art .cfk-mascot:not(.cfk-mascot--custom) {
	transform: scaleX(-1);
	animation-name: cfk-idle-mirrored;
}
.cfk .cfk-banner__art .cfk-mascot.cfk-mascot--mirror,
.cfk .cfk-entry-character .cfk-mascot.cfk-mascot--mirror,
.cfk .cfk-celebration__art > .cfk-mascot.cfk-mascot--mirror,
.chefit-diary-info-art .cfk-mascot.cfk-mascot--mirror {
	transform: scaleX(-1);
}
.cfk .cfk-banner__art .cfk-mascot.cfk-mascot--mirror {
	animation-name: cfk-idle-mirrored;
}
.cfk .cfk-rest__art .cfk-mascot.cfk-mascot--mirror {
	transform: scaleX(-1);
	animation-name: cfk-rest-idle-mirrored;
}
.cfk .cfk-rest__art .cfk-mascot--custom.cfk-mascot--mirror {
	animation: none;
}
@keyframes cfk-rest-idle-mirrored {
	0%, 100% { transform: scaleX(-1); }
	50% { transform: scaleX(-1) scale(1.018); }
}
@keyframes cfk-highfive-mirrored {
	from { opacity: 0; transform: scaleX(-1) scale(.95) translateY(12px); }
	to { opacity: 1; transform: scaleX(-1); }
}
.cfk .cfk-celebration__art > .cfk-mascot.cfk-mascot--mirror {
	animation-name: cfk-highfive-mirrored;
}
.cfk-custom-pop .cfk-mascot.cfk-mascot--mirror {
	animation-name: cfk-custom-pop-mirror !important;
}
@keyframes cfk-custom-pop-mirror {
	0% { transform: scaleX(-1) translateY(8px) scale(.94); opacity: .6; }
	45% { transform: scaleX(-1) translateY(-6px) scale(1.04); opacity: 1; }
	100% { transform: scaleX(-1); opacity: 1; }
}

/* High five fills its square; shrinking it to the frame keeps both faces and the hands. */
.cfk .cfk-celebration__art > .cfk-mascot {
	width: auto;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
}
.cfk .cfk-celebration__art > .cfk-mascot--custom {
	width: 100%;
	max-width: 100%;
	object-fit: contain;
	object-position: center bottom;
}

/* Dialog shell. In the kit these base rules live in preview.css (not shipped); the mobile bottom sheet is restated
   below because this file loads after chefit-ui.css and would otherwise cancel its max-width:600px rule. */
.cfk-dialog {
	position: fixed;
	width: 430px;
	max-width: min(430px, 100%);
	max-height: 94dvh;
	margin: auto;
	padding: 13px 16px 10px;
	overflow: auto;
	border: 1px solid #e7e5ec;
	border-radius: 25px 25px 18px 18px;
	background: #fff;
	color: #161927;
	box-shadow: 0 -4px 24px #25202e15;
	scrollbar-width: none;
	overscroll-behavior: contain;
}
.cfk-dialog::backdrop {
	background: #20233428;
	backdrop-filter: blur(2px);
}
.cfk-dialog h2 {
	font-weight: 800;
}
.cfk-dialog h2:focus {
	outline: none;
}
.cfk-dialog:not([open]) {
	display: none;
}
@media (max-width: 600px) {
	.cfk-dialog {
		inset: auto 0 0 0;
		width: 100%;
		max-width: 100%;
		margin: 0;
		border-bottom: 0;
		border-radius: 25px 25px 0 0;
		padding-bottom: max(10px, env(safe-area-inset-bottom));
	}
	.cfk-dialog[open] {
		animation: cfk-sheet-up .28s cubic-bezier(.2, .7, .2, 1);
	}
}
@keyframes cfk-sheet-up {
	from { transform: translateY(100%); }
	to { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.cfk-dialog[open] {
		animation: none;
	}
}
.cfk[data-motion=off].cfk-dialog[open] {
	animation: none;
}

/* Hello Elementor reset.css styles every [type=button]/button (display:inline-block, width:auto, border, padding,
   font-size, white-space:nowrap) at the same specificity as the kit classes and loads after them. Restate the
   kit's own values with a .cfk prefix so the components keep their layout on themed pages. */
.cfk button.cfk-banner {
	display: grid;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 15px;
	font-size: inherit;
	font-weight: inherit;
	line-height: 1.5;
	text-align: right;
	white-space: normal;
	user-select: auto;
	color: inherit;
}
.cfk button.cfk-method {
	display: flex;
	width: 100%;
	padding: 7px 12px;
	border: 1px solid #e7e5eb;
	border-radius: 15px;
	font-size: inherit;
	font-weight: inherit;
	text-align: right;
	white-space: normal;
	color: inherit;
}
.cfk button.cfk-text-button {
	display: inline-flex;
	width: auto;
	padding: 6px 8px;
	border: 0;
	border-radius: 8px;
	background: none;
	white-space: normal;
	color: #5e6f39;
}
.cfk button.cfk-sheet-close {
	display: grid;
	width: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
}
.cfk button.cfk-button {
	display: inline-flex;
	padding: 10px 20px;
	border: 1px solid var(--cfk-action);
	border-radius: 10px;
	white-space: normal;
}
.cfk button.cfk-button--full {
	width: 100%;
}
.cfk button.cfk-rest__skip {
	display: inline-flex;
	width: auto;
	padding: 5px 12px;
	border: 1px solid #8aaf48;
	border-radius: 20px;
	white-space: normal;
}
@container chefit-component (max-width: 350px) {
	.cfk button.cfk-method {
		padding: 7px 9px;
	}
	.cfk button.cfk-rest__skip {
		padding: 5px 8px;
	}
}

/* Elementor frontend: .elementor img { max-width:100%; height:auto } (0,1,1) beats .cfk-mascot { max-width:none }. */
.cfk img.cfk-mascot {
	max-width: none;
}

/* .chefit-app button:hover/:focus (design tokens) forces background-color:transparent !important and color:inherit !important. */
.chefit-app .cfk .cfk-method:hover,
.chefit-app .cfk .cfk-method:focus {
	background-color: #fff !important;
}
.chefit-app .cfk .cfk-button:hover,
.chefit-app .cfk .cfk-button:focus {
	background-color: var(--cfk-action) !important;
	color: #fff !important;
}
.chefit-app .cfk .cfk-button--lime:hover,
.chefit-app .cfk .cfk-button--lime:focus {
	background-color: var(--cfk-lime) !important;
	color: #1e3109 !important;
}
.chefit-app .cfk .cfk-button--outline:hover,
.chefit-app .cfk .cfk-button--outline:focus {
	background-color: #fff !important;
	color: var(--cfk-ink) !important;
}
/* Coach's own image: no green clip — a short pop on confirmed events instead (ChefitMotion). */
.cfk-custom-pop .cfk-mascot {
	animation: cfk-custom-pop .9s ease-out both !important;
}
@keyframes cfk-custom-pop {
	0% { transform: translateY(8px) scale(.94); opacity: .6; }
	45% { transform: translateY(-6px) scale(1.04); opacity: 1; }
	100% { transform: none; opacity: 1; }
}

/* Compact density: less vertical space, same information. */
.cfk[data-density=compact] .cfk-banner {
	min-height: 92px;
}
.cfk[data-density=compact] .cfk-banner__art {
	min-height: 92px;
}
.cfk[data-density=compact] .cfk-banner__copy {
	padding-top: 10px;
	padding-bottom: 10px;
}
.cfk[data-density=compact] .cfk-rest {
	min-height: 112px;
}
.cfk[data-density=compact] .cfk-celebration__art {
	height: 200px;
}
