/* ==========================================================================
   Email Sequence Reader — [tww_email_sequence]

   A paged, email-client-style reader for a Kit drip sequence. One "opened
   email" card shows at a time; email-sequence.js handles paging. Every
   selector is scoped under .tww-email-seq so it never bleeds into blog posts
   or other pages (mirrors the .tww-page scoping in pages.css). Self-contained:
   it redeclares the button + video-frame styles it needs rather than relying
   on .tww-page being present.
   ========================================================================== */

.tww-email-seq {
	--tww-text: 860px;
	--tww-ink: #111827;
	--tww-muted: #4b5563;
	--tww-accent: #2563eb;

	max-width: var(--tww-text);
	margin: 0 auto;
	padding: 0 24px 56px;
	font-family: area-normal, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--tww-ink);
}

/* --------------------------------------------------------------------------
   Email card
   -------------------------------------------------------------------------- */
.tww-email-seq__email {
	background: #ffffff;
	border: 1px solid #eef2f7;
	border-radius: 16px;
	padding: 36px 40px 40px;
	box-shadow:
		0 4px 12px rgba(15, 23, 42, 0.08),
		0 24px 60px rgba(15, 23, 42, 0.12);
}

.tww-email-seq__email[hidden] {
	display: none;
}

/* Header row: avatar + sender meta + Day badge */
.tww-email-seq__head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-bottom: 20px;
	margin-bottom: 24px;
	border-bottom: 1px solid #eef2f7;
}

.tww-email-seq__avatar {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 9999px;
	background: var(--tww-accent);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 800;
	line-height: 1;
}

.tww-email-seq__meta {
	display: flex;
	flex: 1 1 auto;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px 12px;
}

.tww-email-seq__from {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--tww-ink);
}

.tww-email-seq__addr {
	font-weight: 400;
	color: var(--tww-muted);
}

.tww-email-seq__badge {
	margin-left: auto;
	flex: 0 0 auto;
	display: inline-block;
	padding: 4px 12px;
	border-radius: 9999px;
	background: #eff4ff;
	color: var(--tww-accent);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

/* Subject + preview */
.tww-email-seq__subject {
	margin: 0 0 6px;
	font-size: 28px;
	line-height: 1.25;
	font-weight: 800;
	color: var(--tww-ink);
}

.tww-email-seq__preview {
	margin: 0 0 8px;
	font-size: 15px;
	color: var(--tww-muted);
}

/* Body */
.tww-email-seq__body {
	font-size: 17px;
	line-height: 1.65;
	color: var(--tww-ink);
}

.tww-email-seq__body p {
	margin: 0 0 18px;
}

.tww-email-seq__body ul {
	margin: 0 0 18px;
	padding-left: 22px;
}

.tww-email-seq__body li {
	margin: 0 0 8px;
}

.tww-email-seq__body a {
	color: var(--tww-accent);
	text-decoration: underline;
}

.tww-email-seq__body a:hover,
.tww-email-seq__body a:focus {
	text-decoration: none;
}

/* Video — same responsive 16:9 frame as the theme hero video */
.tww-email-seq__body .tww-hero__video {
	margin: 28px 0;
}

.tww-email-seq__body .tww-hero__video-frame {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 16px;
	overflow: hidden;
	box-shadow:
		0 4px 12px rgba(15, 23, 42, 0.08),
		0 24px 60px rgba(15, 23, 42, 0.12);
}

.tww-email-seq__body .tww-hero__video-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* --------------------------------------------------------------------------
   Intro screen — the first page, with no sender chrome or Day badge. Reuses
   the .tww-email-seq__email card and .tww-email-seq__body type; adds a title.
   The pager handles paging forward (its Next button reads "Continue" here).
   -------------------------------------------------------------------------- */
.tww-email-seq__intro-title {
	margin: 0 0 18px;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 800;
	color: var(--tww-ink);
}

/* --------------------------------------------------------------------------
   Pager
   -------------------------------------------------------------------------- */
.tww-email-seq__pager {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 28px;
}

.tww-email-seq__counter {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--tww-muted);
	text-align: center;
}

/* Pager buttons (redeclared so the reader works outside .tww-page scope) */
.tww-email-seq .tww-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 9999px;
	padding: 11px 30px 13px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.tww-email-seq .tww-btn--primary {
	background-color: var(--tww-accent);
	color: #ffffff;
}

.tww-email-seq .tww-btn--primary:not(:disabled):hover,
.tww-email-seq .tww-btn--primary:not(:disabled):focus {
	background-color: #1d4ed8;
	transform: translateY(-1px);
}

.tww-email-seq .tww-btn--ghost {
	background-color: #eef2ff;
	color: #1a1a1a;
}

.tww-email-seq .tww-btn--ghost:not(:disabled):hover,
.tww-email-seq .tww-btn--ghost:not(:disabled):focus {
	background-color: #e0e7ff;
	transform: translateY(-1px);
}

.tww-email-seq .tww-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

/* Step dots */
.tww-email-seq__dots {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 22px;
}

.tww-email-seq__dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border-radius: 9999px;
	border: 2px solid #cbd5e1;
	background: transparent;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.tww-email-seq__dot:hover,
.tww-email-seq__dot:focus {
	border-color: var(--tww-accent);
	transform: scale(1.15);
}

.tww-email-seq__dot.is-active {
	background: var(--tww-accent);
	border-color: var(--tww-accent);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.tww-email-seq {
		padding: 0 16px 40px;
	}

	.tww-email-seq__email {
		padding: 24px 22px 28px;
		border-radius: 14px;
	}

	.tww-email-seq__subject,
	.tww-email-seq__intro-title {
		font-size: 23px;
	}

	.tww-email-seq__body {
		font-size: 16px;
	}

	.tww-email-seq__badge {
		margin-left: 0;
	}

	.tww-email-seq__pager {
		flex-wrap: wrap;
	}

	.tww-email-seq__counter {
		order: -1;
		flex: 1 0 100%;
		margin-bottom: 4px;
	}

	.tww-email-seq .tww-btn {
		flex: 1 1 auto;
	}
}
