/*
 * MariGold Subscription Builder: landing page support styles.
 * Colors and sizes are read from the same --mgsb-* custom properties as buy-box.css (with defaults), so the site's
 * central stylesheet can adjust them. This file never defines those properties.
 *
 * Most of the Collagen Shake landing page is styled by Elementor's own widget settings and stays editable in
 * the Elementor panel. This file only covers what Elementor cannot express: the comparison table, the product
 * image shortcode, "choose a flavor" button states, anchor offsets and a few resets.
 *
 * Every selector is scoped to .mgsb-lp (a class set on each top-level container of the template) or to
 * plugin-owned classes. Nothing here targets bare elements, the theme, or Elementor's global classes.
 */

/* In-page links land below any sticky site header. */
.mgsb-lp[id],
.mgsb-lp [id] {
	scroll-margin-top: 80px;
}

.mgsb__main {
	scroll-margin-top: 80px;
}

/* Elementor text editor: no stray margins around single paragraphs. */
.mgsb-lp .elementor-widget-text-editor p {
	margin: 0 0 0.6em;
}

.mgsb-lp .elementor-widget-text-editor p:last-child {
	margin-bottom: 0;
}

.mgsb-lp .elementor-widget-shortcode {
	width: 100%;
}

/* ---------- Product image shortcode and gallery fallback ---------- */

.mgsb-lp .mgsb-flavor-img,
.mgsb-gallery .mgsb-flavor-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: var(--mgsb-flavor-img-bg, #fff);
	border-radius: var(--mgsb-flavor-img-radius, 14px);
}

/* ---------- "Choose a flavor" buttons (any element with class mgsb-choose--<flavor>) ---------- */

.mgsb-lp .mgsb-choose .elementor-button {
	transition: background-color 0.15s ease, color 0.15s ease;
}

