/* =====================================================
   Healio - "On your shelf"
   Sits at the top of the account Overview, inside
   .woocommerce-MyAccount-content.
   ===================================================== */

.hshelf {
	margin: 0 0 clamp(30px, 4vw, 44px);
	padding-bottom: clamp(28px, 3.6vw, 40px);
	border-bottom: 1px solid var(--line);
}

.hshelf-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	margin-bottom: 22px;
}
.hshelf-eyebrow {
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rose);
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
}
.hshelf-eyebrow::before {
	content: "";
	width: 22px;
	height: 1px;
	background: currentColor;
	flex: none;
}
.hshelf-h {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(23px, 2.6vw, 30px);
	letter-spacing: -0.02em;
	line-height: 1.05;
	color: var(--wine);
	margin: 0;
}
.hshelf-h em { font-style: italic; color: var(--rose); }
.hshelf-all {
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--berry);
	text-decoration: none;
	border-bottom: 1px solid var(--blush);
	padding-bottom: 3px;
	white-space: nowrap;
	transition: color 0.25s ease, border-color 0.25s ease;
}
.hshelf-all:hover { color: var(--rose); border-color: var(--rose); }

/* -----------------------------------------------------
   Cards
   ----------------------------------------------------- */

/* Sized against the container, not the viewport. These cards sit inside the
   account panel, which is ~806px at its widest because the shell caps at
   1200px and the sidebar takes 246px -- so a viewport-keyed "4 across above
   1200px" crushed them to ~184px and the name ran under the status pill. */
.hshelf-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 14px;
}
.hshelf-card {
	border: 1px solid var(--line);
	border-radius: 20px;
	padding: 20px 18px 18px;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.hshelf-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-soft);
	border-color: var(--blush);
}
.hshelf-card.is-low { border-color: rgba(201, 103, 144, 0.42); }

.hshelf-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 16px;
}
.hshelf-name {
	display: block;
	font-family: var(--font-display);
	font-size: 19px;
	line-height: 1.12;
	letter-spacing: -0.015em;
	color: var(--wine);
}
.hshelf-dose {
	display: block;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mauve);
	margin-top: 6px;
	line-height: 1.4;
}
.hshelf-flag {
	flex: none;
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	padding: 5px 9px;
	border-radius: 999px;
	white-space: nowrap;
	background: var(--blush-soft);
	color: var(--berry);
}
.hshelf-flag.is-low { background: var(--rose); color: #fff; }

/* -----------------------------------------------------
   The vial gauge
   ----------------------------------------------------- */

.hshelf-gauge {
	display: flex;
	align-items: flex-end;
	gap: 14px;
	margin-bottom: 14px;
}
.hshelf-vial {
	width: 46px;
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.hshelf-cap {
	width: 23px;
	height: 8px;
	border-radius: 4px 4px 2px 2px;
	background: var(--blush);
	border: 1px solid rgba(43, 10, 20, 0.12);
	border-bottom: 0;
}
.hshelf-neck {
	width: 16px;
	height: 6px;
	background: rgba(233, 195, 211, 0.5);
	border-left: 1px solid rgba(43, 10, 20, 0.1);
	border-right: 1px solid rgba(43, 10, 20, 0.1);
}
.hshelf-body {
	position: relative;
	width: 46px;
	height: 108px;
	overflow: hidden;
	border: 1px solid rgba(43, 10, 20, 0.14);
	border-radius: 7px 7px 14px 14px;
	background: linear-gradient(100deg, rgba(255, 255, 255, 0.9), rgba(244, 226, 234, 0.55));
}
.hshelf-body::after {
	content: "";
	position: absolute;
	top: 7px;
	left: 8px;
	width: 6px;
	bottom: 12px;
	border-radius: 99px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.15));
	z-index: 3;
}

/* The true level is the resting style, so a throttled tab or a JS failure
   still shows the correct reading. The rise is decoration only. */
.hshelf-fill {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: var(--fill);
	background: linear-gradient(180deg, var(--blush) 0%, var(--rose) 130%);
	animation: hshelf-rise 1.1s cubic-bezier(0.22, 0.9, 0.3, 1) forwards;
}
.hshelf-fill::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: rgba(255, 255, 255, 0.72);
}
.is-low .hshelf-fill {
	background: linear-gradient(180deg, var(--rose) 0%, var(--berry) 140%);
}
@keyframes hshelf-rise {
	from { height: 0; }
	to { height: var(--fill); }
}

.hshelf-pct {
	font-family: var(--font-display);
	font-size: 32px;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--wine);
	font-variant-numeric: tabular-nums;
	margin: 0;
}
.hshelf-pct span {
	font-size: 14px;
	font-family: var(--font-body);
	color: var(--mauve);
	margin-left: 2px;
	letter-spacing: 0;
}

.hshelf-when {
	font-size: 13px;
	line-height: 1.5;
	color: var(--mauve);
	margin: 0 0 16px;
}
.hshelf-when strong { color: var(--wine); font-weight: 600; }

.hshelf-foot { margin-top: auto; }
.hshelf-btn {
	width: 100%;
	padding: 10px 16px;
	font-size: 13px;
}
.hshelf-btn .amount { font-weight: 600; }

/* -----------------------------------------------------
   Responsive
   ----------------------------------------------------- */

@media (max-width: 560px) {
	.hshelf-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.hshelf-fill { animation: none; }
	.hshelf-card { transition: none; }
}
