.easyrx-plus-benefits {
	--plus-benefits-item-background: rgba(255, 255, 255, 0.06);
	--plus-benefits-icon-background: #038935;
	--plus-benefits-title-color: #ffffff;
	--plus-benefits-description-color: #ffffff;
	--plus-benefits-link-color: #ffffff;

	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.easyrx-plus-benefits__item {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 16px;
	border-radius: 12px;
	background-color: var(--plus-benefits-item-background);
}

.easyrx-plus-benefits__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	box-sizing: border-box;
	padding: 4px;
	border-radius: 100px;
	background-color: var(--plus-benefits-icon-background);
}

.easyrx-plus-benefits__icon svg {
	display: block;
	width: 16px;
	height: 16px;
}

.easyrx-plus-benefits__content {
	display: flex;
	flex: 1 1 0%;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	line-height: 24px;
	overflow-wrap: break-word;
}

.easyrx-plus-benefits__title {
	font-family: "Switzer-Semibold", "Switzer", sans-serif;
	font-size: 20px;
	font-weight: 600;
	color: var(--plus-benefits-title-color);
}

.easyrx-plus-benefits__description {
	font-family: "Switzer-Regular", "Switzer", sans-serif;
	font-size: 16px;
	font-weight: 400;
	color: var(--plus-benefits-description-color);
}

/* Body - normal, underlined: Switzer Regular 16/24, solid underline offset
   from the font metrics.
 *
 * Both link rules below are deliberately over-qualified. Elementor's kit styles
 * every anchor via `.elementor-kit-N a` - one class plus one type - which
 * out-specifies a single class of ours, so it would otherwise win on colour,
 * font-size and line-height. */
.easyrx-plus-benefits .easyrx-plus-benefits__link {
	display: block;
	width: fit-content;
	font-family: "Switzer-Regular", "Switzer", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	color: var(--plus-benefits-link-color);
	text-decoration-line: underline;
	text-decoration-style: solid;
	text-underline-position: from-font;
	overflow-wrap: break-word;
	cursor: pointer;
}

.easyrx-plus-benefits .easyrx-plus-benefits__link:hover,
.easyrx-plus-benefits .easyrx-plus-benefits__link:focus {
	color: var(--plus-benefits-link-color);
	opacity: 0.85;
}

/* Trigger rendered by [easyrx_free_medications_link]. Same underline treatment
   as the checklist link, but dark: this one sits inline in body copy such as
   the FAQ answers, where the checklist's white would be invisible. Font is
   inherited so it matches the sentence it sits inside. */
.easyrx-free-medications-link.easyrx-free-medications-link {
	font: inherit;
	color: #101828;
	text-decoration-line: underline;
	text-decoration-style: solid;
	text-underline-position: from-font;
	overflow-wrap: break-word;
	cursor: pointer;
}

.easyrx-free-medications-link.easyrx-free-medications-link:hover,
.easyrx-free-medications-link.easyrx-free-medications-link:focus {
	color: #101828;
	opacity: 0.85;
}

body.easyrx-plus-modal-open {
	overflow: hidden;
}

.easyrx-plus-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.easyrx-plus-modal.is-open {
	display: flex;
}

.easyrx-plus-modal__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(11, 42, 28, 0.72);
}

/* The dialog itself never scrolls — the table does (see __table-wrap), so the
   title, search and pagination stay put while the rows move. */
.easyrx-plus-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 720px;
	max-height: 85vh;
	overflow: hidden;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 16px;
	background-color: var(--background-default, #ffffff);
	border-radius: 16px;
}

/* Everything except the table keeps its natural height. */
.easyrx-plus-modal__dialog > .easyrx-plus-modal__title,
.easyrx-plus-modal__dialog > .easyrx-plus-modal__search,
.easyrx-plus-modal__dialog > .easyrx-plus-modal__status,
.easyrx-plus-modal__dialog > .easyrx-plus-modal__pagination {
	flex: 0 0 auto;
}

/* Elementor's global kit styles every <button> (green pill, white text,
   100px radius, 12px/20px padding), so these resets need to out-specify
   `.elementor-kit-N button` — hence the doubled class selectors below. */
