/* TE E-book Pop-up. Colours are variables so they're easy to tweak in Divi → Theme Options → Custom CSS. */
.teeb {
	--teeb-gold: #d4b062;
	--teeb-gold-hover: #c29d4f;
	--teeb-text: #ffffff;
	--teeb-muted: rgba(255, 255, 255, .82);
	--teeb-radius: 18px;
	--teeb-font: inherit;
	--teeb-heading-font: inherit;

	padding: 0;
	border: 0;
	background: transparent;
	width: min(880px, calc(100% - 24px));
	max-width: none;
	max-height: calc(100dvh - 24px);
	overflow: visible;
	color: var(--teeb-text);
	font-family: var(--teeb-font);
	text-align: center;
}
.teeb::backdrop { background: rgba(10, 18, 24, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
html.teeb-lock { overflow: hidden; }

.teeb__panel {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
	gap: clamp(20px, 4vw, 44px);
	align-items: center;
	padding: clamp(28px, 5vw, 52px);
	border-radius: var(--teeb-radius);
	max-height: calc(100dvh - 24px);
	overflow-y: auto;
	overscroll-behavior: contain;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
	background:
		linear-gradient(180deg, rgba(14, 40, 52, .55) 0%, rgba(26, 30, 34, .35) 45%, rgba(40, 24, 12, .72) 100%),
		var(--teeb-bg-image, radial-gradient(120% 90% at 85% 15%, #7fb7c4 0%, rgba(127, 183, 196, 0) 55%)),
		linear-gradient(160deg, #18414f 0%, #2f5e66 30%, #a8763f 70%, #6b4423 100%);
	background-size: cover;
	background-position: center;
}

.teeb__close {
	position: absolute; top: 10px; right: 10px; z-index: 2;
	width: 44px; height: 44px; display: grid; place-items: center;
	border: 0; border-radius: 50%; padding: 0; margin: 0;
	background: rgba(0, 0, 0, .18); color: #fff; cursor: pointer;
	transition: background .2s;
}
.teeb__close:hover { background: rgba(0, 0, 0, .35); }

.teeb__cover img {
	display: block; width: 100%; height: auto;
	border-radius: 4px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
}

.teeb .teeb__eyebrow {
	margin: 0 0 .5em; padding: 0;
	font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
	color: var(--teeb-gold); font-weight: 500; line-height: 1.4;
}
.teeb .teeb__title {
	margin: 0 0 .35em; padding: 0;
	font-family: var(--teeb-heading-font);
	font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; font-weight: 400;
	color: var(--teeb-text); outline: none; text-wrap: balance;
	text-shadow: 0 2px 16px rgba(0, 0, 0, .25);
}
.teeb .teeb__intro, .teeb .teeb__intro p {
	margin: 0 0 1em; padding: 0;
	font-size: 17px; line-height: 1.55; color: var(--teeb-muted);
}
.teeb .teeb__intro a { color: #fff; text-decoration: underline; }

.teeb__form { margin: 1.25em 0 0; }
.teeb__field { margin: 0 0 12px; }
.teeb .teeb__input {
	display: block; width: 100%; box-sizing: border-box;
	height: 54px; margin: 0; padding: 0 18px;
	border: 1px solid rgba(255, 255, 255, .7); border-radius: 10px;
	background: #fff; color: #222;
	font: inherit; font-size: 16px; /* 16px stops iOS zooming */
	box-shadow: none;
}
.teeb .teeb__input::placeholder { color: #7a7a7a; opacity: 1; }
.teeb .teeb__input[aria-invalid="true"] { border-color: #ffb4a8; box-shadow: 0 0 0 2px #ffb4a8; }

.teeb__check {
	display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start;
	margin: 16px 0 6px; cursor: pointer;
	font-size: 15px; line-height: 1.45; color: var(--teeb-muted); text-align: left;
}
.teeb__check input {
	width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--teeb-gold); cursor: pointer;
}
.teeb__check small { display: block; margin-top: 3px; font-size: 13px; opacity: .8; }

.teeb .teeb__button {
	display: block; width: 100%; margin: 16px 0 0;
	min-height: 56px; padding: 12px 20px;
	border: 0; border-radius: 10px;
	background: var(--teeb-gold); color: #fff;
	font: inherit; font-size: 18px; font-weight: 600; letter-spacing: .01em;
	cursor: pointer; transition: background .2s, transform .1s;
}
.teeb .teeb__button:hover { background: var(--teeb-gold-hover); }
.teeb .teeb__button:active { transform: translateY(1px); }
.teeb .teeb__button[disabled] { opacity: .7; cursor: progress; }
.teeb .teeb__button--ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .6); margin-top: 22px; }
.teeb .teeb__button--ghost:hover { background: rgba(255, 255, 255, .12); }

.teeb .teeb__fine { margin: 12px 0 0; padding: 0; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .7); text-align: center; }
.teeb .teeb__error {
	margin: 10px 0 0; padding: 10px 14px; border-radius: 8px;
	background: rgba(120, 20, 10, .55); color: #fff; font-size: 15px; line-height: 1.4;
}
.teeb .teeb__error[hidden], .teeb [hidden] { display: none !important; }
.teeb__ts:empty { display: none; }
.teeb__ts { margin-top: 12px; }

/* Visually hidden (labels for screen readers) and the bot trap */
.teeb__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.teeb__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Keyboard focus */
.teeb :focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.teeb .teeb__input:focus-visible { outline: 3px solid var(--teeb-gold); outline-offset: 1px; }

/* Entrance */
.teeb[open] .teeb__panel { animation: teeb-in .45s cubic-bezier(.2, .8, .2, 1); }
.teeb[open]::backdrop { animation: teeb-fade .45s ease; }
@keyframes teeb-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes teeb-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.teeb[open] .teeb__panel, .teeb[open]::backdrop { animation: none; }
}

/* Tablet / phone: stack, smaller cover */
@media (max-width: 720px) {
	.teeb__panel { grid-template-columns: 1fr; gap: 18px; text-align: center; padding: 56px 22px 24px; }
	.teeb__cover { width: 120px; margin: 0 auto; }
	.teeb .teeb__intro, .teeb .teeb__intro p { font-size: 16px; }
	.teeb__check { font-size: 14px; }
}
@media (max-width: 380px) {
	.teeb__cover { width: 96px; }
	.teeb .teeb__title { font-size: 26px; }
}
.teeb .teeb__title:focus, .teeb .teeb__title:focus-visible { outline: none; }
