/* Droam Wire — newsletter signup forms.
 * One rule set covers every placement; .dw-newsletter--<context> gives per-slot overrides.
 */

.dw-newsletter {
	display: block;
	margin: 32px 0;
	padding: 24px;
	border: 1px solid #e3e6ea;
	border-radius: 12px;
	background: linear-gradient(180deg, #f7faff 0%, #ffffff 70%);
	font-family: inherit;
	box-sizing: border-box;
}

.dw-newsletter * {
	box-sizing: border-box;
}

.dw-newsletter-head {
	margin-bottom: 16px;
}

.dw-newsletter-eyebrow {
	margin: 0 0 4px;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #3b6fd4;
	font-weight: 700;
}

.dw-newsletter-title {
	margin: 0 0 6px;
	font-size: 20px;
	line-height: 1.25;
	font-weight: 700;
	color: #11161e;
}

.dw-newsletter-sub {
	margin: 0;
	color: #4a5160;
	font-size: 14px;
	line-height: 1.5;
}

.dw-newsletter-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 16px 0;
}

.dw-newsletter-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.dw-newsletter-field--email {
	grid-column: 1 / -1;
}

.dw-newsletter-label {
	font-size: 12px;
	color: #4a5160;
	font-weight: 600;
}

.dw-newsletter-req {
	color: #c2410c;
}

.dw-newsletter-field input[type="email"],
.dw-newsletter-field input[type="text"],
.dw-newsletter-field select {
	display: block;
	width: 100%;
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid #cfd4dc;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	color: #11161e;
}

.dw-newsletter-field input:focus,
.dw-newsletter-field select:focus {
	outline: 2px solid #3b6fd4;
	outline-offset: 1px;
	border-color: #3b6fd4;
}

.dw-newsletter-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	line-height: 1.4;
	color: #4a5160;
	margin: 8px 0 16px;
}

.dw-newsletter-consent input[type="checkbox"] {
	margin-top: 3px;
}

.dw-newsletter-consent a {
	color: #3b6fd4;
	text-decoration: underline;
}

.dw-newsletter-hp {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.dw-newsletter-footer {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.dw-newsletter-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 18px;
	border: 0;
	border-radius: 8px;
	background: #11161e;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease;
}

.dw-newsletter-btn:hover,
.dw-newsletter-btn:focus {
	background: #3b6fd4;
}

.dw-newsletter-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.dw-newsletter-note {
	margin: 0;
	font-size: 13px;
	color: #4a5160;
	min-height: 1em;
}

.dw-newsletter-note.is-ok    { color: #0d9488; font-weight: 600; }
.dw-newsletter-note.is-error { color: #c2410c; font-weight: 600; }

/* Placement overrides */
.dw-newsletter--sidebar {
	margin: 24px 0 0;
	padding: 20px;
}

.dw-newsletter--sidebar .dw-newsletter-grid {
	grid-template-columns: 1fr;
}

.dw-newsletter--article_end {
	margin-top: 40px;
}

.dw-newsletter--home {
	margin: 48px auto;
	max-width: 820px;
}

.dw-newsletter--header {
	margin: 0;
	padding: 20px;
	width: 100%; /* fills the dialog, so the close button sits on the card */
	min-width: 0;
	max-width: none;
}

/* Header "Subscribe" button + dialog */
.dw-newsletter-open {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 14px;
	border: 1px solid #11161e;
	border-radius: 999px;
	background: transparent;
	color: #11161e;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.dw-newsletter-open:hover,
.dw-newsletter-open:focus {
	background: #11161e;
	color: #fff;
}

.dw-newsletter-dialog {
	max-width: 520px;
	width: calc(100vw - 32px);
	max-height: calc(100dvh - 32px);
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: transparent;
	/* The dialog sits inside the header nav, which sets nowrap / uppercase /
	   letter-spacing / bold on its text: reset everything the form inherits. */
	white-space: normal;
	text-transform: none;
	letter-spacing: normal;
	font-size: 15px;
	font-weight: 400;
	text-align: left;
	overflow-x: hidden;
	overflow-y: auto;
}

.dw-newsletter-dialog .dw-newsletter {
	margin: 0;
}

.dw-newsletter-dialog .dw-newsletter-head {
	padding-right: 32px; /* room for the close button */
}

.dw-newsletter-consent > span,
.dw-newsletter-consent label {
	min-width: 0;
}

.dw-newsletter-dialog::backdrop {
	background: rgba(17, 22, 30, 0.4);
}

.dw-newsletter-close {
	position: absolute;
	z-index: 1;
	top: 14px;
	right: 16px;
	padding: 4px;
	border: 0;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #4a5160;
}

@media (max-width: 640px) {
	.dw-newsletter {
		padding: 20px;
	}
	.dw-newsletter-grid {
		grid-template-columns: 1fr;
	}
	.dw-newsletter-title {
		font-size: 18px;
	}
}
