/* VitaminFit — weekly workout planner
   File: woodmart-child/assets/vf-workout.css

   Same tokens and shape language as the meal planner. Colours are literal,
   not var(--wd-title-color): inside the account area Woodmart sets that to
   #242424 on a #1a1a1a background, which renders text invisible. */

.vf-wo {
	--mg-accent: var(--wd-primary-color, #049a37);
	--mg-title: #fff;
	--mg-text: rgba(255, 255, 255, .8);
	--mg-dim: rgba(255, 255, 255, .5);
	--mg-surface: #1f1e1e;
	--mg-border: rgba(255, 255, 255, .13);

	direction: rtl;
	text-align: right;
	font-family: inherit;
	line-height: 2;
	color: var(--mg-text);
}

.vf-wo *, .vf-wo *::before, .vf-wo *::after,
.vf-wpick, .vf-wpick *, .vf-wpick *::before, .vf-wpick *::after {
	box-sizing: border-box;
}

/* ---------------- week strip ---------------- */

.vf-wo-week {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.vf-wo-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px dashed var(--mg-border);
	color: var(--mg-title) !important;
	text-decoration: none !important;
	font-size: 1.3rem;
	line-height: 1;
	flex: none;
}

.vf-wo-arrow:hover { border-color: var(--mg-accent); border-style: solid; color: var(--mg-accent) !important; }

.vf-wo-range { font-size: 1.05rem; font-weight: 600; color: var(--mg-title); }

.vf-wo-now {
	font-size: .9rem;
	padding: 6px 18px;
	border-radius: 35px;
	border: 1px solid var(--mg-border);
	color: var(--mg-text) !important;
	text-decoration: none !important;
}

/* ---------------- day chips ---------------- */

.vf-wo-chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 6px;
	margin-bottom: 18px;
}

.vf-wo-chip {
	flex: 1 0 auto;
	min-width: 92px;
	text-align: center;
	padding: 11px 10px 9px;
	border-radius: 20px;
	border: 1px solid var(--mg-border);
	background: #100f0f;
	color: var(--mg-text) !important;
	text-decoration: none !important;
	line-height: 1.7;
}

