/*
 * EDRO Subscrições — offer box, plan cards, account bar.
 * Colours and fonts follow the Divi global presets, with the EDRO palette as fallback.
 */

.edro-paywall,
.edro-plans-page,
.edro-thankyou,
.edro-topbar,
.edro-account {
	--edro-primary: var(--gcid-primary-color, #1f4e5f);
	--edro-surface: var(--gcid-secondary-color, #f4f4f2);
	--edro-heading-font: var(--et_global_heading_font, "Merriweather", Georgia, serif);
}

/* Teaser of a closed article */
.edro-teaser {
	position: relative;
}

.edro-teaser::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 4em;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
	pointer-events: none;
}

.edro-teaser p {
	padding-bottom: 1em;
}

.edro-teaser .edro-teaser__lead {
	font-family: var(--et_global_heading_font, "Merriweather", Georgia, serif);
	font-size: 1.45em;
	line-height: 1.3;
}

.edro-teaser-note a {
	font-weight: 700;
}

/* Offer */
.edro-paywall,
.edro-thankyou {
	clear: both;
	margin: 1.5em 0 2.5em;
	padding: 2.2em 1.5em 2em;
	border-top: 4px solid var(--edro-primary);
	border-radius: 4px;
	background: var(--edro-surface);
	color: var(--edro-primary);
	text-align: center;
}

.edro-paywall--compact {
	margin: 1em 0;
	padding: 1.6em 1em 1.4em;
}

.edro-paywall__icon {
	display: block;
	margin: 0 auto 0.6em;
}

.edro-paywall .edro-paywall__title,
.edro-thankyou h2 {
	margin: 0 0 0.5em;
	padding: 0;
	color: inherit;
	font-family: var(--edro-heading-font);
	font-size: 1.6em;
	line-height: 1.25;
}

.edro-paywall .edro-paywall__text,
.edro-thankyou p {
	max-width: 36em;
	margin: 0 auto;
	padding-bottom: 1em;
	font-size: 1.1em;
}

.edro-paywall .edro-paywall__login {
	margin: 0;
	padding: 0;
}

.edro-paywall .edro-paywall__login a,
.edro-plans-page .edro-paywall__login a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
}

/* Plans */
.edro-plans {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 18px;
	margin: 0.6em 0 1.4em;
}

.edro-plan {
	position: relative;
	display: flex;
	flex: 1 1 220px;
	flex-direction: column;
	align-items: center;
	max-width: 290px;
	padding: 1.6em 1em 1.3em;
	border: 1px solid rgba(31, 78, 95, 0.22);
	border-radius: 6px;
	background: #fff;
	color: var(--edro-primary, #1f4e5f);
	text-align: center;
}

.edro-plan--annual {
	border-color: var(--edro-primary, #1f4e5f);
	box-shadow: 0 0 0 1px var(--edro-primary, #1f4e5f);
}

.edro-plan__badge {
	position: absolute;
	top: -0.85em;
	left: 50%;
	padding: 0.25em 0.9em;
	border-radius: 99px;
	background: var(--edro-primary, #1f4e5f);
	color: #fff;
	font-size: 0.8em;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
	transform: translateX(-50%);
}

.edro-plan__name {
	font-size: 0.85em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.edro-plan__price {
	margin-top: 0.15em;
	font-size: 2em;
	font-weight: 700;
	line-height: 1.25;
}

.edro-plan__per {
	font-size: 0.45em;
	font-weight: 500;
}

.edro-plan__note {
	min-height: 1.7em;
	font-size: 0.9em;
	opacity: 0.8;
}

/* Buttons line up whatever the cards hold. */
.edro-plan a.edro-btn {
	margin-top: auto;
}

a.edro-btn,
a.edro-btn:visited {
	display: inline-block;
	margin-top: 0.7em;
	padding: 0.7em 1.5em;
	border-radius: 4px;
	background: var(--edro-primary, #1f4e5f);
	color: #fff;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	transition: opacity 0.15s ease-in-out;
}

a.edro-btn:hover,
a.edro-btn:focus {
	color: #fff;
	opacity: 0.86;
}

.edro-plans-page {
	margin: 1.5em 0;
	color: var(--edro-primary);
	text-align: center;
}

.edro-plans-page__status,
.edro-account__status {
	padding: 0.9em 1.1em;
	border-left: 4px solid var(--edro-primary);
	background: var(--edro-surface);
	font-weight: 700;
	text-align: left;
}

.edro-account .edro-plans {
	justify-content: flex-start;
	margin-top: 1.6em;
}

/* A closed page or flipbook has no layout of its own */
.edro-locked-page {
	width: 80%;
	max-width: 1080px;
	margin: 0 auto;
	padding: 58px 0;
}

.edro-locked-page .entry-title,
.edro-locked-page__intro {
	text-align: center;
}

.edro-locked-page__intro {
	max-width: 42em;
	margin: 0 auto;
	font-size: 1.1em;
}

.edro-locked-page__cover {
	display: block;
	max-width: 220px;
	height: auto;
	margin: 1em auto 1.5em;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
}

/* Account bar */
.edro-topbar {
	background: var(--edro-primary);
	font-size: 13px;
	line-height: 1.2;
}

.edro-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	width: 80%;
	max-width: 1080px;
	margin: 0 auto;
	padding: 7px 0;
}

.edro-topbar a,
.edro-topbar a:visited {
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.edro-topbar a:hover,
.edro-topbar a:focus {
	text-decoration: underline;
}

.edro-topbar a.edro-topbar__cta {
	padding: 3px 12px;
	border-radius: 99px;
	background: #fff;
	color: var(--edro-primary);
}

@media (max-width: 767px) {
	.edro-topbar__inner,
	.edro-locked-page {
		width: 90%;
	}

	.edro-locked-page {
		padding: 32px 0;
	}

	.edro-paywall,
	.edro-thankyou {
		padding: 1.8em 1em 1.6em;
	}

	.edro-plan {
		max-width: none;
	}
}

/*
 * Cart, checkout and account pages.
 * On these pages Divi floats its full-width column without giving it a width or clearing
 * it. The WooCommerce cart/checkout blocks have no intrinsic width (size containment), so
 * the column shrinks to nothing, and the footer slides up over the page. A full-width
 * column has no reason to float.
 */
.woocommerce-cart .et_block_row > .et_pb_column_4_4,
.woocommerce-checkout .et_block_row > .et_pb_column_4_4,
.woocommerce-account .et_block_row > .et_pb_column_4_4 {
	float: none;
	width: 100%;
}
