/* OCMasters Credit - storefront. Colours follow the theme (Journal 3 variables where they exist). */
:root {
	--ocm-credit-accent: #e30613;
	--ocm-credit-accent-text: #fff;
	--ocm-credit-border: #d9dde3;
	--ocm-credit-muted: #5f6b7a;
}

.ocm-credit {
	margin: 10px 0;
	font-family: inherit;
	clear: both;
}

.ocm-credit[hidden] {
	display: none !important;
}

.ocm-credit-btn {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: 44px;
	padding: 8px 18px;
	border: 2px solid var(--ocm-credit-accent);
	border-radius: 6px;
	background: var(--ocm-credit-accent);
	color: var(--ocm-credit-accent-text);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-align: center;
	max-width: 100%;
}

.ocm-credit-btn:hover,
.ocm-credit-btn:focus-visible {
	filter: brightness(0.93);
}

.ocm-credit-btn:focus-visible,
.ocm-credit-cell:focus-visible,
.ocm-credit-close:focus-visible,
.ocm-credit-tab:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
}

.ocm-credit-btn[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

.ocm-credit-outline {
	background: transparent;
	color: var(--ocm-credit-accent);
}

.ocm-credit-from {
	font-size: 0.85em;
	font-weight: 400;
}

.ocm-credit-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ocm-credit-btn-provider {
	background: #fff;
	color: #222;
	border-color: var(--ocm-credit-border);
	min-width: 140px;
}

.ocm-credit-logo {
	max-height: 30px;
	max-width: 120px;
	width: auto;
	height: auto;
	vertical-align: middle;
}

.ocm-credit-teaser-line {
	font-size: 0.95em;
}

.ocm-credit-link {
	font-weight: 600;
	text-decoration: underline;
	white-space: nowrap;
}

.ocm-credit-teaser {
	font-size: 0.85em;
	color: var(--ocm-credit-muted);
	margin: 2px 0 4px;
}

/* Popup */
html.ocm-credit-open {
	overflow: hidden;
}

.ocm-credit-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(15, 23, 42, 0.55);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 4vh 12px;
	overflow-y: auto;
}

.ocm-credit-dialog {
	background: #fff;
	color: #1f2937;
	width: 100%;
	max-width: 980px;
	border-radius: 10px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	padding: 20px 22px;
	font-size: 15px;
	line-height: 1.4;
	position: relative;
}

.ocm-credit-dialog:focus {
	outline: none;
}

.ocm-credit-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.ocm-credit-title {
	font-size: 22px;
	margin: 0;
	font-weight: 700;
}

.ocm-credit-close {
	border: 0;
	background: transparent;
	font-size: 32px;
	line-height: 1;
	padding: 0 6px;
	cursor: pointer;
	color: #374151;
}

.ocm-credit-legal,
.ocm-credit-note {
	font-size: 13px;
	color: var(--ocm-credit-muted);
	margin: 8px 0 12px;
}

.ocm-credit-down-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.ocm-credit-down {
	width: 140px;
	padding: 6px 8px;
	border: 1px solid var(--ocm-credit-border);
	border-radius: 4px;
}

.ocm-credit-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 6px;
	table-layout: fixed;
}

.ocm-credit-table th {
	text-align: center;
	font-weight: 600;
	padding: 6px 4px;
	vertical-align: middle;
}

.ocm-credit-table thead .ocm-credit-logo {
	max-height: 44px;
	max-width: 150px;
}

.ocm-credit-tab .ocm-credit-logo {
	max-height: 28px;
	max-width: 100px;
}

.ocm-credit-table thead th .ocm-credit-name {
	display: block;
	font-size: 12px;
	color: var(--ocm-credit-muted);
	font-weight: 400;
}

.ocm-credit-table tbody th {
	width: 90px;
	white-space: nowrap;
}

.ocm-credit-table td {
	padding: 0;
	vertical-align: top;
}

.ocm-credit-cell {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	width: 100%;
	min-height: 88px;
	padding: 10px 6px;
	border: 1px solid var(--ocm-credit-border);
	border-radius: 8px;
	background: #fff;
	color: inherit;
	font: inherit;
	cursor: pointer;
	text-align: center;
}

button.ocm-credit-cell:hover {
	border-color: var(--ocm-credit-accent);
}

.ocm-credit-cell.is-selected {
	border: 2px solid var(--ocm-credit-accent);
	box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.12);
	background: #fff8f8;
}

.ocm-credit-na {
	justify-content: center;
	color: #9aa3ae;
	cursor: default;
	background: #f7f8fa;
}

.ocm-credit-monthly {
	font-size: 20px;
	font-weight: 700;
	color: #111827;
}

.ocm-credit-dual {
	font-size: 12px;
	color: var(--ocm-credit-muted);
}

.ocm-credit-rates,
.ocm-credit-total {
	font-size: 12px;
	color: var(--ocm-credit-muted);
}

.ocm-credit-badge {
	position: absolute;
	top: -8px;
	right: 6px;
	background: #16a34a;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 10px;
}

.ocm-credit-foot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--ocm-credit-border);
}

.ocm-credit-summary {
	flex: 1 1 260px;
	font-weight: 600;
}

.ocm-credit-message,
.ocm-credit-error {
	color: #b42318;
	flex-basis: 100%;
	text-align: right;
}

.ocm-credit-message:empty {
	display: none;
}

.ocm-credit-mobile {
	display: none;
}

.ocm-credit-tabs {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	margin-bottom: 10px;
}

.ocm-credit-tab {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border: 1px solid var(--ocm-credit-border);
	border-radius: 20px;
	background: #fff;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

.ocm-credit-tab[aria-selected="true"] {
	border-color: var(--ocm-credit-accent);
	color: var(--ocm-credit-accent);
	font-weight: 600;
}

.ocm-credit-item {
	display: grid;
	grid-template-columns: 70px 1fr;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.ocm-credit-item-term {
	font-weight: 600;
}

.ocm-credit-item .ocm-credit-cell {
	min-height: 0;
	align-items: flex-start;
	text-align: left;
}

@media (max-width: 640px) {
	.ocm-credit-desktop {
		display: none;
	}

	.ocm-credit-mobile {
		display: block;
	}

	.ocm-credit-overlay {
		padding: 0;
	}

	.ocm-credit-dialog {
		border-radius: 0;
		min-height: 100%;
		padding: 14px;
	}

	.ocm-credit-foot {
		position: sticky;
		bottom: 0;
		background: #fff;
		padding-bottom: 6px;
	}

	.ocm-credit-buy {
		width: 100%;
	}

	.ocm-credit-btn {
		width: 100%;
	}
}

/* Checkout step */
.ocm-credit-checkout .ocm-credit-checkout-plans {
	margin: 10px 0;
}

.ocm-credit-checkout .ocm-credit-fields {
	display: grid;
	gap: 10px;
	max-width: 420px;
	margin: 10px 0;
}

.ocm-credit-checkout .ocm-credit-fields[hidden] {
	display: none;
}

.ocm-credit-checkout .ocm-credit-consent {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 12px 0;
}

.ocm-credit-checkout .ocm-credit-confirm-row {
	text-align: right;
}

/* Journal 3: the fonts of the theme */
.journal3 .ocm-credit,
body[class*="journal"] .ocm-credit {
	font-family: var(--font-family, inherit);
}
