/**
 * BCM Client Portal popup.
 * Inherits the Kadence font stack and palette so the dialog reads as part of
 * the site rather than a bolted-on widget.
 */

.bcm-cp-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 23, 42, 0.55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	animation: bcm-cp-fade 0.18s ease-out;
}

.bcm-cp-overlay[hidden] {
	display: none;
}

body.bcm-cp-open {
	overflow: hidden;
}

.bcm-cp-dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 34px 32px 30px;
	border-radius: 12px;
	background: var(--global-palette9, #fff);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	font-family: var(--global-body-font-family, Roboto, system-ui, sans-serif);
	color: var(--global-palette4, #3b3b3b);
	animation: bcm-cp-rise 0.2s ease-out;
}

.bcm-cp-close {
	position: absolute;
	top: 10px;
	inset-inline-end: 12px;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--global-palette6, #626262);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.bcm-cp-close:hover,
.bcm-cp-close:focus-visible {
	background: var(--global-palette8, #f7f7f7);
	color: var(--global-palette3, #222);
}

.bcm-cp-title {
	margin: 0 0 8px;
	font-family: var(--global-heading-font-family, Jost, sans-serif);
	font-size: 1.55rem;
	line-height: 1.25;
	color: var(--global-palette3, #222);
}

.bcm-cp-intro {
	margin: 0 0 22px;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--global-palette5, #515151);
}

.bcm-cp-row {
	display: flex;
	gap: 12px;
}

.bcm-cp-row .bcm-cp-field {
	flex: 1 1 0;
	min-width: 0;
}

.bcm-cp-field {
	margin-bottom: 16px;
}

.bcm-cp-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--global-palette4, #3b3b3b);
}

.bcm-cp-field input {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 13px;
	border: 1px solid var(--global-palette7, #e1e1e1);
	border-radius: 7px;
	background: #fff;
	font-family: inherit;
	font-size: 1rem;
	color: var(--global-palette3, #222);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bcm-cp-field input:focus {
	outline: none;
	border-color: var(--bcm-cp-accent, #2b6cb0);
	box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.16);
}

/* Honeypot: reachable by bots parsing the DOM, invisible to people. */
.bcm-cp-hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.bcm-cp-message {
	margin: 0 0 14px;
	padding: 10px 12px;
	border-radius: 7px;
	background: #fdf1f1;
	color: #a12a2a;
	font-size: 0.9rem;
	line-height: 1.45;
}

.bcm-cp-message[hidden] {
	display: none;
}

.bcm-cp-submit {
	display: block;
	width: 100%;
	padding: 12px 18px;
	border: 0;
	border-radius: 7px;
	background: var(--bcm-cp-accent, #2b6cb0);
	color: #fff;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.15s ease, opacity 0.15s ease;
}

.bcm-cp-submit:hover:not(:disabled) {
	filter: brightness(0.92);
	color: #fff;
}

.bcm-cp-submit:disabled {
	opacity: 0.65;
	cursor: default;
}

.bcm-cp-submit-link {
	box-sizing: border-box;
}

.bcm-cp-alt {
	margin: 16px 0 0;
	text-align: center;
	font-size: 0.88rem;
	color: var(--global-palette6, #626262);
}

.bcm-cp-alt a {
	color: var(--bcm-cp-accent, #2b6cb0);
	font-weight: 600;
}

.bcm-cp-success {
	text-align: center;
	padding: 6px 0 4px;
}

.bcm-cp-success[hidden] {
	display: none;
}

.bcm-cp-check {
	width: 54px;
	height: 54px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: rgba(43, 108, 176, 0.1);
	color: var(--bcm-cp-accent, #2b6cb0);
	font-size: 28px;
	line-height: 54px;
}

.bcm-cp-success h3 {
	margin: 0 0 8px;
	font-family: var(--global-heading-font-family, Jost, sans-serif);
	font-size: 1.25rem;
	color: var(--global-palette3, #222);
}

.bcm-cp-success-text {
	margin: 0 0 20px;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--global-palette5, #515151);
}

/* A shortcode button that borrows the theme's button look. */
button.bcm-cp-button {
	display: inline-block;
	padding: 12px 24px;
	border: 0;
	border-radius: 6px;
	background: var(--bcm-cp-accent, #2b6cb0);
	color: #fff;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}

@keyframes bcm-cp-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes bcm-cp-rise {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.bcm-cp-overlay,
	.bcm-cp-dialog {
		animation: none;
	}
}

@media (max-width: 480px) {
	.bcm-cp-dialog {
		padding: 28px 20px 24px;
	}

	.bcm-cp-row {
		display: block;
	}
}
