/* =============================================================================
   MCG Deep Dive — Frontend Styles
   ============================================================================= */

/* -------------------------------------------------------------------------
   Gate: button + message area
   ------------------------------------------------------------------------- */

.mcg-dd-gate {
	margin: 2rem 0;
	text-align: center;
}

.mcg-dd-button {
	display: inline-block;
	padding: 0.75rem 2rem;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.mcg-dd-button:hover,
.mcg-dd-button:focus-visible {
	background: #333;
}

.mcg-dd-message {
	margin: 1.25rem auto 0;
	max-width: 560px;
	text-align: left;
}

.mcg-dd-launch-message {
	margin-bottom: 0.75rem;
}

.mcg-dd-subscriber-notice {
	padding: 1rem 1.5rem;
	border-left: 4px solid #1a1a1a;
	background: #f5f5f5;
	border-radius: 2px;
}

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

.mcg-dd-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;
}

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

body.mcg-dd-modal-open {
	overflow: hidden;
}

.mcg-dd-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 );
}

.mcg-dd-modal-body {
	padding: 2rem;
}

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

.mcg-dd-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;
}

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

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

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

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

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

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

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

.mcg-dd-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;
}

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

/* Password field with inline toggle */
.mcg-dd-pw-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.mcg-dd-pw-wrap input {
	padding-right: 4.5rem;
}

.mcg-dd-toggle-pw {
	position: absolute;
	right: 0.5rem;
	background: none;
	border: none;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #666;
	cursor: pointer;
	padding: 0.2rem 0.4rem;
	border-radius: 3px;
	transition: color 0.15s;
}

.mcg-dd-toggle-pw:hover {
	color: #111;
}

/* Form action row (submit + forgot link) */
.mcg-dd-form-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 0.25rem;
}

.mcg-dd-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;
}

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

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

.mcg-dd-forgot-pw {
	font-size: 0.875rem;
	color: #666;
}

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

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

.mcg-dd-error {
	color: #c0392b;
}

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

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

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

/* -------------------------------------------------------------------------
   Turnstile + GHL embed spacing
   ------------------------------------------------------------------------- */

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

.mcg-dd-ghl-embed {
	min-height: 200px;
}

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

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

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

	.mcg-dd-submit {
		text-align: center;
	}
}