/* IB Content Membership — Frontend Paywall, Inline Checkout & Member Account Portal */

.ib-restricted-teaser {
	position: relative;
	margin-bottom: 1.25rem;
}

.ib-paywall-box {
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-top: 4px solid #005aa7;
	border-radius: 10px;
	padding: 1.75rem;
	margin: 1.5rem 0 2rem 0;
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.ib-paywall-top-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}

.ib-paywall-eyebrow {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #005aa7;
	background: #e0f2fe;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
}

.ib-paywall-login-inline {
	font-size: 0.88rem;
	color: #475569;
}

.ib-paywall-login-inline a {
	color: #005aa7;
	font-weight: 700;
	text-decoration: none;
}

.ib-paywall-login-inline a:hover {
	text-decoration: underline;
}

.ib-paywall-title {
	margin: 0.25rem 0 0.5rem 0;
	font-size: 1.35rem;
	line-height: 1.3;
	color: #0f172a;
}

.ib-paywall-desc {
	margin: 0 0 1.25rem 0;
	font-size: 0.95rem;
	color: #334155;
	line-height: 1.55;
}

.ib-paywall-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.ib-paywall-btn-primary {
	display: inline-block;
	background: #005aa7;
	color: #ffffff !important;
	font-weight: 600;
	font-size: 0.95rem;
	padding: 0.7rem 1.35rem;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	text-decoration: none !important;
	transition: background 0.15s ease;
}

.ib-paywall-btn-primary:hover {
	background: #004480;
}

.ib-paywall-btn-secondary {
	display: inline-block;
	background: #ffffff;
	color: #0f172a !important;
	border: 1px solid #cbd5e1;
	font-weight: 600;
	font-size: 0.95rem;
	padding: 0.65rem 1.25rem;
	border-radius: 6px;
	text-decoration: none !important;
}

.ib-paywall-btn-secondary:hover {
	background: #f1f5f9;
}

/* Inline Subscription Plan & Payment Selector */
.ib-purchase-widget {
	margin-top: 1rem;
}

.ib-checkout-alert {
	padding: 0.85rem 1rem;
	border-radius: 8px;
	margin-bottom: 1.15rem;
	font-size: 0.92rem;
	line-height: 1.45;
}

.ib-checkout-alert.is-success {
	background: #dcfce7;
	border: 1px solid #86efac;
	color: #166534;
}

.ib-checkout-alert.is-info {
	background: #e0f2fe;
	border: 1px solid #7dd3fc;
	color: #075985;
}

.ib-checkout-alert.is-warning {
	background: #fef3c7;
	border: 1px solid #fcd34d;
	color: #92400e;
}

.ib-checkout-alert.is-error {
	background: #fee2e2;
	border: 1px solid #fca5a5;
	color: #991b1b;
}

.ib-purchase-step {
	margin-bottom: 1.35rem;
}

.ib-step-heading {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-weight: 700;
	font-size: 0.95rem;
	color: #0f172a;
	margin-bottom: 0.75rem;
}

.ib-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 999px;
	background: #005aa7;
	color: #ffffff;
	font-size: 0.78rem;
	font-weight: 700;
}

.ib-plans-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 0.85rem;
}

.ib-plan-card {
	position: relative;
	cursor: pointer;
	display: block;
	margin: 0;
}

.ib-plan-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.ib-plan-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	background: #ffffff;
	border: 2px solid #cbd5e1;
	border-radius: 8px;
	padding: 0.95rem 1rem;
	height: 100%;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ib-plan-card input[type="radio"]:checked + .ib-plan-card-body {
	border-color: #005aa7;
	background: #f0f9ff;
	box-shadow: 0 0 0 3px rgba(0, 90, 167, 0.12);
}

.ib-plan-top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem;
}

.ib-plan-name {
	font-weight: 700;
	font-size: 1rem;
	color: #0f172a;
}

.ib-plan-price {
	font-weight: 800;
	font-size: 1.05rem;
	color: #005aa7;
}

.ib-plan-duration {
	font-size: 0.8rem;
	font-weight: 600;
	color: #475569;
}

.ib-plan-desc {
	font-size: 0.82rem;
	color: #64748b;
	line-height: 1.4;
}

.ib-guest-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 0.85rem;
}

.ib-field-group {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.ib-field-group label {
	font-size: 0.82rem;
	font-weight: 600;
	color: #334155;
}

.ib-field-group input {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 0.55rem 0.75rem;
	font-size: 0.92rem;
	color: #0f172a;
}

.ib-gateways-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.ib-gateway-card {
	position: relative;
	cursor: pointer;
	display: block;
	margin: 0;
}

.ib-gateway-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.ib-gateway-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	background: #ffffff;
	border: 2px solid #cbd5e1;
	border-radius: 8px;
	padding: 0.8rem 0.95rem;
}

.ib-gateway-card input[type="radio"]:checked + .ib-gateway-card-body {
	border-color: #005aa7;
	background: #f0f9ff;
}

.ib-gateway-card-body strong {
	font-size: 0.92rem;
	color: #0f172a;
}

