/**
 * Inoforest Newsletter
 *
 * Contents
 * 1. Band (variables, overlap, watermark)
 * 2. Icon and text
 * 3. Form, button, plugin forms
 * 4. Styles (accent, primary, dark)
 * 5. Responsive
 *
 * Colours read the Design System (--inoforest-color-*) with fallbacks.
 */

/* 1. Band ------------------------------------------------------------------ */
.inoforest-newsletter {
	--ino-nl-bg: var(--inoforest-color-accent, #ff6a3d);
	--ino-nl-dark: var(--inoforest-color-heading, #0d1b2a);
	--ino-nl-button: var(--ino-nl-dark);
	--ino-nl-button-hover: var(--inoforest-color-primary, #0b7a75);
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: auto 1fr minmax(0, 520px);
	align-items: center;
	gap: 30px;
	padding: 46px 54px;
	overflow: hidden;
	color: rgba(255, 255, 255, 0.9);
	background: var(--ino-nl-bg);
	border-radius: 24px;
}

.inoforest-newsletter[data-overlap="true"] {
	margin-top: -95px;
}

.inoforest-newsletter::before {
	content: "";
	position: absolute;
	top: 50%;
	right: 30%;
	width: 190px;
	height: 190px;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' fill-opacity='.08' d='M1.95 9.32c-.52-.17-.53-.45.01-.63L21.04 2.3c.53-.17.83.12.68.65l-5.45 19.08c-.15.53-.47.55-.7.04L12 13.6l6-8-8 6-8.05-2.28z'/%3E%3C/svg%3E") no-repeat center / contain;
	transform: translateY(-50%) rotate(-15deg);
}

.inoforest-newsletter[data-watermark="false"]::before {
	display: none;
}

/* 2. Icon and text ------------------------------------------------------------ */
.inoforest-newsletter__icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 74px;
	height: 74px;
	font-size: 32px;
	color: var(--ino-nl-bg);
	background: #fff;
	border-radius: 50%;
}

.inoforest-newsletter__icon svg {
	width: 32px;
	height: 32px;
	fill: currentColor;
}

.inoforest-newsletter__text {
	position: relative;
}

.inoforest-newsletter .inoforest-newsletter__title {
	margin: 0 0 4px;
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	font-weight: 800;
	line-height: 1.2;
	color: #fff;
}

.inoforest-newsletter__text p {
	margin: 0;
}

/* 3. Form, button, plugin forms -------------------------------------------------- */
.inoforest-newsletter__form {
	position: relative;
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 8px;
	background: #fff;
	border-radius: 999px;
}

.inoforest-newsletter__form:focus-within {
	outline: 2px solid var(--ino-nl-dark);
	outline-offset: 2px;
}

.inoforest-newsletter .inoforest-newsletter__form input[type="email"] {
	flex: 1;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 0 20px;
	font: inherit;
	color: var(--ino-nl-dark);
	background: none;
	border: 0;
	border-radius: 0;
	outline: 0;
	box-shadow: none;
}

.inoforest-newsletter .inoforest-newsletter__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	margin: 0;
	padding: 14px 30px;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	white-space: nowrap;
	cursor: pointer;
	background: var(--ino-nl-button);
	border: 2px solid var(--ino-nl-button);
	border-radius: 999px;
	transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.inoforest-newsletter .inoforest-newsletter__button:hover:not(:disabled),
.inoforest-newsletter .inoforest-newsletter__button:focus-visible {
	color: #fff;
	background: var(--ino-nl-button-hover);
	border-color: var(--ino-nl-button-hover);
	transform: translateY(-2px);
}

.inoforest-newsletter .inoforest-newsletter__button:disabled {
	cursor: not-allowed;
}

.inoforest-newsletter__button svg {
	width: 1.05em;
	height: 1.05em;
	fill: currentColor;
}

.inoforest-newsletter__plugin {
	position: relative;
}

.inoforest-newsletter__plugin input[type="email"],
.inoforest-newsletter__plugin input[type="text"] {
	min-height: 52px;
	padding: 0 20px;
	color: var(--ino-nl-dark);
	background: #fff;
	border: 0;
	border-radius: 999px;
}

.inoforest-newsletter__plugin input[type="submit"],
.inoforest-newsletter__plugin button {
	min-height: 52px;
	padding: 14px 30px;
	font-weight: 700;
	color: #fff;
	background: var(--ino-nl-button);
	border: 0;
	border-radius: 999px;
}

.inoforest-newsletter__hint {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 0.85rem;
	color: #fff;
}

.inoforest-newsletter .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* 4. Styles --------------------------------------------------------------------- */
.inoforest-newsletter[data-style="primary"] {
	--ino-nl-bg: var(--inoforest-color-primary, #0b7a75);
	--ino-nl-button-hover: var(--inoforest-color-accent, #ff6a3d);
}

.inoforest-newsletter[data-style="dark"] {
	--ino-nl-bg: #13283b;
	--ino-nl-button: var(--inoforest-color-accent, #ff6a3d);
	--ino-nl-button-hover: color-mix(in srgb, var(--inoforest-color-accent, #ff6a3d) 85%, #000);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.inoforest-newsletter[data-style="dark"] .inoforest-newsletter__icon {
	color: var(--ino-nl-dark);
}

/* 5. Responsive ------------------------------------------------------------------- */
@media (max-width: 1199px) {
	.inoforest-newsletter {
		grid-template-columns: auto 1fr;
	}

	.inoforest-newsletter__form,
	.inoforest-newsletter__plugin {
		grid-column: 1 / -1;
	}
}

@media (max-width: 767px) {
	.inoforest-newsletter {
		grid-template-columns: 1fr;
		padding: 36px 24px;
		text-align: center;
	}

	.inoforest-newsletter__icon {
		margin-inline: auto;
	}

	.inoforest-newsletter__form {
		flex-direction: column;
		border-radius: 16px;
	}

	.inoforest-newsletter .inoforest-newsletter__form input[type="email"] {
		min-height: 50px;
	}
}
