/* Epic Articles — [epic_articles_search] on-site search widget (Warm Studio design) */

.ea-search-widget {
	--ea-sw-cols: 3;
	max-width: 760px;
	margin: 0 auto;
	font-family: 'Spectral', Georgia, serif;
	box-sizing: border-box;
}
/* Full-width mode: fill the container it's dropped into instead of a
   narrow centered column. The search bar and the card grid both stretch. */
.ea-search-widget.ea-sw-full {
	max-width: 100%;
}
.ea-search-widget * {
	box-sizing: border-box;
}

/* ---- Search bar ---- */

.ea-sw-input-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 10px 14px 20px;
	background: #fffaf1;
	border: 1.5px solid #e6d6bd;
	border-radius: 999px;
	margin-bottom: 18px;
	position: relative;
	z-index: 2;
}
.ea-sw-input-row:focus-within {
	border-color: #c26a43;
	box-shadow: 0 0 0 3px rgba(194, 106, 67, .13);
}
.ea-sw-input-icon {
	color: #c26a43;
	font-size: 17px;
	flex: 0 0 auto;
	line-height: 1;
}
.ea-sw-input {
	flex: 1;
	border: 0;
	background: transparent;
	font: 400 16px/1.2 'Spectral', Georgia, serif;
	color: #33291f;
	padding: 4px 0;
	min-width: 0;
}
.ea-sw-input:focus {
	outline: none;
	box-shadow: none;
}
.ea-sw-input::placeholder {
	color: #b3a693;
}
.ea-sw-clear {
	border: 0;
	background: transparent;
	color: #b3a693;
	font-size: 15px;
	cursor: pointer;
	padding: 4px 6px;
	flex: 0 0 auto;
	line-height: 1;
}
.ea-sw-clear:hover {
	color: #7a6b5a;
}
/* .ea-sw-clear, .ea-sw-btn, and every other rule below prefixed with
   ".ea-search-widget:not(.ea-sw-match-theme)" exist because these are all
   native <button> elements, and a host theme's own blanket button rule
   (its global accent color, applied to literally any <button> on the
   site) ties with a plain single-class selector in CSS specificity and
   often wins the cascade -- painting these controls the theme's color
   instead of the one chosen in Search styling settings. The ID-free
   ".ea-search-widget" ancestor plus !important is enough to win that tie
   reliably. Wrapped in :not(.ea-sw-match-theme) so "Match my theme" mode
   can skip all of it and let the theme's real button styling show. */
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-clear {
	background: transparent !important;
	color: #b3a693 !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-clear:hover {
	color: #7a6b5a !important;
}
.ea-sw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--ea-sw-accent, #c26a43);
	color: var(--ea-sw-on-accent, #fff6ec);
	border: 0;
	font-size: 16px;
	cursor: pointer;
	flex: 0 0 auto;
}
.ea-sw-btn:hover {
	background: var(--ea-sw-accent-hover, #b25a34);
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-btn {
	background: var(--ea-sw-accent, #c26a43) !important;
	color: var(--ea-sw-on-accent, #fff6ec) !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-btn:hover {
	background: var(--ea-sw-accent-hover, #b25a34) !important;
}

/* ---- Typing suggestions (attached dropdown) ---- */

.ea-sw-suggestions {
	position: relative;
	z-index: 1;
	margin-top: -28px;
	border: 1px solid #ece0cd;
	border-radius: 0 0 16px 16px;
	overflow: hidden;
	background: #fff;
	margin-bottom: 18px;
	box-shadow: 0 18px 30px -22px rgba(51, 41, 31, .3);
}
.ea-sw-suggestion {
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	text-align: left;
	padding: 13px 20px;
	border: 0;
	border-top: 1px solid #f1e9d8;
	background: var(--ea-sw-card-bg, #fff);
	font: 400 14.5px/1.3 'Spectral', Georgia, serif;
	color: #5a4c3c;
	cursor: pointer;
}
.ea-sw-suggestion:first-child {
	border-top: 0;
	background: var(--ea-sw-accent-tint, #f5e9d3);
	color: #33291f;
}
.ea-sw-suggestion-icon {
	color: #b3a693;
	font-size: 13px;
}
.ea-sw-suggestion:first-child .ea-sw-suggestion-icon {
	color: var(--ea-sw-accent, #c26a43);
}
.ea-sw-suggestion:hover {
	background: #faf3e5;
}
/* Every suggestion row is a native button (see the .ea-sw-clear/.ea-sw-btn
   note above) -- a host theme's blanket rule can flatten ALL rows,
   including the featured first one, to its own single accent color. */
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-suggestion {
	background: var(--ea-sw-card-bg, #fff) !important;
	color: #5a4c3c !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-suggestion:first-child {
	background: var(--ea-sw-accent-tint, #f5e9d3) !important;
	color: #33291f !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-suggestion:hover {
	background: #faf3e5 !important;
}

/* ---- Chips (no-results related suggestions) ---- */

.ea-sw-chips {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.ea-sw-chip {
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--ea-sw-accent-tint, #f5e9d3);
	color: var(--ea-sw-accent-ink, #a5772c);
	font: 500 12.5px/1 'Figtree', sans-serif;
	border: 0;
	cursor: pointer;
}
.ea-sw-chip:hover {
	background: #f0dcb8;
}
.ea-sw-chip:nth-child(3n+2) {
	background: #f0ead6;
	color: #5f6d47;
}
.ea-sw-chip:nth-child(3n+2):hover {
	background: #e3ddc4;
}
.ea-sw-chip:nth-child(3n+3) {
	background: #f3ddc0;
	color: #b25a34;
}
.ea-sw-chip:nth-child(3n+3):hover {
	background: #ecc9a1;
}
/* Chips are native buttons too. The base chip follows the chosen accent
   color; the 2nd/3rd-in-3 variants stay a fixed decorative olive/rust
   palette (deliberately not accent-driven -- it's a 3-color rotation, not
   "the brand color"), but all three still need forcing back against a
   host theme's blanket button rule. */
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-chip {
	background: var(--ea-sw-accent-tint, #f5e9d3) !important;
	color: var(--ea-sw-accent-ink, #a5772c) !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-chip:hover {
	background: #f0dcb8 !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-chip:nth-child(3n+2) {
	background: #f0ead6 !important;
	color: #5f6d47 !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-chip:nth-child(3n+2):hover {
	background: #e3ddc4 !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-chip:nth-child(3n+3) {
	background: #f3ddc0 !important;
	color: #b25a34 !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-chip:nth-child(3n+3):hover {
	background: #ecc9a1 !important;
}

/* ---- Results head ---- */

.ea-sw-results-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 16px;
}
.ea-sw-count {
	font: 600 14px/1 'Figtree', sans-serif;
	color: #5a4c3c;
}
.ea-sw-sorted {
	font: 500 11px/1 'Figtree', sans-serif;
	color: #b3a693;
}

/* ---- Section head (Recent / More teachings) ---- */

.ea-sw-recent {
	margin-top: 30px;
}
.ea-sw-recent-head {
	margin-bottom: 16px;
}
.ea-sw-recent-label {
	font: 500 11px/1 'Figtree', sans-serif;
	color: #b3a693;
	letter-spacing: .05em;
	text-transform: uppercase;
}

/* ---- Card grid (full-width, responsive) ---- */

.ea-sw-grid {
	display: grid;
	grid-template-columns: repeat(var(--ea-sw-cols), minmax(0, 1fr));
	gap: 20px;
}
.ea-sw-results-grid {
	margin-bottom: 6px;
}
.ea-sw-gc {
	display: flex;
	flex-direction: column;
	border: 1px solid #f1e9d8;
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	background: #fffaf1;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ea-sw-gc:hover {
	border-color: #e6d6bd;
	box-shadow: 0 20px 34px -26px rgba(51, 41, 31, .4);
	transform: translateY(-2px);
}
.ea-sw-gc-thumb {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, #e8b98a, #c26a43) center/cover no-repeat;
}
.ea-sw-gc-thumb-blank {
	background: linear-gradient(135deg, #e3d5bc, #c9bda8);
}
.ea-sw-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 22px;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.ea-sw-gc-tag {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 11px;
	border-radius: 999px;
	background: #f3ddc0;
	color: #b25a34;
	font: 600 10.5px/1 'Figtree', sans-serif;
	box-shadow: 0 2px 6px rgba(51, 41, 31, .18);
}
.ea-sw-gc-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 15px 16px 17px;
	flex: 1;
}
.ea-sw-gc-title {
	font: 600 16px/1.35 'Spectral', Georgia, serif;
	color: #2a2419;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ea-sw-gc-excerpt {
	font: 400 13px/1.5 'Spectral', Georgia, serif;
	font-style: italic;
	color: #9a8b78;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
/* "Jump to this moment" pill -- a separate clickable element layered on
 * top of the card's own link (see search.js's delegated click handler),
 * not a nested <a>, since nesting an anchor inside the card's own link
 * isn't valid HTML. */
.ea-sw-gc-jump {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	align-self: flex-start;
	margin-top: 4px;
	padding: 3px 10px;
	border-radius: 999px;
	background: #fbeee0;
	color: #b25a34;
	font: 600 11px/1.4 'Figtree', sans-serif;
	cursor: pointer;
}
.ea-sw-gc-jump:hover,
.ea-sw-gc-jump:focus-visible {
	background: #f3ddc0;
	outline: none;
}
.ea-sw-gc-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 2px;
}
.ea-sw-gc-speaker,
.ea-sw-gc-time {
	font: 500 11px/1 'Figtree', sans-serif;
	color: #9a8b78;
}
.ea-sw-gc-speaker::after {
	content: '·';
	margin-left: 10px;
	color: #cabfad;
}
.ea-sw-gc-more {
	margin-top: auto;
	font: 600 12.5px/1 'Figtree', sans-serif;
	color: #c26a43;
	padding-top: 4px;
}

/* ---- Pagination ---- */

.ea-sw-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 24px;
}
.ea-sw-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1.5px solid #e6d6bd;
	background: var(--ea-sw-card-bg, #fffaf1);
	color: var(--ea-sw-accent, #c26a43);
	font-size: 18px;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}
.ea-sw-page-btn:hover:not([disabled]) {
	background: var(--ea-sw-accent-tint, #f5e9d3);
	border-color: var(--ea-sw-accent, #c26a43);
}
.ea-sw-page-btn[disabled] {
	opacity: .4;
	cursor: default;
}
/* Pagination arrows are native buttons too. */
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-page-btn {
	background: var(--ea-sw-card-bg, #fffaf1) !important;
	color: var(--ea-sw-accent, #c26a43) !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-page-btn:hover:not([disabled]) {
	background: var(--ea-sw-accent-tint, #f5e9d3) !important;
	border-color: var(--ea-sw-accent, #c26a43) !important;
}
.ea-sw-page-label {
	font: 500 12.5px/1 'Figtree', sans-serif;
	color: #7a6b5a;
	min-width: 90px;
	text-align: center;
}

/* ---- Empty state ---- */

.ea-sw-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 18px 20px 6px;
}
.ea-sw-empty-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: #f6efe3;
	color: #c9bda8;
	font-size: 22px;
	margin-bottom: 16px;
}
.ea-sw-empty-title {
	font: 600 18px/1.3 'Spectral', Georgia, serif;
	color: #33291f;
	margin-bottom: 8px;
}
.ea-sw-empty-body {
	font: 400 14px/1.6 'Spectral', Georgia, serif;
	color: #9a8b78;
	margin-bottom: 20px;
	max-width: 340px;
}
.ea-sw-empty .ea-sw-chips {
	justify-content: center;
}

/* ---- Responsive: collapse columns on narrower viewports ---- */

@media (max-width: 900px) {
	.ea-sw-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 560px) {
	.ea-sw-grid {
		grid-template-columns: 1fr;
	}
	.ea-sw-input {
		font-size: 15px;
	}
}

/* ---- Load more button ---- */

.ea-sw-loadmore {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 4px auto 0;
	padding: 12px 30px;
	border-radius: 999px;
	border: 1.5px solid var(--ea-sw-accent, #c26a43);
	background: var(--ea-sw-card-bg, #fffaf1);
	color: var(--ea-sw-accent, #c26a43);
	font: 600 13.5px/1 'Figtree', sans-serif;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.ea-sw-loadmore:hover {
	background: var(--ea-sw-accent, #c26a43);
	color: var(--ea-sw-on-accent, #fff6ec);
}
/* The "Load more" button is a native button too. */
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-loadmore {
	border-color: var(--ea-sw-accent, #c26a43) !important;
	background: var(--ea-sw-card-bg, #fffaf1) !important;
	color: var(--ea-sw-accent, #c26a43) !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-loadmore:hover {
	background: var(--ea-sw-accent, #c26a43) !important;
	color: var(--ea-sw-on-accent, #fff6ec) !important;
}
.ea-sw-pagination:has(.ea-sw-loadmore),
.ea-sw-results-pagination:has(.ea-sw-loadmore) {
	justify-content: center;
}

/* Speaker / Series facet dropdowns (1.10.0) */
.ea-sw-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 12px 0 4px;
	align-items: stretch;
}
.ea-sw-filters select {
	/* Share the row: each filter takes an equal third and only wraps to a
	   new line on very narrow screens. */
	flex: 1 1 160px;
	min-width: 0;
	width: auto;
	max-width: 100%;
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
	background: var(--ea-sw-card-bg, #fff);
	border: 1px solid var(--ea-sw-border, #d9d4cc);
	border-radius: 999px;
	color: inherit;
	font: inherit;
	font-size: 0.9rem;
	padding: 8px 34px 8px 16px;
	cursor: pointer;
	background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D'http%3A//www.w3.org/2000/svg'%20viewBox%3D'0%200%2012%208'%3E%3Cpath%20fill%3D'%23888'%20d%3D'M6%208L0%200h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 10px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ea-sw-filters select:hover {
	border-color: var(--ea-sw-accent, #b08d57);
}
.ea-sw-filters select:focus {
	outline: none;
	border-color: var(--ea-sw-accent, #b08d57);
	box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.18);
}

/* Search-result cards: quote + explicit action buttons (1.12.0) */
.ea-sw-gc-result {
	display: flex;
	flex-direction: column;
	background: var(--ea-sw-card-bg, #fff);
	border: 1px solid var(--ea-sw-border, #e6e0d6);
	border-radius: var(--ea-sw-radius, 14px);
	overflow: hidden;
	height: 100%;
}
.ea-sw-gc-head {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	flex: 1 1 auto;
}
.ea-sw-gc-quote {
	display: block;
	margin: 8px 0 4px;
	padding-left: 12px;
	border-left: 3px solid var(--ea-sw-accent, #b08d57);
	font-style: italic;
	line-height: 1.5;
	color: var(--ea-sw-quote, #3a3a3a);
}
.ea-sw-gc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px;
	margin-top: auto;
}
.ea-sw-gc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex: 1 1 auto;
	text-align: center;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	padding: 10px 14px;
	border-radius: 999px;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.ea-sw-gc-btn:hover {
	transform: translateY(-1px);
}
.ea-sw-gc-btn-watch {
	background: var(--ea-sw-accent, #b08d57);
	color: #fff;
}
.ea-sw-gc-btn-watch:hover {
	box-shadow: 0 4px 14px rgba(176, 141, 87, 0.35);
}
.ea-sw-gc-btn-ico {
	font-size: 0.75em;
}
.ea-sw-gc-btn-read {
	background: transparent;
	color: var(--ea-sw-accent-ink, #6b5636);
	border: 1px solid var(--ea-sw-border, #d9d4cc);
}
.ea-sw-gc-btn-read:hover {
	border-color: var(--ea-sw-accent, #b08d57);
	background: rgba(176, 141, 87, 0.06);
}

/* Clickable topic tags + popular-topics row + active-tag pill (1.13.0) */
.ea-sw-poptags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 12px 0 4px;
}
.ea-sw-poptags-label {
	font-size: 0.85rem;
	font-weight: 600;
	opacity: 0.7;
	margin-right: 2px;
}
/* Base tag pill look -- what a "Match my theme" widget falls back to
   (still colored, just no longer forced to win over the theme's own
   button rule; see the ":not(.ea-sw-match-theme)" version below). */
.ea-search-widget .ea-sw-tag {
	display: inline-block;
	font: inherit;
	font-size: 0.82rem;
	line-height: 1.2;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid var(--ea-sw-border, #d9d4cc);
	background: var(--ea-sw-card-bg, #fff);
	color: var(--ea-sw-accent-ink, #6b5636);
	cursor: pointer;
	transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}
.ea-search-widget .ea-sw-tag:hover,
.ea-search-widget .ea-sw-tag:focus-visible {
	border-color: var(--ea-sw-accent, #b08d57);
	background: var(--ea-sw-accent, #b08d57);
	color: #fff;
	transform: translateY(-1px);
}
/* Scoped + explicit colors so a host theme's button:hover (which often
   forces white text) can't make these chips unreadable. Hover is an
   intentional filled state: accent background with white text. Skipped
   under "Match my theme" (.ea-sw-match-theme) so that mode's own point --
   letting the theme's button styling win -- still works. */
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-tag {
	background: var(--ea-sw-card-bg, #fff) !important;
	color: var(--ea-sw-accent-ink, #6b5636) !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-tag:hover,
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-tag:focus-visible {
	border-color: var(--ea-sw-accent, #b08d57);
	background: var(--ea-sw-accent, #b08d57) !important;
	color: #fff !important;
	transform: translateY(-1px);
}
.ea-sw-gc-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0 12px 4px;
}
.ea-sw-gc-tags .ea-sw-tag {
	font-size: 0.76rem;
	padding: 4px 10px;
}
.ea-sw-activetag {
	margin: 10px 0 2px;
}
.ea-sw-activetag-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.88rem;
	font-weight: 600;
	padding: 6px 8px 6px 14px;
	border-radius: 999px;
	background: var(--ea-sw-accent, #b08d57);
	color: #fff;
}
.ea-sw-activetag-clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
	font-size: 0.7rem;
	line-height: 1;
	cursor: pointer;
}
.ea-sw-activetag-clear:hover {
	background: rgba(255, 255, 255, 0.4);
}
/* The active-tag pill's "✕" is a native button too -- without this, a host
   theme's blanket button rule can paint a solid color over this
   translucent-white overlay, breaking the pill's contrast. */
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-activetag-clear {
	background: rgba(255, 255, 255, 0.25) !important;
	color: #fff !important;
}
.ea-search-widget:not(.ea-sw-match-theme) .ea-sw-activetag-clear:hover {
	background: rgba(255, 255, 255, 0.4) !important;
}
