/*
 * Oasis Banners — frontend styles for all banner types.
 * Structure: 1) base  2) CTA  3) inline  4) strip  5) popup  6) motion/print.
 * Every selector is namespaced with .ob-* and class-based to beat theme element styles.
 */

/* ---------------------------------------------------------------- 1. base */
.ob {
	--ob-green: #327309;
	--ob-green-dark: #245909;
	--ob-ink: #222;
	--ob-muted: #606060;
	--ob-line: #dededb;
	--ob-soft: #f5f5f2;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	color: var(--ob-ink);
	text-align: left;
	clear: both;
}
.ob *, .ob *::before, .ob *::after { box-sizing: border-box; }
.ob img { max-width: 100%; height: auto; border: 0; box-shadow: none; }
.ob svg { flex-shrink: 0; }
/* Neutralise theme link decoration (.entry-content a adds a blue border-bottom). */
.ob a, a.ob, .ob .ob-cta { border: 0 !important; border-bottom: 0 !important; }

/* ----------------------------------------------------------------- 2. CTA */
.ob .ob-cta {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 25px;
	min-height: 50px;
	padding: 14px 24px;
	border: 0;
	border-radius: 7px;
	background: linear-gradient(110deg, #245909 0%, #2d6b0e 48%, #28620b 100%);
	box-shadow: 0 5px 14px #244e1024;
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none !important;
	transition: filter .16s ease-out, box-shadow .16s ease-out;
}
.ob .ob-cta:hover { filter: brightness(1.06); box-shadow: 0 7px 18px #244e1033; color: #fff !important; }
.ob .ob-cta:active { filter: brightness(.95); box-shadow: 0 2px 6px #244e1026; }
.ob .ob-cta:focus-visible { outline: 3px solid var(--ob-green); outline-offset: 3px; }
.ob .ob-cta svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.ob .ob-cta::before {
	content: "";
	position: absolute;
	inset: -25% auto -25% 0;
	width: 60%;
	z-index: -1;
	pointer-events: none;
	background: linear-gradient(105deg, transparent 20%, #ffffff1e 50%, transparent 80%);
	transform: translateX(-180%) skewX(-18deg);
	animation: ob-shine 6s ease-in-out infinite;
	animation-play-state: paused;
}
.ob .ob-cta.is-visible::before { animation-play-state: running; }
@keyframes ob-shine {
	0%, 12% { transform: translateX(-180%) skewX(-18deg); }
	35%, 100% { transform: translateX(240%) skewX(-18deg); }
}

/* --------------------------------------------------------------- 3. inline */
.ob-inline {
	margin: 36px 0;
	border: 1px solid #dcdcd7;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
}
.ob-inline .ob-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 25px;
	align-items: center;
	padding: 28px 34px;
	background: var(--ob-soft);
}
.ob-inline .ob-head--author { grid-template-columns: minmax(0, 1fr) 145px; }
.ob-inline .ob-title {
	margin: 0;
	padding: 0;
	font-size: 30px;
	font-weight: 600;
	line-height: 1.16;
	letter-spacing: -.025em;
	color: var(--ob-green);
	text-wrap: balance;
}
.ob-inline .ob-lead {
	max-width: 61ch;
	margin: 14px 0 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.65;
	color: #333;
}
.ob-inline .ob-lead strong { font-weight: 600; }
.ob-inline .ob-facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	margin: 20px 0 0;
	font-size: 15px;
	line-height: 1.45;
	color: #292929;
}
.ob-inline .ob-fact { display: inline-flex; align-items: center; gap: 8px; }
.ob-inline .ob-fact svg { width: 20px; height: 20px; color: var(--ob-green); }
.ob-inline .ob-fact strong { font-weight: 600; }
.ob-inline .ob-fact__plus { margin-right: 2px; color: #727272; }

.ob-inline .ob-author { margin: 0; padding: 0; text-align: center; }
.ob-inline .ob-author img {
	display: block;
	width: 100px;
	height: 100px;
	margin: 0 auto;
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 28%;
}
.ob-inline .ob-author figcaption { margin: 9px 0 0; font-size: 13px; line-height: 1.45; color: var(--ob-ink); }
.ob-inline .ob-author figcaption strong { font-weight: 500; }
.ob-inline .ob-author figcaption span { display: block; margin-top: 6px; font-size: 12px; color: var(--ob-muted); }

.ob-inline .ob-body { padding: 8px 34px 25px; }
.ob-inline .ob-materials { margin: 0; padding: 0; list-style: none; }
.ob-inline .ob-material {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
	margin: 0;
	padding: 16px 0;
	border-bottom: 1px solid var(--ob-line);
}
.ob-inline .ob-materials .ob-material { list-style: none; position: static; }
.ob-inline .ob-materials .ob-material::before, .ob-inline .ob-materials .ob-material::marker { content: none !important; display: none !important; }
.ob-inline .ob-materials { margin: 0 !important; padding: 0 !important; }
.ob-inline .ob-material--noimg { grid-template-columns: minmax(0, 1fr); }
.ob-inline .ob-material__img {
	display: block;
	width: 112px;
	height: auto;
	margin: 4px 0 0;
	border: 1px solid var(--ob-line);
	border-radius: 6px;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.ob-inline .ob-material__copy { min-width: 0; }
.ob-inline .ob-material__meta { display: block; margin: 0 0 5px; font-size: 12px; line-height: 1.5; color: var(--ob-green); }
.ob-inline .ob-material__title { margin: 0; padding: 0; font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; color: var(--ob-ink); }
.ob-inline .ob-material__text { max-width: 72ch; margin: 5px 0 0; padding: 0; font-size: 13px; line-height: 1.65; color: var(--ob-muted); }
.ob-inline .ob-material__bonus { display: block; margin-top: 3px; color: #444; }
.ob-inline .ob-bonus-label { display: inline-flex; align-items: baseline; gap: 5px; font-weight: 600; }
.ob-inline .ob-bonus-label svg { width: 15px; height: 15px; align-self: center; color: #55723e; }

.ob-inline .ob-action { margin-top: 20px; text-align: center; }
.ob-inline .ob-action .ob-cta { max-width: 100%; padding: 14px 24px; font-size: 14px; }
.ob-inline .ob-action__note { max-width: 62ch; margin: 12px auto 0; padding: 0; font-size: 12px; line-height: 1.6; color: var(--ob-muted); }

/* ---------------------------------------------------------------- 4. strip */
.ob.ob-strip {
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 112px;
	margin: 32px 0;
	padding: 22px 30px;
	border-radius: 22px;
	background: #f7f7f7;
	color: inherit !important;
	text-decoration: none !important;
	transition: background-color .16s ease-out;
}
.ob.ob-strip:hover { background: #f1f1ef; }
.ob.ob-strip:focus-visible { outline: 3px solid var(--ob-green); outline-offset: 4px; }
.ob-strip .ob-strip__icon { width: 44px; height: 57px; }
.ob-strip .ob-strip__copy { display: block; min-width: 0; }
.ob-strip .ob-strip__title {
	display: block;
	font-size: 23px;
	font-weight: 400;
	line-height: 1.32;
	color: var(--ob-green);
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 4px;
}
.ob.ob-strip:hover .ob-strip__title { color: #245a07; }
.ob-strip .ob-strip__note { display: block; margin-top: 7px; font-size: 16px; line-height: 1.4; color: #696969; }

/* ---------------------------------------------------------------- 5. popup */
.ob-popup-root {
	position: fixed;
	right: 22px;
	bottom: var(--ob-bottom, 100px);
	z-index: 99990;
	width: min(380px, calc(100vw - 32px));
	pointer-events: none;
}
.ob-popup-root > * { pointer-events: auto; }
.ob-popup-root .ob-popup { opacity: 0; transform: translateY(14px); transition: opacity .25s ease-out, transform .25s ease-out; }
.ob-popup-root.is-in .ob-popup { opacity: 1; transform: none; }

.ob-popup {
	position: relative;
	padding: 24px;
	border: 1px solid var(--ob-line);
	border-radius: 15px;
	background: #fff;
	color: var(--ob-ink);
	box-shadow: 0 12px 38px #00000022;
}
.ob-popup .ob-popup__head { display: flex; align-items: center; gap: 12px; padding-right: 12px; }
.ob-popup .ob-popup__photo { display: block; width: 50px; height: 60px; border-radius: 8px; object-fit: cover; object-position: 50% 28%; flex-shrink: 0; }
.ob-popup .ob-popup__title { margin: 0; padding: 0; font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; color: inherit; }
.ob-popup .ob-popup__text { margin: 16px 0 0; padding: 0; font-size: 13px; line-height: 1.6; color: var(--ob-muted); }
.ob-popup .ob-popup__expert { margin: 10px 0 0; padding: 0; font-size: 12px; color: var(--ob-muted); }
.ob-popup .ob-popup__bonus { display: grid; grid-template-columns: 34px 1fr; gap: 12px; margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--ob-line); }
.ob-popup .ob-popup__bonus-img { width: 32px; height: auto; border-radius: 4px; }
.ob-popup .ob-popup__bonus p { margin: 0; padding: 0; font-size: 12px; line-height: 1.5; color: var(--ob-muted); }
.ob-popup .ob-popup__bonus strong { font-weight: 600; color: #333; }
.ob-popup .ob-popup__bonus span { display: block; margin-top: 4px; }
.ob-popup .ob-pdfmark { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 32px; color: #666; font-size: 12px; line-height: 1.4; }
.ob-popup .ob-pdfmark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.ob-popup .ob-cta { width: 100%; min-height: 46px; margin-top: 19px; padding: 13px 15px; gap: 12px; font-size: 13px; background: var(--ob-green); box-shadow: none; }
.ob-popup .ob-cta::before { display: none; }
.ob-popup .ob-cta:hover { background: #265d07; filter: none; box-shadow: none; }

.ob-popup .ob-close {
	position: absolute;
	top: 2px;
	right: 2px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: #666;
	cursor: pointer;
}
.ob-popup .ob-close:hover { background: #efefec; color: #666; }
.ob-popup .ob-close:focus-visible { outline: 3px solid var(--ob-green); outline-offset: -3px; }
.ob-popup .ob-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* Dark theme. */
.ob-popup--dark { background: #292929; border-color: #292929; color: #fff; }
.ob-popup--dark .ob-popup__text,
.ob-popup--dark .ob-popup__expert,
.ob-popup--dark .ob-popup__bonus p { color: #e0e0e0; }
.ob-popup--dark .ob-popup__bonus { border-color: #4a4a4a; }
.ob-popup--dark .ob-popup__bonus strong { color: #fff; }
.ob-popup--dark .ob-pdfmark { color: #d0d0d0; }
.ob-popup--dark .ob-close { color: #eee; }
.ob-popup--dark .ob-close:hover { background: #414141; color: #eee; }
.ob-popup--dark .ob-cta { background: #fff; color: #222 !important; }
.ob-popup--dark .ob-cta:hover { background: #ededeb; color: #222 !important; }

/* ------------------------------------------------------- 6. responsive etc */
@media (max-width: 760px) {
	.ob-inline { margin: 28px 0; }
	.ob-inline .ob-head, .ob-inline .ob-head--author { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 16px; padding: 20px 18px; }
	.ob-inline .ob-title { font-size: 26px; }
	.ob-inline .ob-lead { font-size: 14px; }
	.ob-inline .ob-facts { gap: 10px; margin-top: 18px; font-size: 14px; }
	.ob-inline .ob-fact { gap: 7px; }
	.ob-inline .ob-fact svg { width: 18px; height: 18px; }
	.ob-inline .ob-author { display: flex; align-items: center; gap: 12px; text-align: left; }
	.ob-inline .ob-author img { width: 58px; height: 66px; margin: 0; border-radius: 7px; }
	.ob-inline .ob-author figcaption { margin: 0; font-size: 14px; }
	.ob-inline .ob-author figcaption span { margin-top: 3px; }
	.ob-inline .ob-author figcaption br { display: none; }
	.ob-inline .ob-body { padding: 5px 18px 22px; }
	.ob-inline .ob-material { grid-template-columns: 88px minmax(0, 1fr); column-gap: 14px; row-gap: 12px; padding: 14px 0; }
	.ob-inline .ob-material--noimg { grid-template-columns: minmax(0, 1fr); }
	.ob-inline .ob-material__img { width: 88px; margin: 0; align-self: center; }
	.ob-inline .ob-material__copy { display: contents; }
	.ob-inline .ob-material__head { align-self: center; min-width: 0; }
	.ob-inline .ob-material__text { grid-column: 1 / -1; margin: 0; }
	.ob-inline .ob-material__title { font-size: 16px; }
	.ob-inline .ob-action .ob-cta { width: 100%; padding: 14px 12px; font-size: 12px; gap: 10px; }

	.ob.ob-strip { align-items: flex-start; gap: 15px; min-height: 0; margin: 24px 0; padding: 20px 18px; border-radius: 18px; }
	.ob-strip .ob-strip__icon { width: 32px; height: 42px; margin-top: 3px; }
	.ob-strip .ob-strip__title { font-size: 18px; line-height: 1.35; }
	.ob-strip .ob-strip__note { margin-top: 9px; font-size: 14px; }

	.ob-popup-root { right: 16px; bottom: calc(var(--ob-bottom, 100px) + env(safe-area-inset-bottom, 0px)); }
	.ob-popup { padding: 20px; }
	.ob-popup .ob-popup__title { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
	.ob .ob-cta::before { animation: none; display: none; }
	.ob-popup-root .ob-popup { transition: none; transform: none; }
}

@media print {
	.ob-popup-root { display: none !important; }
}