.ib-gateway-card-body span {
	font-size: 0.8rem;
	color: #64748b;
}

.ib-checkout-submit-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.85rem;
}

.ib-currency-note {
	font-size: 0.82rem;
	color: #64748b;
}

/* Archive Lock Pill */
.ib-archive-lock-note {
	margin-top: 0.5rem;
	font-size: 0.85rem;
}

.ib-lock-pill {
	display: inline-block;
	background: #fef3c7;
	color: #92400e;
	font-weight: 700;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.15rem 0.5rem;
	border-radius: 4px;
	margin-right: 0.35rem;
}

/* Member Account Portal Card */
.ib-account-card {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	padding: 1.75rem;
	max-width: 820px;
	margin: 1.5rem 0;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.ib-account-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid #e2e8f0;
}

.ib-account-user-name {
	margin: 0.15rem 0;
	font-size: 1.35rem;
	color: #0f172a;
}

.ib-account-user-email {
	margin: 0;
	font-size: 0.9rem;
	color: #64748b;
}

.ib-status-pill {
	display: inline-block;
	padding: 0.3rem 0.85rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ib-status-pill.is-active {
	background: #dcfce7;
	color: #166534;
}

.ib-status-pill.is-expired {
	background: #fee2e2;
	color: #991b1b;
}

.ib-status-pill.is-pending {
	background: #fef3c7;
	color: #92400e;
}

.ib-status-pill.is-none {
	background: #f1f5f9;
	color: #475569;
}

.ib-account-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 1rem;
	margin: 1.25rem 0;
}

.ib-account-stat {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.ib-stat-label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #64748b;
	font-weight: 700;
}

.ib-stat-value {
	font-size: 1.05rem;
	font-weight: 700;
	color: #0f172a;
}

.ib-stat-sub {
	font-size: 0.83rem;
	color: #475569;
}

.ib-account-plan-desc {
	font-size: 0.92rem;
	color: #334155;
	margin: 0 0 1.25rem 0;
}

.ib-account-history {
	margin: 1.25rem 0;
}

.ib-history-heading {
	font-size: 0.95rem;
	margin: 0 0 0.6rem 0;
	color: #0f172a;
}

.ib-history-table-wrap {
	overflow-x: auto;
}

.ib-history-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.86rem;
}

.ib-history-table th,
.ib-history-table td {
	text-align: left;
	padding: 0.55rem 0.7rem;
	border-bottom: 1px solid #e2e8f0;
}

.ib-history-table th {
	background: #f8fafc;
	color: #475569;
	font-weight: 700;
}

.ib-account-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #e2e8f0;
}

.ib-account-logout {
	font-size: 0.9rem;
	color: #64748b;
	text-decoration: underline;
}

/* Custom Auth Portal, Payment Pages & Receipt Cards (v2.0.0) */
.ib-auth-shell {
	max-width: 480px;
	margin: 2rem auto;
}

.ib-auth-card {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-top: 4px solid #005aa7;
	border-radius: 10px;
	padding: 2rem;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ib-auth-title {
	margin: 0.45rem 0 0.35rem 0;
	font-size: 1.45rem;
	color: #0f172a;
}

.ib-auth-subtitle {
	margin: 0 0 1.25rem 0;
	font-size: 0.92rem;
	color: #475569;
}

.ib-auth-tabs {
	display: flex;
	gap: 0.35rem;
	border-bottom: 1px solid #e2e8f0;
	margin-bottom: 1.25rem;
}

.ib-auth-tab {
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 0.55rem 0.85rem;
	font-size: 0.88rem;
	font-weight: 600;
	color: #64748b;
	cursor: pointer;
}

.ib-auth-tab.is-active {
	color: #005aa7;
	border-bottom-color: #005aa7;
}

.ib-auth-panel {
	display: none;
}

.ib-auth-panel.is-active {
	display: block;
}

.ib-auth-form {
	display: flex;
	flex-direction: column;
	gap: 0.95rem;
}

.ib-auth-meta-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.84rem;
}

.ib-checkbox-inline {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: #334155;
}

.ib-auth-inline-link,
.ib-auth-footer-note a {
	color: #005aa7;
	font-weight: 600;
	text-decoration: none;
}

.ib-auth-submit-btn {
	width: 100%;
	text-align: center;
	margin-top: 0.25rem;
}

.ib-auth-footer-note {
	margin-top: 1.35rem;
	padding-top: 1rem;
	border-top: 1px solid #e2e8f0;
	font-size: 0.88rem;
	color: #475569;
	text-align: center;
}

.ib-receipt-box {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 1rem 1.25rem;
	margin-top: 1rem;
}

.ib-receipt-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid #f1f5f9;
	font-size: 0.9rem;
}

.ib-receipt-row:last-child {
	border-bottom: none;
}

.ib-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid #cbd5e1;
	border-top-color: #005aa7;
	border-radius: 50%;
	margin: 0 auto 1rem auto;
	animation: ibSpin 0.8s linear infinite;
}

@keyframes ibSpin {
	to { transform: rotate(360deg); }
}