/**
 * Post Newsletter Block Styles
 * Styles for the Post Newsletter custom block
 *
 * @package made-to-thrive-2026-base
 * @since 1.0.0
 */

/* Main Container */
.post-newsletter-block {
	width: 100%;
	margin: 50px auto;
	border-radius: 25px;
	padding: 4px 24px;
}

.post-newsletter-container {
	display: flex;
	gap: 0;
	align-items: stretch;
	min-height: 300px;
}

/* Left Section: Small Title, Title, and Description */
.post-newsletter-left {
	flex: 0 0 40%;
	min-width: 0;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	/* Background color inherited from WP core block settings */
}

.post-newsletter-content {
	text-align: center;
	max-width: 90%;
	width: 100%;
}

/* Small Title */
.post-newsletter-small-title {
	margin: 0 0 0px;
	color: var(--LEMON-LIGHT, #FEFAC8);
	text-align: center;
	font-family: "Google Sans Flex";
	font-size: 15px;
	font-style: normal;
	font-weight: 800;
	line-height: 140%; /* 21px */
	letter-spacing: 3px;
	text-transform: uppercase;
}

/* Title */
.post-newsletter-title {
	margin: 5px 0;
	/* Text color inherited from WP core block settings */
	color: var(--LEMON-LIGHT, #FEFAC8)!important;
	text-align: center;

/* H2 */
	font-family: "Google Sans Flex";
	font-size: 32px;
	font-style: normal;
	font-weight: 800;
	line-height: 105%; /* 33.6px */
	text-transform: uppercase;
}

/* Description */
.post-newsletter-description {
	margin: 0;
	/* Text color inherited from WP core block settings */
	color: var(--LEMON-LIGHT, #FEFAC8);
	text-align: center;

/* Body */
	font-family: "Google Sans Flex";
	font-size: 17px!important;
	font-style: normal;
	font-weight: 500;
	line-height: 140%; /* 23.8px */
}

/* Right Section: Subscription Form */
.post-newsletter-right {
	flex: 0 0 60%;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	/* Background color inherited from WP core block settings */
}

.post-newsletter-form-container {
	width: 100%;
	max-width: 500px;
	background-color: #F3ECE6;
	border-radius: 15px;
	padding: 2rem;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Form Styles */
.post-newsletter-form {
	width: 100%;
}

.post-newsletter-form-substack {
	width: 100%;
}

.post-newsletter-substack-wrapper {
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	max-width: 380px;
}

.post-newsletter-substack-wrapper iframe {
	width: 100%;
	max-width: 380px;
	height: 150px;
	border: 0;
	background: #F3ECE6 !important;
	display: block;
	margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 1200px) {
	.post-newsletter-left,
	.post-newsletter-right {
		padding: 2.5rem;
	}
	
	.post-newsletter-form-container {
		padding: 1.5rem;
	}
	
	.post-newsletter-title {
		font-size: 42px;
	}
	
	.post-newsletter-description {
		font-size: 17px;
	}
}

@media (max-width: 768px) {
.post-newsletter-container {
		display:block;
		padding:30px 0;
	}
	.post-newsletter-left, .post-newsletter-right {
		padding:0;
	}
	.post-newsletter-right {
		margin-top:30px;
	}
}

@media (max-width: 500px) {
	
}

/* Accessibility: Focus States */
.post-newsletter-form-container:focus-within {
	outline: 3px solid var(--wp--preset--color--cornflower, #5B66C6);
	outline-offset: 3px;
}

.post-newsletter-substack-wrapper iframe:focus {
	outline: 3px solid var(--wp--preset--color--cornflower, #5B66C6);
	outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.post-newsletter-small-title,
	.post-newsletter-title,
	.post-newsletter-description {
		text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
	}
	
	.post-newsletter-form-container {
		border: 2px solid currentColor;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.post-newsletter-container,
	.post-newsletter-content,
	.post-newsletter-form-container {
		transition: none;
		animation: none !important;
	}
}

/* Screen Reader Text */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal !important;
}

/* Editor Styles - Ensure proper display in block editor */
.block-editor-block-preview__container .post-newsletter-container,
.editor-styles-wrapper .post-newsletter-container,
.wp-block .post-newsletter-container,
.block-editor-block-list__block .post-newsletter-container,
.acf-block-preview .post-newsletter-container {
	display: flex !important;
	gap: 0 !important;
	align-items: stretch !important;
	min-height: 500px !important;
	max-width: 100% !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

.block-editor-block-preview__container .post-newsletter-left,
.editor-styles-wrapper .post-newsletter-left,
.wp-block .post-newsletter-left,
.block-editor-block-list__block .post-newsletter-left,
.acf-block-preview .post-newsletter-left {
	flex: 0 0 66.666% !important;
	min-width: 0 !important;
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 3rem !important;
}

.block-editor-block-preview__container .post-newsletter-right,
.editor-styles-wrapper .post-newsletter-right,
.wp-block .post-newsletter-right,
.block-editor-block-list__block .post-newsletter-right,
.acf-block-preview .post-newsletter-right {
	flex: 0 0 33.333% !important;
	min-width: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 3rem !important;
}

.block-editor-block-preview__container .post-newsletter-form-container,
.editor-styles-wrapper .post-newsletter-form-container,
.wp-block .post-newsletter-form-container,
.block-editor-block-list__block .post-newsletter-form-container,
.acf-block-preview .post-newsletter-form-container {
	max-width: 500px !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

/* Ensure block wrapper doesn't overflow in editor */
.block-editor-block-preview__container .post-newsletter-block,
.editor-styles-wrapper .post-newsletter-block,
.wp-block[data-type="cwp/post-newsletter"],
.acf-block-preview .post-newsletter-block {
	max-width: 100% !important;
	width: 100% !important;
	box-sizing: border-box !important;
	overflow: hidden !important;
}