.mgsb-lp .mgsb-choose .elementor-button:hover,
.mgsb-lp .mgsb-choose.is-selected .elementor-button {
	background-color: var(--mgsb-choose-bg-active, var(--mgsb-ink, #2b1d14));
	color: var(--mgsb-choose-color-active, var(--mgsb-cream, #fbf6ec));
}

/* ---------- Comparison table (inside an Elementor Text Editor widget) ---------- */

.mgsb-lp .mgsb-lp__tablewrap {
	overflow-x: auto;
	background: #fff;
	border: 1px solid var(--mgsb-line, #e6d9c2);
	border-radius: 20px;
}

.mgsb-lp .mgsb-lp__table {
	width: 100%;
	min-width: 720px;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 16px;
	line-height: 1.4;
	text-align: left;
}

.mgsb-lp .mgsb-lp__table th,
.mgsb-lp .mgsb-lp__table td {
	padding: 16px 22px;
	border: 0;
	background: transparent;
	color: var(--mgsb-muted, #6b5444);
	vertical-align: middle;
}

.mgsb-lp .mgsb-lp__table th {
	padding: 18px 22px;
	font-weight: 600;
}

.mgsb-lp .mgsb-lp__table tbody tr + tr td,
.mgsb-lp .mgsb-lp__table tbody tr:first-child td {
	border-top: 1px solid #efe5d3;
}

.mgsb-lp .mgsb-lp__table th:first-child,
.mgsb-lp .mgsb-lp__table td:first-child {
	width: 34%;
	color: var(--mgsb-ink, #2b1d14);
	font-weight: 600;
}

.mgsb-lp .mgsb-lp__table th:nth-child(2) {
	background: var(--mgsb-gold, #f2c21b);
	color: var(--mgsb-ink, #2b1d14);
	font-family: var(--mgsb-font-heading, "Bricolage Grotesque", Georgia, serif);
	font-size: 18px;
	font-weight: 800;
}

.mgsb-lp .mgsb-lp__table td:nth-child(2) {
	background: var(--mgsb-select-bg, #fff7d6);
	color: var(--mgsb-ink, #2b1d14);
	font-weight: 700;
}

/* ---------- FAQ accordion (Elementor Accordion widget) ---------- */

.mgsb-lp .mgsb-lp__faq .elementor-accordion-item {
	margin-bottom: 10px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--mgsb-line, #e6d9c2);
	border-radius: 14px;
}

.mgsb-lp .mgsb-lp__faq .elementor-accordion-item:last-child {
	margin-bottom: 0;
}

.mgsb-lp .mgsb-lp__faq .elementor-tab-content {
	border-top: 0;
}

/* Question row: the +/- icon gets its own column with a gap, and a long question wraps beside it, not under it.
   Applies to any Elementor Accordion widget inside a landing / flavor-page section (.mgsb-lp). */
.mgsb-lp .elementor-widget-accordion .elementor-tab-title {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
}

.mgsb-lp .elementor-widget-accordion .elementor-accordion-icon {
	float: none;
	flex: 0 0 auto;
	width: 1.1em;
	margin: 0;
	text-align: center;
	line-height: 1.3;
}

.mgsb-lp .elementor-widget-accordion .elementor-accordion-title {
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.3;
}

@media (max-width: 767px) {
	.mgsb-lp .elementor-widget-accordion .elementor-accordion-title {
		font-size: 16px;
	}
}

/* ---------- Review placeholders: make bracketed copy easy to spot while reviewing ---------- */

.mgsb-lp .mgsb-lp__placeholder {
	color: var(--mgsb-muted, #6b5444);
	font-style: italic;
}


/* ---------- "Coming soon" label on a flavor picture (marigold_flavor_image, coming-soon flavors only) ---------- */

.mgsb-lp .mgsb-flavor-frame {
	position: relative;
	display: block;
	width: 100%;
}

.mgsb-lp .mgsb-flavor-frame.is-coming-soon .mgsb-flavor-img {
	opacity: var(--mgsb-soon-img-opacity, 0.55);
}

.mgsb-lp .mgsb-flavor-soon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 10px 22px;
	border-radius: 999px;
	background: var(--mgsb-soon-bg, var(--mgsb-green, #2f6b3a));
	color: var(--mgsb-soon-label-color, #fff);
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* ---------- Comparison table on phones: each row becomes a card, so nothing scrolls sideways ---------- */

@media (max-width: 767px) {
	.mgsb-lp .mgsb-lp__tablewrap {
		overflow: visible;
		background: transparent;
		border: 0;
		border-radius: 0;
	}

	.mgsb-lp .mgsb-lp__table {
		min-width: 0;
		display: block;
	}

	.mgsb-lp .mgsb-lp__table thead {
		display: none;
	}

	.mgsb-lp .mgsb-lp__table tbody {
		display: block;
	}

	.mgsb-lp .mgsb-lp__table tbody tr {
		display: block;
		margin: 0 0 12px;
		overflow: hidden;
		background: #fff;
		border: 1px solid var(--mgsb-line, #e6d9c2);
		border-radius: 14px;
	}

	.mgsb-lp .mgsb-lp__table tbody tr:last-child {
		margin-bottom: 0;
	}

	.mgsb-lp .mgsb-lp__table td {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: 12px;
		width: auto;
		padding: 10px 16px;
		border-top: 1px solid #efe5d3;
		text-align: right;
	}

	.mgsb-lp .mgsb-lp__table td:first-child {
		display: block;
		width: auto;
		padding: 14px 16px 10px;
		border-top: 0;
		font-size: 16px;
		line-height: 1.3;
		text-align: left;
	}

	.mgsb-lp .mgsb-lp__table td[data-label]::before {
		content: attr(data-label);
		flex: 1 1 auto;
		color: var(--mgsb-muted, #6b5444);
		font-size: 14px;
		font-weight: 500;
		text-align: left;
	}

	.mgsb-lp .mgsb-lp__table td:nth-child(2) {
		background: var(--mgsb-select-bg, #fff7d6);
		border-top: 0;
	}

	.mgsb-lp .mgsb-lp__table td:nth-child(2)::before {
		color: var(--mgsb-ink, #2b1d14);
		font-weight: 700;
	}
}