.easyrx-plus-modal .easyrx-plus-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: none;
	border-radius: 0;
	background: none;
	background-color: transparent;
	box-shadow: none;
	color: #101828;
	line-height: 1;
	cursor: pointer;
}

.easyrx-plus-modal .easyrx-plus-modal__close:hover,
.easyrx-plus-modal .easyrx-plus-modal__close:focus {
	background: none;
	background-color: transparent;
	color: #038935;
}

.easyrx-plus-modal .easyrx-plus-modal__title {
	margin: 0 32px 0 0;
	padding: 0;
	font-family: "Switzer-Semibold", "Switzer", sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 24px;
	color: var(--text-on-white-primary, #101828);
}

.easyrx-plus-modal__search {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	height: 56px;
	box-sizing: border-box;
	padding: 4px 20px;
	border: 1px solid var(--stroke-default, #d0d5dd);
	border-radius: 100px;
	cursor: text;
}

.easyrx-plus-modal__search-icon {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
}

.easyrx-plus-modal__search-input {
	flex: 1 1 0%;
	border: none;
	outline: none;
	font-family: "Switzer-Regular", "Switzer", sans-serif;
	font-size: 16px;
	color: #101828;
	background: transparent;
}

.easyrx-plus-modal__search-input::placeholder {
	color: var(--gray-500, #667085);
}

/* The dialog already provides gap/spacing between sections, so drop the
   full-page table's own top margin and pin down the two fixed columns. */
.easyrx-plus-modal .easyrx-medications-table {
	margin-top: 0;
}

/* This wrapper is the only scroll container in the dialog. `min-height: 0` is
   what lets it shrink below its content so the rows scroll instead of pushing
   the pagination out of view. style.css also gives every
   .easyrx-medications-table `overflow-x: auto` plus an 800px min-width below
   768px — the columns collapse responsively here, so opt out of that. */
.easyrx-plus-modal .easyrx-medications-table {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
}

.easyrx-plus-modal .easyrx-medications-table table {
	min-width: 0;
}

/* The frame lives on the wrapper, not the table, so it stays in place while
   the rows scroll underneath it. */
.easyrx-plus-modal .easyrx-medications-table {
	border: 1px solid var(--stroke-default, #d0d5dd);
	border-radius: 16px;
}

.easyrx-plus-modal .easyrx-medications-table .table {
	border: none;
	border-radius: 0;
}

/* style.css rounds the header and last-row corners to fake a frame on the
   table itself; the wrapper clips to its own radius now, and a rounded last
   row would show as a notch part-way through a scroll. */
.easyrx-plus-modal .easyrx-medications-table thead tr:first-child th:first-child,
.easyrx-plus-modal .easyrx-medications-table thead tr:first-child th:last-child,
.easyrx-plus-modal .easyrx-medications-table tbody tr:last-child td:first-child,
.easyrx-plus-modal .easyrx-medications-table tbody tr:last-child td:last-child {
	border-radius: 0;
}

/* Keep the column headings visible while scrolling. Needs an opaque
   background of its own since the rows pass beneath it. */
.easyrx-plus-modal .easyrx-medications-table .table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	background-color: #d0d5dd;
}

.easyrx-plus-modal .easyrx-medications-table .table tbody td {
	border-bottom: 1px solid var(--stroke-default, #d0d5dd);
}

.easyrx-plus-modal .easyrx-medications-table .table tbody tr:last-child td {
	border-bottom: none;
}

.easyrx-plus-modal .easyrx-medications-table .table th:nth-child(2),
.easyrx-plus-modal .easyrx-medications-table .table td:nth-child(2),
.easyrx-plus-modal .easyrx-medications-table .table th:nth-child(3),
.easyrx-plus-modal .easyrx-medications-table .table td:nth-child(3) {
	width: 160px;
}

/* The Rx mark sits inline after the name, as in the All medications table -
   style.css handles that via margin-left on .rx-required. Its 2px bottom
   margin is dropped here so the mark sits on the text baseline. */
.easyrx-plus-modal .easyrx-medications-table .medication-name .rx-required {
	margin-bottom: 0;
}

/* Header cell: logo 85x24, "Plus" 16px semibold, 20px info icon, 6px gaps. */
.easyrx-plus-modal .easyrx-price-head {
	gap: 6px;
}

.easyrx-plus-modal .easyrx-price-head .icon-help {
	display: block;
	width: 20px;
	height: 20px;
}

.easyrx-plus-modal__plus-label {
	font-family: "Switzer-Semibold", "Switzer", sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	color: #000000;
}

/* Out-of-stock medications: same body type as the rest of the table rather
   than the green semibold "Free" it replaces. Scoped under .medication-meta so
   it inherits the column's centring. */
.easyrx-plus-modal .medication-meta .easyrx-plus-modal__out-of-stock {
	font-family: "Switzer-Regular", "Switzer", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	color: #667085;
}

/* The table wrapper is the dialog's scroll container, so the shared tooltip
   needs two changes to avoid being clipped by it: open downward rather than up
   through the header, and hug the right edge rather than centring on the icon,
   which sits close enough to the table's right edge that a centred bubble
   would run past it. */
.easyrx-plus-modal .easyrx-price-head .tooltip-content {
	top: 150%;
	bottom: auto;
	left: auto;
	right: 0;
	transform: none;
	max-width: 240px;
	white-space: normal;
	text-align: left;
	font-size: 14px;
	line-height: 20px;
}

.easyrx-plus-modal .easyrx-price-head .tooltip-content::after {
	top: auto;
	bottom: 100%;
	left: auto;
	right: 3px;
	margin-left: 0;
	border-color: transparent transparent #101828 transparent;
}

/* Loading placeholders. Mirrors the shimmer used by the medication carousel in
   easyrx-featured-medications, duplicated rather than shared because that
   stylesheet is only enqueued by its own widget. */
.easyrx-plus-modal__skeleton-line {
	display: block;
	height: 16px;
	border-radius: 4px;
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: easyrx-plus-shimmer 1.5s infinite;
}

.easyrx-plus-modal__skeleton-line--name {
	width: 70%;
}

.easyrx-plus-modal__skeleton-line--stacked {
	width: 72px;
	height: 14px;
	margin-top: 4px;
}

.easyrx-plus-modal__skeleton-line--price {
	width: 64px;
	margin: 0 auto;
}

.easyrx-plus-modal__skeleton-line--free {
	width: 48px;
	margin: 0 auto;
}

@keyframes easyrx-plus-shimmer {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.easyrx-plus-modal__skeleton-line {
		animation: none;
	}
}

.easyrx-plus-modal__status {
	display: none;
	margin: 0;
	font-family: "Switzer-Regular", "Switzer", sans-serif;
	font-size: 14px;
	color: #475467;
	text-align: center;
}

.easyrx-plus-modal .easyrx-plus-modal__pagination {
	margin-top: 0;
}

.easyrx-plus-modal .easyrx-plus-modal__page-list {
	margin: 0;
	padding: 0;
	row-gap: 8px;
}

/* style.css highlights `li:hover a.page-numbers` green. On a touch screen the
   tapped element keeps :hover until something else is tapped, and because the
   list is rebuilt with a different arrangement after loading, the stuck hover
   lands on whichever link now occupies that slot - showing a second green pill
   alongside the real .current one. Only honour hover where it truly exists. */
@media (hover: none) {
	.easyrx-plus-modal .medication-pagination > ul li:hover a.page-numbers {
		background-color: transparent;
		color: #101828;
	}

	.easyrx-plus-modal .medication-pagination > ul li:hover a.page-numbers.next,
	.easyrx-plus-modal .medication-pagination > ul li:hover a.page-numbers.prev {
		color: #101828;
	}
}

/* Keep the pills at the 44px the design calls for; the shared rule sets
   width and padding together, which overflows without border-box. */
.easyrx-plus-modal .easyrx-plus-modal__page-list .page-numbers {
	box-sizing: border-box;
	min-width: 44px;
	padding: 12px 8px;
}

/* Stacked retail price replaces the column below tablet; see the breakpoint. */
.easyrx-plus-modal__retail-stacked {
	display: none;
}

/* Tablet and below: drop the Retail Price column and show the value under the
   medication name instead, so only Medicine and EasyRx Plus remain. */
@media (max-width: 1024px) {
	.easyrx-plus-modal .easyrx-medications-table .table th.easyrx-plus-modal__retail-cell,
	.easyrx-plus-modal .easyrx-medications-table .table td.easyrx-plus-modal__retail-cell {
		display: none;
	}

	.easyrx-plus-modal .easyrx-plus-modal__retail-stacked {
		display: block;
		font-family: "Switzer-Regular", "Switzer", sans-serif;
		font-size: 16px;
		line-height: 24px;
		color: #101828;
	}
}

/* Below this width the design drops the Retail Price column and moves the
   value under the medication name, keeping the table (not cards) intact. */
@media (max-width: 600px) {
	/* Present it as a bottom drawer: flush to the edges, anchored to the
	   bottom of the viewport, with only the top corners rounded. */
	.easyrx-plus-modal {
		align-items: flex-end;
		padding: 0;
	}

	.easyrx-plus-modal .easyrx-plus-modal__dialog {
		gap: 12px;
		width: 100%;
		max-width: none;
		max-height: 75vh;
		border-radius: 16px 16px 0 0;
		padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
		animation: easyrx-plus-drawer-in 0.25s ease-out;
	}

	@keyframes easyrx-plus-drawer-in {
		from {
			transform: translateY(100%);
		}

		to {
			transform: translateY(0);
		}
	}

	@media (prefers-reduced-motion: reduce) {
		.easyrx-plus-modal .easyrx-plus-modal__dialog {
			animation: none;
		}
	}

	.easyrx-plus-modal .easyrx-plus-modal__title {
		font-size: 18px;
	}

	.easyrx-plus-modal .easyrx-plus-modal__search {
		height: 48px;
		padding: 4px 16px;
	}

	.easyrx-plus-modal .easyrx-medications-table .table th:nth-child(3),
	.easyrx-plus-modal .easyrx-medications-table .table td:nth-child(3) {
		width: 96px;
	}

	.easyrx-plus-modal .easyrx-medications-table .table thead th,
	.easyrx-plus-modal .easyrx-medications-table .table tbody td {
		padding: 12px 16px;
	}

	/* Mobile header cell: logo 57x16, "Plus" 12px bold, 16px info icon. Note the
	   table lays out on `auto`, so this cell's width is the floor for the whole
	   column - anything wider here squeezes the medication names. */
	.easyrx-plus-modal .easyrx-price-head .easyrx-logo {
		width: 57px;
		height: 16px;
	}

	.easyrx-plus-modal .easyrx-price-head .icon-help {
		width: 16px;
		height: 16px;
	}

	.easyrx-plus-modal .easyrx-plus-modal__plus-label {
		font-family: "Switzer-Bold", "Switzer", sans-serif;
		font-size: 12px;
		font-weight: 700;
		line-height: 16px;
	}

	.easyrx-plus-modal .easyrx-medications-table .table th:nth-child(3),
	.easyrx-plus-modal .easyrx-medications-table .table td:nth-child(3) {
		padding-left: 8px;
		padding-right: 8px;
	}

	/* 14px body text so names like "Acyclovir 200 mg capsules" sit on one
	   line, as the design shows; longer ones still wrap. */
	.easyrx-plus-modal .easyrx-medications-table .medication-name > span {
		white-space: normal;
		font-size: 14px;
		line-height: 20px;
	}

	.easyrx-plus-modal .easyrx-plus-modal__retail-stacked {
		font-size: 14px;
		line-height: 20px;
	}

	/* "Free" drops to body size on mobile per the design. */
	.easyrx-plus-modal .medication-meta .medication-price,
	.easyrx-plus-modal .medication-meta .easyrx-plus-modal__out-of-stock {
		font-size: 14px;
	}

	.easyrx-plus-modal .medication-meta .easyrx-plus-modal__out-of-stock {
		line-height: 20px;
	}

	/* Tighter pills so the row fits a phone without wrapping. */
	.easyrx-plus-modal .easyrx-plus-modal__page-list {
		gap: 4px;
	}

	.easyrx-plus-modal .easyrx-plus-modal__page-list .page-numbers {
		min-width: 32px;
		width: auto;
		height: 32px;
		padding: 4px 4px;
		font-size: 14px;
	}
}
