/* Health Reboot Schedule Graph — front end. Defaults match the client's 7-Day Health Reboot chart.
   Every visual value is a CSS custom property so the Elementor widget (or theme CSS) can override it. */

.hrsg {
	--hrsg-col-odd: #fbf4ef;
	--hrsg-col-even: #f6e5e1;
	--hrsg-radius: 10px;
	--hrsg-bar-h: 32px;
	--hrsg-row-gap: 6px;
	--hrsg-arrow: 14px;
	--hrsg-bar-radius: 3px;
	--hrsg-bar-outline: rgba(59, 42, 33, 0.08);
	--hrsg-pad-bottom: 14px;
	--hrsg-label-justify: center;
	--hrsg-m-bar-h: 9px;
	--hrsg-m-arrow: 6px;
	--hrsg-m-row-gap: 7px;
	--hrsg-scroll-min: 720px;
	position: relative;
	width: 100%;
	color: #3b2a21;
}

.hrsg *,
.hrsg *::before,
.hrsg *::after {
	box-sizing: border-box;
}

/* Toolbar / expand button */
.hrsg__toolbar {
	display: flex;
	justify-content: flex-end;
	margin: 0 0 8px;
}

.hrsg .hrsg__expand,
.hrsg-dialog .hrsg-dialog__close {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 6px 12px;
	border: 1px solid #e6d5cc;
	border-radius: 999px;
	background: #fff;
	color: #6b4f43;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hrsg .hrsg__expand:hover,
.hrsg .hrsg__expand:focus-visible,
.hrsg-dialog .hrsg-dialog__close:hover,
.hrsg-dialog .hrsg-dialog__close:focus-visible {
	background: #fbf4ef;
	border-color: #d9bfb2;
	color: #3b2a21;
}

.hrsg__expand-icon {
	flex: none;
}

/* Grid */
.hrsg__scroller {
	position: relative;
}

.hrsg__grid {
	position: relative;
	display: grid;
	grid-template-rows: auto;
	grid-auto-rows: var(--hrsg-bar-h);
	row-gap: var(--hrsg-row-gap);
	column-gap: 0;
	padding-bottom: var(--hrsg-pad-bottom);
	border-radius: var(--hrsg-radius);
	overflow: hidden;
	isolation: isolate;
}

.hrsg--expandable > .hrsg__scroller .hrsg__grid {
	cursor: zoom-in;
}

.hrsg__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: grid;
	pointer-events: none;
}

.hrsg__col--odd {
	background: var(--hrsg-col-odd);
}

.hrsg__col--even {
	background: var(--hrsg-col-even);
}

/* Header */
.hrsg__day {
	grid-row: 1;
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 0;
	padding: 14px 2px 12px;
	text-align: center;
	line-height: 1.15;
}

.hrsg__weekday {
	display: block;
	font-size: 20px;
	font-weight: 700;
	color: #2a1f1a;
}

.hrsg__daynum {
	display: block;
	margin-top: 2px;
	font-size: 16px;
	font-weight: 400;
	color: #7a6a62;
}

.hrsg__wd-short {
	display: none;
}

/* Bars */
.hrsg__bar {
	grid-row: var(--hrsg-r);
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	min-width: 0;
	background: var(--hrsg-bar-bg);
	box-shadow: inset 0 0 0 1px var(--hrsg-bar-outline);
	border-radius: var(--hrsg-bar-radius);
	color: var(--hrsg-label-color, var(--hrsg-bar-fg));
}

.hrsg__bar--arrow {
	padding-right: calc(var(--hrsg-arrow) * 0.6);
	clip-path: polygon(0 0, calc(100% - var(--hrsg-arrow)) 0, 100% 50%, calc(100% - var(--hrsg-arrow)) 100%, 0 100%);
}

.hrsg__label {
	display: flex;
	flex: 1 1 auto;
	justify-content: var(--hrsg-label-justify);
	min-width: 0;
	padding: 0 10px;
}

