/* ==========================================================================
   Product-page "Plan this vial" embed.
   Reuses calculator.css's tokens + shared components (.bhc-field,
   .bhc-metrics, .bhc-warning, .bhc-snap, .bhc-echo, .bhc-components,
   .bhc-btn, focus rings, tabular-nums…) for free via the shared
   `.bhc-calculator` class on the embed root — this file only overrides the
   full-page-only layout and adds the embed's own compact structure.
   ========================================================================== */

/* Neutralize the full-page section styling (max-width/centered page
   padding/background) — the embed instead needs to sit compactly under
   the add-to-cart button without fighting Blocksy's .entry-content rules,
   so margin/padding are reset to 0 here rather than inherited. */
.bhc-calculator.bhc-embed {
	max-width: none;
	width: 100%;
	margin: 24px 0 0;
	padding: 0;
	background: none;
}

.bhc-embed-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	appearance: none;
	background: var(--bhc-teal-soft);
	border: 1px solid var(--bhc-teal);
	border-radius: 10px;
	padding: 14px 18px;
	font: inherit;
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--bhc-ink);
	cursor: pointer;
	text-align: left;
}

.bhc-embed-toggle:hover {
	background: #ddf4f1;
}

.bhc-embed-toggle-icon {
	width: 10px;
	height: 10px;
	border-right: 2px solid var(--bhc-ink);
	border-bottom: 2px solid var(--bhc-ink);
	transform: rotate(-45deg);
	transition: transform 0.15s ease;
	flex: 0 0 auto;
}

.bhc-embed-toggle[aria-expanded="true"] .bhc-embed-toggle-icon {
	transform: rotate(45deg);
}

.bhc-embed-panel {
	margin-top: 14px;
	padding: 20px;
	background: #fff;
	border: 1px solid var(--bhc-line);
	border-radius: 10px;
}

.bhc-embed-panel[hidden] {
	display: none;
}

/* Two-column rows (inputs, planning) — collapses under 600px, distinct
   from the full page's own 720px breakpoint since this panel is much
   narrower to begin with (sitting in a product page's content column). */
.bhc-embed-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	min-width: 0;
}

.bhc-embed-row .bhc-field,
.bhc-embed-row .bhc-input-group,
.bhc-embed-row .bhc-input-group > * {
	min-width: 0;
}

@media (max-width: 600px) {
	.bhc-embed-row {
		grid-template-columns: 1fr;
	}
}

.bhc-embed-results {
	grid-template-columns: repeat(3, 1fr);
	margin: 18px 0;
	padding: 16px 0;
	border-top: 1px solid var(--bhc-line);
	border-bottom: 1px solid var(--bhc-line);
}

@media (max-width: 480px) {
	.bhc-embed-results {
		grid-template-columns: 1fr 1fr;
	}
}

.bhc-embed-syringe-wrap {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
	margin-bottom: 20px;
}

.bhc-embed-planning {
	margin-top: 4px;
	padding-top: 20px;
	border-top: 1px solid var(--bhc-line);
}

.bhc-embed-summary {
	margin: 14px 0 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--bhc-ink);
}

.bhc-embed-summary:empty {
	display: none;
}

/* ==========================================================================
   Value-by-vial-size comparison strip
   ========================================================================== */
.bhc-embed-compare {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--bhc-line);
}

.bhc-embed-compare[hidden] {
	display: none;
}

.bhc-embed-compare-title {
	margin: 0 0 10px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--bhc-muted);
}

.bhc-embed-compare-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 10px;
}

.bhc-embed-compare-card {
	position: relative;
	appearance: none;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 12px;
	background: var(--bhc-bg);
	border: 1px solid var(--bhc-line);
	border-radius: 8px;
	font: inherit;
	text-align: left;
	cursor: pointer;
	color: var(--bhc-ink);
}

.bhc-embed-compare-card:hover {
	border-color: var(--bhc-teal);
}

.bhc-embed-compare-card.is-selected {
	border-color: var(--bhc-ink);
	border-width: 2px;
}

.bhc-embed-compare-card.is-best-value {
	border-color: var(--bhc-teal);
	border-width: 2px;
	background: var(--bhc-teal-soft);
}

.bhc-embed-compare-badge {
	position: absolute;
	top: -9px;
	left: 10px;
	padding: 2px 8px;
	background: var(--bhc-teal);
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	border-radius: 999px;
}

.bhc-embed-compare-size {
	font-weight: 700;
	font-size: 0.9rem;
}

.bhc-embed-compare-price {
	font-size: 0.8rem;
	color: var(--bhc-muted);
}

.bhc-embed-compare-cost {
	font-size: 0.85rem;
	font-weight: 600;
}

.bhc-embed-compare-draws {
	font-size: 0.75rem;
	color: var(--bhc-muted);
}

/* ==========================================================================
   Add to cart
   ========================================================================== */
.bhc-embed-cart {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--bhc-line);
}

.bhc-embed-add-btn {
	width: 100%;
	background: var(--bhc-teal);
	border-color: var(--bhc-teal);
	color: #fff;
}

.bhc-embed-add-btn:hover:not(:disabled) {
	background: #33b6a9;
	border-color: #33b6a9;
}

.bhc-embed-add-btn:disabled {
	background: var(--bhc-line);
	border-color: var(--bhc-line);
	color: var(--bhc-muted);
	cursor: not-allowed;
}

.bhc-embed-cart-hint {
	margin: 8px 0 0;
	font-size: 0.8rem;
	color: var(--bhc-muted);
	text-align: center;
}

.bhc-embed-cart-hint:empty {
	display: none;
}

.bhc-embed-cart-price {
	margin: 0 0 8px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--bhc-teal);
	text-align: center;
}

.bhc-embed-cart-price[hidden] {
	display: none;
}

.bhc-embed-cart-price s {
	font-weight: 400;
	color: var(--bhc-muted);
	text-decoration: line-through;
}

.bhc-embed-nudge {
	margin: 8px 0 0;
	font-size: 0.8rem;
	color: var(--bhc-muted);
	text-align: center;
}

.bhc-embed-nudge[hidden] {
	display: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.bhc-embed-footer {
	margin: 20px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--bhc-line);
	font-size: 0.78rem;
	line-height: 1.6;
	color: var(--bhc-muted);
}

.bhc-embed-footer a {
	color: var(--bhc-teal-deep, var(--bhc-ink));
	font-weight: 600;
}
