/* SBC MC SSO — modal + login form */

.sbc-mc-sso-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.sbc-mc-sso-modal {
	background: #fff;
	border-radius: 20px;
	max-width: 440px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
	z-index: 99999;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.sbc-mc-sso-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 12px;
}

.sbc-mc-sso-modal__header h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #1a1a1a;
}

.sbc-mc-sso-modal__close {
	background: none;
	border: none;
	font-size: 26px;
	cursor: pointer;
	color: #6b7280;
	line-height: 1;
	padding: 0 4px;
}

.sbc-mc-sso-modal__close:hover { color: #1a1a1a; }

.sbc-mc-sso-modal__body { padding: 4px 24px 24px; }

.sbc-mc-sso-field { margin-bottom: 14px; }
.sbc-mc-sso-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}
.sbc-mc-sso-field input {
	width: 100%;
	padding: 10px 16px;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	font-size: 15px;
	box-sizing: border-box;
}
.sbc-mc-sso-field input:focus {
	outline: none;
	border-color: #217e8f;
	box-shadow: 0 0 0 3px rgba(33, 126, 143, 0.15);
}

.sbc-mc-sso-hint {
	font-size: 12px;
	color: #6b7280;
	margin-top: 4px;
}

.sbc-mc-sso-password-wrap {
	position: relative;
}

.sbc-mc-sso-password-wrap input {
	padding-right: 42px;
}

.sbc-mc-sso-toggle-pw {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 6px 8px;
	cursor: pointer;
	color: #6b7280;
	line-height: 0;
	border-radius: 3px;
}

.sbc-mc-sso-toggle-pw:hover  { color: #1a1a1a; }
.sbc-mc-sso-toggle-pw:focus  {
	outline: none;
	box-shadow: 0 0 0 2px rgba(33, 126, 143, 0.25);
}

.sbc-mc-sso-submit {
	background: #217e8f;
	color: #fff;
	border: none;
	padding: 12px 20px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
	margin-top: 6px;
}
.sbc-mc-sso-submit:hover     { background: #1a6674; }
.sbc-mc-sso-submit:disabled  { opacity: 0.6; cursor: not-allowed; }

.sbc-mc-sso-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: sbc-mc-sso-spin 0.6s linear infinite;
	margin-right: 8px;
	vertical-align: middle;
}
@keyframes sbc-mc-sso-spin { to { transform: rotate(360deg); } }

.sbc-mc-sso-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #9ca3af;
	font-size: 12px;
	margin: 18px 0 12px;
}
.sbc-mc-sso-divider::before,
.sbc-mc-sso-divider::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: #e5e7eb;
}

.sbc-mc-sso-learn-more {
	display: block;
	text-align: center;
	padding: 8px 16px;
	color: #217e8f;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}
.sbc-mc-sso-learn-more:hover { text-decoration: underline; }

.sbc-mc-sso-error {
	background: #fee2e2;
	color: #991b1b;
	padding: 10px 14px;
	border-radius: 4px;
	font-size: 14px;
	margin-bottom: 14px;
}

.sbc-mc-sso-diagnostic {
	margin: 0 0 14px 0;
	border: 1px solid #fca5a5;
	border-radius: 4px;
	padding: 8px 12px;
	background: #fef2f2;
}
.sbc-mc-sso-diagnostic summary {
	cursor: pointer;
	font-weight: 600;
	color: #7f1d1d;
	font-size: 12px;
}
.sbc-mc-sso-diagnostic pre {
	font-family: Consolas, Monaco, monospace;
	font-size: 11px;
	background: #1a1a1a;
	color: #e5e7eb;
	padding: 10px;
	border-radius: 3px;
	overflow-x: auto;
	margin: 8px 0 0 0;
	max-height: 240px;
	white-space: pre-wrap;
	word-break: break-word;
}

.sbc-mc-sso-success {
	background: #d1fae5;
	color: #065f46;
	padding: 12px 14px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
}

/* -------------------------------------------------------------
 * Welcome display (mounted INSIDE the theme's Member Login button
 * when signed in, absolutely positioned ABOVE it so it never
 * impinges on the menu row).
 * ---------------------------------------------------------- */
.sbc-mc-sso-welcome {
	position: absolute;
	bottom: calc(100% + 6px);
	right: 0;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #374151;
	white-space: nowrap;
	pointer-events: none;
	line-height: 1;
}
.sbc-mc-sso-welcome__label {
	color: #6b7280;
}
.sbc-mc-sso-welcome__name {
	color: #217e8f;
	font-weight: 600;
}
.sbc-mc-sso-graced-badge {
	display: inline-block;
	background: #fef3c7;
	color: #92400e;
	padding: 1px 8px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.03em;
}

/* -------------------------------------------------------------
 * Graced popup — HEADS UP notification for graced members.
 * ---------------------------------------------------------- */
.sbc-mc-sso-graced-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.sbc-mc-sso-graced-popup {
	background: #fff;
	border-radius: 20px;
	max-width: 520px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 48px 32px 40px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	position: relative;
}

@media (max-width: 600px) {
	.sbc-mc-sso-graced-popup {
		padding: 32px 20px 24px;
	}
	.sbc-mc-sso-graced-popup__heading { font-size: 18px; margin-bottom: 16px; }
	.sbc-mc-sso-graced-popup__body    { font-size: 16px; margin-bottom: 24px; }
	.sbc-mc-sso-graced-popup__actions { justify-content: stretch; flex-direction: column; }
	.sbc-mc-sso-graced-popup__btn     { width: 100%; text-align: center; box-sizing: border-box; }
}
.sbc-mc-sso-graced-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #6b7280;
	padding: 4px 8px;
}
.sbc-mc-sso-graced-popup__close:hover { color: #1a1a1a; }
.sbc-mc-sso-graced-popup__heading {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 22px;
	font-weight: 700;
	color: #92400e;
	margin: 0 0 24px 0;
}
.sbc-mc-sso-graced-popup__body {
	font-size: 18px;
	color: #1a1a1a;
	line-height: 1.55;
	margin: 0 0 36px 0;
}
.sbc-mc-sso-graced-popup__body strong { color: #92400e; }
.sbc-mc-sso-graced-popup__actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	flex-wrap: wrap;
}
.sbc-mc-sso-graced-popup__btn {
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	border: none;
}
.sbc-mc-sso-graced-popup__btn--secondary {
	background: transparent;
	color: #6b7280;
	border: 1px solid #d1d5db;
}
.sbc-mc-sso-graced-popup__btn--secondary:hover { background: #f3f4f6; color: #1a1a1a; }
.sbc-mc-sso-graced-popup__btn--primary {
	background: #217e8f;
	color: #fff;
}
.sbc-mc-sso-graced-popup__btn--primary:hover { background: #1a6674; }