.hrsg__label-text {
	display: block;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Screen-reader summary */
.hrsg__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Mobile: compact (label above a slim bar) ---------- */
.hrsg.is-compact > .hrsg__scroller .hrsg__grid {
	grid-auto-rows: auto;
	row-gap: var(--hrsg-m-row-gap);
	padding-bottom: 12px;
}

.hrsg.is-compact > .hrsg__scroller .hrsg__day {
	padding: 9px 0 6px;
}

.hrsg.is-compact > .hrsg__scroller .hrsg__weekday {
	font-size: 14px;
}

.hrsg.is-compact > .hrsg__scroller .hrsg__daynum {
	font-size: 12px;
	margin-top: 1px;
}

.hrsg.is-compact > .hrsg__scroller .hrsg__wd-full,
.hrsg.is-compact > .hrsg__scroller .hrsg__dn-prefix {
	display: none;
}

.hrsg.is-compact > .hrsg__scroller .hrsg__wd-short {
	display: inline;
}

.hrsg.is-compact > .hrsg__scroller .hrsg__bar {
	grid-row: var(--hrsg-rc);
	display: block;
	padding: 0;
	background: none;
	box-shadow: none;
	clip-path: none;
	color: var(--hrsg-m-label-color, #3b2a21);
}

.hrsg.is-compact > .hrsg__scroller .hrsg__bar::after {
	content: "";
	display: block;
	height: var(--hrsg-m-bar-h);
	background: var(--hrsg-bar-bg);
	box-shadow: inset 0 0 0 1px rgba(59, 42, 33, 0.16);
	border-radius: var(--hrsg-bar-radius);
}

.hrsg.is-compact > .hrsg__scroller .hrsg__bar--arrow::after {
	clip-path: polygon(0 0, calc(100% - var(--hrsg-m-arrow)) 0, 100% 50%, calc(100% - var(--hrsg-m-arrow)) 100%, 0 100%);
}

.hrsg.is-compact > .hrsg__scroller .hrsg__label {
	justify-content: flex-start;
	padding: 0 5px 3px;
}

.hrsg.is-compact > .hrsg__scroller .hrsg__bar--late .hrsg__label {
	justify-content: flex-end;
}

.hrsg.is-compact > .hrsg__scroller .hrsg__label-text {
	overflow: visible;
	max-width: none;
	font-size: 13px;
	font-weight: 600;
	text-overflow: clip;
}

/* ---------- Mobile: horizontal scroll ---------- */
.hrsg.is-scroll > .hrsg__scroller {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--hrsg-radius);
}

.hrsg.is-scroll > .hrsg__scroller .hrsg__grid {
	min-width: var(--hrsg-scroll-min);
}

.hrsg.is-scroll::after {
	content: "\2190  Swipe to see all days  \2192";
	display: block;
	margin-top: 6px;
	font-size: 12px;
	text-align: center;
	opacity: 0.6;
}

/* ---------- Full-screen dialog ---------- */
.hrsg-dialog {
	outline: none;
	width: min(1400px, 96vw);
	max-width: 96vw;
	max-height: 92vh;
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: #fff;
	color: #3b2a21;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}

.hrsg-dialog::backdrop {
	background: rgba(25, 17, 12, 0.78);
}

.hrsg-dialog__inner {
	max-height: 92vh;
	padding: 56px 24px 24px;
	overflow: auto;
}

.hrsg-dialog .hrsg-dialog__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
}

.hrsg-dialog__title {
	position: absolute;
	top: 16px;
	left: 24px;
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.hrsg-dialog .hrsg__scroller {
	overflow-x: auto;
}

.hrsg-dialog .hrsg__grid {
	--hrsg-bar-h: 40px;
	--hrsg-row-gap: 8px;
	min-width: 900px;
	cursor: default;
}

.hrsg-dialog .hrsg__label-text {
	font-size: 17px;
}

.hrsg-dialog__hint {
	display: none;
	margin: 10px 0 0;
	font-size: 12px;
	text-align: center;
	opacity: 0.65;
}

@media (max-width: 767px) {
	.hrsg-dialog {
		width: 100vw;
		max-width: 100vw;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
	}

	.hrsg-dialog__inner {
		max-height: 100%;
		height: 100%;
		padding: 56px 12px 16px;
	}

	.hrsg-dialog .hrsg__grid {
		min-width: 760px;
	}

	.hrsg-dialog__hint {
		display: block;
	}
}

/* Phone held upright: turn the full-screen graph sideways so every day fits. */
@media (max-width: 767px) and (orientation: portrait) {
	.hrsg-dialog__inner {
		position: absolute;
		top: 0;
		left: 100%;
		width: 100vh;
		width: 100dvh;
		height: 100vw;
		max-height: none;
		overflow: auto;
		padding: 14px 16px 12px 64px;
		transform-origin: top left;
		transform: rotate(90deg);
	}

	.hrsg-dialog .hrsg__grid {
		--hrsg-bar-h: 30px;
		--hrsg-row-gap: 5px;
		min-width: 0;
	}

	.hrsg-dialog .hrsg__day {
		padding: 6px 2px 5px;
	}

	.hrsg-dialog .hrsg__weekday {
		font-size: 16px;
	}

	.hrsg-dialog .hrsg__daynum {
		font-size: 13px;
	}

	.hrsg-dialog .hrsg__label-text {
		font-size: 13px;
	}

	.hrsg-dialog__title {
		position: static;
		margin: 0 0 8px;
		font-size: 14px;
	}

	.hrsg-dialog__hint {
		display: none;
	}
}

.hrsg-notice {
	padding: 10px 14px;
	border: 1px dashed #d9bfb2;
	border-radius: 6px;
	font-size: 14px;
}