.vf-wo-chip:hover { border-color: var(--mg-accent); }
.vf-wo-chip.is-today { border-style: dashed; border-color: var(--mg-accent); }
.vf-wo-chip.is-on { background: var(--mg-accent); border-color: var(--mg-accent); border-style: solid; color: #fff !important; }

.vf-wo-chipdow { display: block; font-size: .95rem; font-weight: 600; color: var(--mg-title); }
.vf-wo-chip.is-on .vf-wo-chipdow { color: #fff; }
.vf-wo-chipdate { display: block; font-size: .78rem; color: var(--mg-dim); }
.vf-wo-chip.is-on .vf-wo-chipdate { color: rgba(255, 255, 255, .85); }

.vf-wo-chipdot {
	display: block;
	width: 6px; height: 6px;
	border-radius: 50%;
	margin: 3px auto 0;
	background: transparent;
}

.vf-wo-chipdot.is-filled { background: var(--mg-accent); }
.vf-wo-chip.is-on .vf-wo-chipdot.is-filled { background: #fff; }

.vf-wo-summary {
	margin: 0 0 14px;
	font-size: .95rem;
	color: var(--mg-title);
	font-weight: 600;
}

/* ---------------- exercise rows ---------------- */

.vf-wo-items { list-style: none; margin: 0; padding: 0; }

.vf-wo-item {
	display: grid;
	grid-template-columns: auto 1fr auto auto auto;
	align-items: center;
	gap: 14px;
	padding: 12px 2px;
	border-bottom: 1px solid var(--mg-border);
}

.vf-wo-thumb {
	width: 52px; height: 52px;
	border-radius: 14px;
	object-fit: cover;
	display: block;
	flex: none;
}

.vf-wo-thumb-none { background: var(--mg-surface); border: 1px dashed var(--mg-border); }

.vf-wo-name { font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.vf-wo-name a { color: var(--mg-title) !important; text-decoration: none !important; }
.vf-wo-name a:hover { color: var(--mg-accent) !important; }

.vf-wo-sets, .vf-wo-reps {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	border: 1px solid var(--mg-border);
	border-radius: 35px;
	/* Logical, not physical. The label is the LAST flex item, so in RTL it
	   lands on the visual left where `padding-left: 2px` left it no room and
	   «ست» / «تکرار» spilled out of the pill. padding-inline start/end keeps
	   the roomy side next to the label whichever way the page runs. */
	padding-block: 2px;
	padding-inline: 2px 10px;
	white-space: nowrap;
}

.vf-wo-setsnum, .vf-wo-repsnum {
	min-width: 1.6em;
	text-align: center;
	font-size: .9rem;
	color: var(--mg-title);
}

.vf-wo-sets em, .vf-wo-reps em {
	font-style: normal;
	font-size: .75rem;
	color: var(--mg-dim);
	/* margin-right put the gap on the wrong side in RTL — it belongs
	   between the + button and the label, which is the inline start. */
	margin-inline-start: 4px;
	flex: 0 0 auto;
}

/* Woodmart repaints every unscoped button light grey with square corners. */
.vf-wo button.vf-wo-step {
	width: 24px; height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0 !important;
	background: none !important;
	border-radius: 50% !important;
	color: var(--mg-text) !important;
	font-size: .95rem !important;
	line-height: 1 !important;
	padding: 0 !important;
	min-height: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
}

.vf-wo button.vf-wo-step:hover { background: rgba(255, 255, 255, .1) !important; color: #fff !important; }

.vf-wo button.vf-wo-remove {
	border: 0 !important;
	background: none !important;
	color: var(--mg-dim) !important;
	font-size: 1.35rem !important;
	line-height: 1 !important;
	padding: 4px 6px !important;
	min-height: 0 !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	cursor: pointer;
}

.vf-wo button.vf-wo-remove:hover { color: #e06666 !important; background: rgba(224, 102, 102, .12) !important; }

.vf-wo button.vf-wo-add {
	margin-top: 14px;
	border: 1px dashed var(--mg-border) !important;
	background: none !important;
	color: var(--mg-dim) !important;
	border-radius: 35px !important;
	padding: 10px 28px !important;
	font-family: inherit !important;
	font-size: .95rem !important;
	text-transform: none !important;
	min-height: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
}

.vf-wo button.vf-wo-add:hover { border-style: solid !important; border-color: var(--mg-accent) !important; color: var(--mg-accent) !important; }

.vf-wo-status { margin: 22px 0 0; font-size: .88rem; color: var(--mg-dim); min-height: 1.6em; }
.vf-wo-status.is-saved { color: var(--mg-accent); }
.vf-wo-status.is-failed { color: #e06666; }

/* ---------------- picker ---------------- */

.vf-wpick[hidden] { display: none; }

.vf-wpick {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(0, 0, 0, .7);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
}

body.vf-wpick-open { overflow: hidden; }

.vf-wpick-box {
	direction: rtl;
	text-align: right;
	font-family: inherit;
	background: #1a1a1a;
	border: 1px solid rgba(255, 255, 255, .15);
	border-radius: 30px;
	width: 100%;
	max-width: 480px;
	max-height: 86vh;
	overflow-y: auto;
	padding: 26px 22px;
	position: relative;
	color: rgba(255, 255, 255, .8);
}

.vf-wpick button.vf-wpick-close {
	position: absolute;
	top: 16px; left: 18px;
	border: 0 !important;
	background: none !important;
	color: rgba(255, 255, 255, .5) !important;
	font-size: 1.5rem !important;
	line-height: 1 !important;
	padding: 0 6px !important;
	min-height: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
}

.vf-wpick-title { margin: 0 0 14px; font-size: 1.15rem; font-weight: 600; color: #fff; }

.vf-wpick input.vf-wpick-search {
	box-sizing: border-box;
	width: 100%;
	padding: 11px 14px;
	border-radius: 35px;
	border: 1px solid rgba(255, 255, 255, .15);
	background: #222;
	color: #fff;
	font-family: inherit;
	font-size: 1rem;
	-webkit-appearance: none;
	appearance: none;
}

.vf-wpick input.vf-wpick-search:focus { outline: 2px solid var(--wd-primary-color, #049a37); outline-offset: 1px; }

.vf-wpick-list { list-style: none; margin: 14px 0 0; padding: 0; max-height: 52vh; overflow-y: auto; }

.vf-wpick button.vf-wpick-btn {
	width: 100%;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 12px;
	border: 0 !important;
	border-bottom: 1px solid rgba(255, 255, 255, .1) !important;
	background: none !important;
	border-radius: 0 !important;
	padding: 10px 6px !important;
	color: rgba(255, 255, 255, .85) !important;
	font-family: inherit !important;
	font-size: .98rem !important;
	line-height: 1.6;
	text-align: right;
	text-transform: none !important;
	min-height: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
}

.vf-wpick button.vf-wpick-btn:hover { background: rgba(255, 255, 255, .05) !important; color: #fff !important; }

.vf-wpick-thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; display: block; }
.vf-wpick-name { overflow-wrap: anywhere; }
.vf-wpick-muscle { font-size: .78rem; color: rgba(255, 255, 255, .5); white-space: nowrap; }
.vf-wpick-empty { padding: 16px; text-align: center; color: rgba(255, 255, 255, .5); }

/* ---------------- phone ---------------- */

@media (max-width: 640px) {
	.vf-wo-item {
		grid-template-columns: auto 1fr auto;
		grid-template-areas:
			"thumb name   remove"
			"thumb sets   remove"
			"thumb reps   remove";
		gap: 4px 12px;
	}

	.vf-wo-thumb { grid-area: thumb; align-self: start; }
	.vf-wo-name { grid-area: name; }
	.vf-wo-sets { grid-area: sets; justify-self: start; }
	.vf-wo-reps { grid-area: reps; justify-self: start; }
	.vf-wo button.vf-wo-remove { grid-area: remove; align-self: start; }
}

/* ---------------- add-to-workout, on a single exercise ---------------- */

.vf-ex-addwo-wrap { margin-top: 26px; }

button.vf-ex-addwo {
	border: 0 !important;
	border-radius: 35px !important;
	background: var(--wd-primary-color, #049a37) !important;
	color: #fff !important;
	padding: 11px 26px !important;
	font-family: inherit !important;
	font-size: .98rem !important;
	font-weight: 600;
	line-height: 1.6 !important;
	text-transform: none !important;
	min-height: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
}

button.vf-ex-addwo:hover { opacity: .88; }

.vf-ex-addwo-note {
	margin: 9px 0 0;
	font-size: .88rem;
	min-height: 1.4em;
}

.vf-ex-addwo-note.is-ok { color: var(--wd-primary-color, #049a37); }
.vf-ex-addwo-note.is-bad { color: #e06666; }
