/* OEG Search. Brand: navy #204f70, light blue #e2eeff, red #FA4457, 10px radius. */
.oeg-s-page, .oeg-s-shortcode, .oeg-s-dd {
	--oeg-navy: #204f70;
	--oeg-navy-dark: #173a53;
	--oeg-blue: #e2eeff;
	--oeg-blue-hover: #d4e8ff;
	--oeg-red: #FA4457;
	--oeg-yellow: #FFD200;
	--oeg-yellow-light: #FFF8D6;
	--oeg-text: #1f2933;
	--oeg-muted: #5b6b7a;
	--oeg-line: #d9e3ef;
	--oeg-bg: #ffffff;
	--oeg-radius: 10px;
}

.oeg-s-page { background: #f7faff; padding: 32px 16px 56px; }
.oeg-s-wrap { max-width: 860px; margin: 0 auto; }
.oeg-s-heading { color: var(--oeg-navy); font-size: clamp(24px, 4vw, 32px); margin: 0 0 16px; line-height: 1.2; }

/* Form */
.oeg-s-form { margin: 0 0 20px; }
.oeg-s-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.oeg-s-field { display: flex; align-items: center; gap: 6px; background: var(--oeg-bg); border: 1.5px solid var(--oeg-line); border-radius: var(--oeg-radius); min-height: 44px; padding: 4px 4px 4px 12px; transition: border-color .15s, box-shadow .15s; }
.oeg-s-field:focus-within { border-color: var(--oeg-navy); box-shadow: 0 0 0 3px rgba(32, 79, 112, .12); }
.oeg-s-icon { width: 16px; height: 16px; flex: 0 0 16px; color: var(--oeg-muted); }
.oeg-s-input { flex: 1 1 auto; min-width: 0; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; font-size: 16px; padding: 0 4px !important; color: var(--oeg-text); }
.oeg-s-input::placeholder { color: var(--oeg-muted); opacity: .75; }
.oeg-s-btn { flex: 0 0 auto; display: inline-flex; align-items: center; background: var(--oeg-navy); color: #fff; border: 0; border-radius: 8px; height: 34px; padding: 0 16px; font-size: 14px; font-weight: 600; cursor: pointer; }
.oeg-s-btn:hover, .oeg-s-btn:focus-visible { background: var(--oeg-navy-dark); }

/* Summary and empty state */
.oeg-s-summary { color: var(--oeg-muted); font-size: 15px; margin: 0 0 14px; }
.oeg-s-summary strong { color: var(--oeg-text); }
.oeg-s-empty { background: var(--oeg-bg); border: 1px solid var(--oeg-line); border-radius: var(--oeg-radius); padding: 20px; color: var(--oeg-text); }
.oeg-s-empty p { margin: 0 0 8px; }
.oeg-s-empty p:last-child { margin: 0; }

/* Results */
.oeg-s-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.oeg-s-result { background: var(--oeg-bg); border: 1px solid var(--oeg-line); border-radius: var(--oeg-radius); padding: 16px 18px; margin: 0; transition: border-color .15s, box-shadow .15s; }
.oeg-s-result:hover { border-color: #b8cbe0; box-shadow: 0 2px 10px rgba(32, 79, 112, .08); }
.oeg-s-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.oeg-s-pill, .oeg-s-tag { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 999px; }
.oeg-s-pill { background: var(--oeg-blue); color: var(--oeg-navy); }
.oeg-s-tag-latest { background: var(--oeg-yellow-light); color: #6b5600; border: 1px solid var(--oeg-yellow); }
.oeg-s-tag-recommended { background: var(--oeg-navy); color: #fff; }
.oeg-s-title { display: block; color: var(--oeg-navy); font-size: 18px; font-weight: 700; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.oeg-s-title:hover, .oeg-s-title:focus-visible { text-decoration: underline; }
.oeg-s-crumb { color: var(--oeg-muted); font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.oeg-s-snippet { color: var(--oeg-text); font-size: 14px; line-height: 1.55; margin: 8px 0 0; }
.oeg-s-snippet mark, .oeg-s-dd mark { background: var(--oeg-yellow-light); color: inherit; padding: 0 1px; border-radius: 2px; }

/* Instant results dropdown */
.oeg-s-dd {
	position: absolute;
	z-index: 99999;
	background: var(--oeg-bg);
	border: 1px solid var(--oeg-line);
	border-radius: var(--oeg-radius);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .06), 0 12px 32px rgba(23, 58, 83, .14);
	overflow: hidden;
	max-height: min(70vh, 520px);
	overflow-y: auto;
	overscroll-behavior: contain;
	font-size: 15px;
	text-align: left;
	scrollbar-width: thin;
	scrollbar-color: var(--oeg-line) transparent;
}
.oeg-s-dd::-webkit-scrollbar       { width: 4px; }
.oeg-s-dd::-webkit-scrollbar-track { background: transparent; }
.oeg-s-dd::-webkit-scrollbar-thumb { background: var(--oeg-line); border-radius: 4px; }
.oeg-s-dd[hidden] { display: none; }
.oeg-s-dd-head { padding: 10px 14px 4px; color: var(--oeg-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #eef3f9; }
.oeg-s-dd-item { display: block; padding: 9px 14px; text-decoration: none !important; color: var(--oeg-text); border-top: 1px solid #eef3f9; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .1s; }
.oeg-s-dd-item:first-of-type { border-top: 0; }
.oeg-s-dd-item.is-active, .oeg-s-dd-item:hover { background: var(--oeg-blue-hover); }
.oeg-s-dd-row { display: flex; align-items: flex-start; gap: 8px; }
.oeg-s-dd-title { flex: 1 1 auto; color: var(--oeg-navy); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.oeg-s-dd-type { flex: 0 0 auto; font-size: 10px; font-weight: 700; color: var(--oeg-navy); background: var(--oeg-blue); border-radius: 999px; padding: 3px 7px; text-transform: uppercase; letter-spacing: .04em; }
.oeg-s-dd-crumb { color: var(--oeg-muted); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.oeg-s-dd .oeg-s-tag { margin: 4px 4px 0 0; font-size: 11px; padding: 3px 7px; }
.oeg-s-dd-all { display: block; padding: 11px 14px; background: #f7faff; color: var(--oeg-navy) !important; font-weight: 600; text-decoration: none !important; border-top: 1px solid var(--oeg-line); }
.oeg-s-dd-all.is-active, .oeg-s-dd-all:hover { background: var(--oeg-blue-hover); }
.oeg-s-dd-empty { padding: 14px; color: var(--oeg-muted); }

@media (max-width: 600px) {
	.oeg-s-page { padding: 20px 16px 40px; }
	.oeg-s-field { min-height: 44px; padding: 4px 4px 4px 12px; }
	.oeg-s-input { font-size: 16px; }
	.oeg-s-btn { height: 34px; padding: 0 14px; font-size: 13px; }
	.oeg-s-result { padding: 14px; }
	.oeg-s-title { font-size: 16.5px; }
	.oeg-s-dd { font-size: 14.5px; max-height: min(55vh, 420px); }
	.oeg-s-dd-item { min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
}

@media (max-width: 380px) {
	.oeg-s-icon { display: none; }
}

/* Test mode note */
.oeg-s-testnote { background: #eaf7ee; border: 1px solid #1e6b3a; color: #14532d; border-radius: var(--oeg-radius); padding: 10px 14px; font-size: 14px; margin: 0 0 16px; }
.oeg-s-shortcode.oeg-s-test { border-radius: var(--oeg-radius); }

/* Video chapter that matched */
.oeg-s-chapter { text-decoration: none !important; display: flex; align-items: baseline; gap: 8px; margin-top: 8px; background: var(--oeg-yellow-light); border: 1px solid var(--oeg-yellow); border-radius: 8px; padding: 6px 10px; font-size: 14px; color: var(--oeg-text); line-height: 1.4; }
.oeg-s-time { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--oeg-navy); }
.oeg-s-chapter-text { min-width: 0; overflow-wrap: anywhere; }
.oeg-s-chapter mark { background: transparent; font-weight: 700; padding: 0; }
.oeg-s-dd-chapter { margin-top: 6px; font-size: 13px; padding: 4px 8px; }
a.oeg-s-chapter:hover, a.oeg-s-chapter:focus-visible { border-color: #e0b800; box-shadow: 0 1px 6px rgba(224, 184, 0, .35); }
.oeg-s-play { flex: 0 0 14px; width: 14px; height: 14px; align-self: center; color: var(--oeg-navy); }

/* Lesson page notice after jumping from a chapter result */
.oeg-jump-note { --oeg-navy: #204f70; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 99999; background: #FFF8D6; border: 1px solid #FFD200; color: #1f2933; border-radius: 10px; padding: 10px 14px; font-size: 14px; box-shadow: 0 6px 20px rgba(23, 58, 83, .2); max-width: calc(100vw - 32px); display: flex; gap: 10px; align-items: center; }
.oeg-jump-note button.oeg-jump-play, .oeg-jump-note button.oeg-jump-play:hover, .oeg-jump-note button.oeg-jump-play:focus, .oeg-jump-note button.oeg-jump-play:active { font: inherit; font-weight: 700; background: #204f70 !important; color: #fff !important; border: 0 !important; border-radius: 8px !important; box-shadow: none !important; padding: 6px 12px; cursor: pointer; }
.oeg-jump-note button.oeg-jump-close, .oeg-jump-note button.oeg-jump-close:hover, .oeg-jump-note button.oeg-jump-close:focus, .oeg-jump-note button.oeg-jump-close:active { font: inherit; font-size: 18px; line-height: 1; background: transparent !important; color: #5b6b7a !important; border: 0 !important; box-shadow: none !important; padding: 2px 4px; cursor: pointer; }
.oeg-jump-note button:focus-visible { outline: 2px solid #204f70; outline-offset: 2px; }

/* Lesson result that opens its recording topic */
.oeg-s-land { display: inline-flex; align-items: baseline; gap: 6px; margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--oeg-navy); text-decoration: none !important; }
.oeg-s-land:hover, .oeg-s-land:focus-visible { text-decoration: underline !important; }
.oeg-s-dd-land { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--oeg-navy); }
.oeg-s-dd button.oeg-s-dd-more,
.oeg-s-dd button.oeg-s-dd-more:hover,
.oeg-s-dd button.oeg-s-dd-more:focus,
.oeg-s-dd button.oeg-s-dd-more:active,
.oeg-s-dd button.oeg-s-dd-more.is-active {
	display: block; width: 100%; margin: 0; padding: 11px 14px;
	font: inherit; font-weight: 700; line-height: 1.4; text-align: center; text-transform: none; letter-spacing: normal;
	color: var(--oeg-navy) !important;
	border: 0 !important; border-top: 1px solid var(--oeg-line) !important; border-radius: 0 !important;
	box-shadow: none !important; outline: none; cursor: pointer;
	background: #f7faff !important;
}
.oeg-s-dd button.oeg-s-dd-more:hover,
.oeg-s-dd button.oeg-s-dd-more:active,
.oeg-s-dd button.oeg-s-dd-more.is-active { background: var(--oeg-blue-hover) !important; }
.oeg-s-dd button.oeg-s-dd-more:focus-visible { outline: 2px solid var(--oeg-navy); outline-offset: -2px; }
.oeg-s-dd button.oeg-s-dd-more:disabled { cursor: progress; opacity: .7; }
.oeg-s-matched { margin-top: 4px; font-size: 13px; color: var(--oeg-muted); overflow-wrap: anywhere; }
.oeg-s-dd-matched { display: block; margin-top: 3px; font-size: 12.5px; color: var(--oeg-muted); overflow-wrap: anywhere; }

/* One-time "search got smarter" callout under the header search bar */
.oeg-news { --oeg-navy: #204f70; position: absolute; z-index: 99998; box-sizing: border-box; display: flex; align-items: flex-start; gap: 10px; padding: 12px 10px 12px 14px; background: #e2eeff; border: 1px solid #c9dcf5; border-radius: 10px; box-shadow: 0 6px 20px rgba(23, 58, 83, .14); color: #1f2933; font-size: 13.5px; line-height: 1.45; text-align: left; opacity: 0; transform: translateY(-4px); transition: opacity .2s cubic-bezier(.4,0,.2,1), transform .2s cubic-bezier(.4,0,.2,1); }
.oeg-news.is-in { opacity: 1; transform: none; }
.oeg-news[hidden] { display: none; }
.oeg-news::before { content: ""; position: absolute; top: -6px; left: var(--oeg-news-arrow, 24px); width: 10px; height: 10px; background: #e2eeff; border-left: 1px solid #c9dcf5; border-top: 1px solid #c9dcf5; transform: rotate(45deg); }
.oeg-news-icon { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; color: var(--oeg-navy); }
.oeg-news-text { flex: 1 1 auto; min-width: 0; }
.oeg-news-text strong { display: block; color: var(--oeg-navy); font-weight: 700; font-size: 14px; }
.oeg-news-x { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: -4px -2px 0 0; padding: 0; background: none; border: 0; border-radius: 6px; color: #5b6b7a; cursor: pointer; }
.oeg-news-x svg { width: 16px; height: 16px; }
.oeg-news-x:hover, .oeg-news-x:focus-visible { background: rgba(32, 79, 112, .08); color: var(--oeg-navy); }
@media (prefers-reduced-motion: reduce) { .oeg-news { transition: none; } }
