/*
 * Newsletter signup form + marketing widgets.
 *
 * Rendered by [weww_newsletter] shortcode and WWW_Newsletter::render().
 * Class-scoped so the same form looks right inline, in a sidebar, in
 * the tutorial flow and after a tool's "about" block.
 *
 * Also covers:
 *  - .weww-metrics-strip   — case-study hero-metrics shortcode
 *  - .weww-compare         — programmatic dev-cost comparison pages
 */

.weww-newsletter {
	background: #fff;
	border-radius: 5px;
	padding: 1.5rem 1.5rem 1.25rem;
	box-shadow: 6px 15px 30px 0 rgba(229, 234, 239, 0.5);
	margin: 1.5rem 0;
}

.weww-newsletter--compact {
	padding: 1rem 1.1rem;
}

.weww-newsletter-heading {
	font-size: 1.1rem;
	color: #1d2330;
}

.weww-newsletter-sub {
	color: #6b7280;
}

.weww-newsletter-row {
	align-items: stretch;
}

.weww-newsletter-input {
	flex: 1 1 240px;
	min-width: 0;
	padding: 0.55rem 0.85rem;
	border: 1px solid #e3e8ee;
	border-radius: 5px;
	font: inherit;
	background: #f9fafb;
	transition: border-color .15s ease;
}

.weww-newsletter-input:focus {
	border-color: #1d2330;
	outline: none;
	background: #fff;
}

.weww-newsletter-form button[type="submit"] {
	flex: 0 0 auto;
	white-space: nowrap;
}

.weww-newsletter-msg[data-state="ok"] {
	color: #137a3d;
}

.weww-newsletter-msg[data-state="err"] {
	color: #b3261e;
}

/* ------------------------------------------------------------------ */
/* Case-study hero metrics strip                                       */
/* ------------------------------------------------------------------ */

.weww-metrics-strip {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
}

.weww-metric {
	background: #fff;
	border-radius: 5px;
	padding: 1.5rem 1.25rem;
	box-shadow: 6px 15px 30px 0 rgba(229, 234, 239, 0.5);
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	transition: transform .15s ease;
}

.weww-metric:hover {
	transform: translateY(-2px);
}

.weww-metric-value {
	font-size: 2.25rem;
	font-weight: 600;
	line-height: 1.1;
	color: #1d2330;
	margin: 0 0 .35rem;
}

.weww-metric-label {
	font-size: 0.95rem;
	color: #4a5260;
	margin: 0 0 .5rem;
	line-height: 1.4;
}

.weww-metric-source {
	font-size: 0.8rem;
	color: #8a93a3;
	margin-top: auto;
}

/* ------------------------------------------------------------------ */
/* Programmatic dev-cost comparison                                    */
/* ------------------------------------------------------------------ */

.weww-compare-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin: 1.5rem 0;
}

@media (max-width: 640px) {
	.weww-compare-grid {
		grid-template-columns: 1fr;
	}
}

.weww-compare-region {
	background: #fff;
	border-radius: 5px;
	padding: 1.5rem;
	box-shadow: 6px 15px 30px 0 rgba(229, 234, 239, 0.5);
}

.weww-compare-region h3 {
	margin: 0 0 .25rem;
	font-size: 1.4rem;
}

.weww-compare-region .weww-compare-cost {
	font-size: 2rem;
	font-weight: 600;
	color: #1d2330;
}

.weww-compare-region .weww-compare-cost small {
	font-size: 0.7rem;
	color: #8a93a3;
	font-weight: 400;
	display: block;
}

.weww-compare-table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5rem 0;
}

.weww-compare-table th,
.weww-compare-table td {
	padding: .65rem .85rem;
	border-bottom: 1px solid #eef1f5;
	text-align: left;
}

.weww-compare-table th {
	font-weight: 600;
	color: #1d2330;
	background: #f9fafb;
}

.weww-compare-delta {
	font-weight: 600;
	color: #137a3d;
}

/* ------------------------------------------------------------------ */
/* Tutorial newsletter — language-themed accent                        */
/* ------------------------------------------------------------------ */

.tutorial-newsletter {
	margin-top: 2rem;
}
