/* =============================================================================
   Subscribers To Compliance Advisor — Frontend Styles
   The popup keeps the look of the blog's earlier sign-in popup: same rules,
   new class names.
   ============================================================================= */

/* -------------------------------------------------------------------------
   Modal overlay + dialog
   ------------------------------------------------------------------------- */

.stca-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.6 );
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

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

body.stca-modal-open {
	overflow: hidden;
}

.stca-modal {
	position: relative;
	background: #fff;
	border-radius: 8px;
	width: 100%;
	max-width: 460px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 8px 40px rgba( 0, 0, 0, 0.25 );
}

.stca-modal-body {
	padding: 2rem;
}

/* -------------------------------------------------------------------------
   Popup content
   ------------------------------------------------------------------------- */

.stca-popup-dismiss {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #888;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	transition: color 0.15s, background 0.15s;
}

.stca-popup-dismiss:hover {
	color: #111;
	background: #f0f0f0;
}

.stca-popup-heading {
	margin: 0 0 1.5rem;
	font-size: 1.5rem;
	font-weight: 700;
}

.stca-screen[hidden] {
	display: none;
}

.stca-screen-intro {
	margin: 0 0 0.5rem;
	font-size: 0.95rem;
	line-height: 1.5;
	color: #333;
}

/* -------------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------------- */

.stca-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.stca-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.stca-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

.stca-field label {
	font-size: 0.875rem;
	font-weight: 600;
}

.stca-field input {
	padding: 0.6rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1rem;
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.stca-field input:focus {
	outline: none;
	border-color: #1a1a1a;
	box-shadow: 0 0 0 2px rgba( 26, 26, 26, 0.12 );
}

/* Form action row */
.stca-form-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 0.25rem;
}

.stca-submit {
	padding: 0.65rem 1.75rem;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, opacity 0.2s;
}

.stca-submit:hover:not( :disabled ) {
	background: #333;
}

.stca-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* -------------------------------------------------------------------------
   Error + success states
   ------------------------------------------------------------------------- */

.stca-form-error {
	padding: 0.65rem 0.9rem;
	background: #fff0f0;
	border: 1px solid #f5c0c0;
	border-radius: 4px;
	color: #c0392b;
	font-size: 0.875rem;
}

.stca-error {
	color: #c0392b;
}

.stca-success {
	text-align: center;
	padding: 1rem 0;
}

.stca-success p {
	font-size: 1.1rem;
	margin-bottom: 1.5rem;
}

.stca-success .stca-submit {
	background: #0D2A75;
}

.stca-success .stca-submit:hover:not( :disabled ) {
	background: #0a2260;
}

.stca-loading {
	text-align: center;
	padding: 2rem;
	color: #888;
}

/* -------------------------------------------------------------------------
   Turnstile spacing
   ------------------------------------------------------------------------- */

.cf-turnstile,
.cf-turnstile + br.cf-turnstile-br {
	margin-top: 0.25rem;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media ( max-width: 480px ) {
	.stca-field-row {
		grid-template-columns: 1fr;
	}

	.stca-form-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.stca-submit {
		text-align: center;
	}
}
