/*
 * PY Teasers: teaser pages (PY Playbook, PY Portal, Ask PY, KYC). Loaded on those pages only.
 * Uses the theme's colour tokens (--py-*) and classes. Delete with the plugin.
 */

/* ---------- Full-access band (PY Playbook, PY Portal, KYC) ---------- */
.py-tband__inner {
	display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; width: 100%;
	background: var(--py-navy); color: var(--py-white);
}
.py-tband__inner :focus-visible { outline-color: var(--py-gold); }
.py-tband__icon { flex: none; color: var(--py-gold); }
.py-tband__rule { flex: none; width: 1px; height: 52px; background: rgba(255, 255, 255, .45); }
.py-tband__text { flex: 1 1 280px; margin: 0; font-size: 22px; line-height: 1.3; }
.py-tband__text strong { font-weight: 700; }
.py-tband__mail {
	display: inline-flex; align-items: center; max-width: 100%; height: 52px; padding: 0 30px; border-radius: 999px;
	background: var(--py-gold); color: var(--py-dark); font-size: 20px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.py-tband__mail:hover { background: #E3A94A; }

/* Pill: overlaps the bottom of the faded article. */
.py-tband--pill .py-tband__wrap { position: relative; z-index: 2; max-width: 1100px; margin-top: -40px; padding-bottom: 112px; }
.py-tband--pill .py-tband__inner { padding: 18px 24px 18px 36px; border-radius: 999px; box-shadow: 0 14px 34px rgba(11, 46, 99, .28); }
.py-teaser-fade .py-sec.py-article { padding-bottom: 24px; }

/* Box: under the KYC table, on the same grey ground. */
.py-tband--box { background: var(--py-surface-alt); }
.py-tband--box .py-tband__wrap { max-width: 1240px; padding-bottom: 112px; }
.py-tband--box .py-tband__inner { gap: 16px 28px; padding: 24px 32px; border-radius: 12px; }
.py-tband--box .py-tband__text { font-size: 21px; line-height: 1.35; }
.py-tband--box .py-tband__mail { height: 48px; padding: 0 26px; border-radius: 6px; font-size: 18px; }
.py-teaser--kyc .py-sec.py-kycpage { padding-bottom: 48px; }

/* ---------- Faded article (PY Playbook, PY Portal) ---------- */
.py-teaser-fade .py-article__inner { position: relative; max-height: 520px; overflow: hidden; }
.py-teaser-fade .py-article__inner::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70%; pointer-events: none;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .72) 45%, rgba(255, 255, 255, .96) 100%);
	-webkit-backdrop-filter: blur(2.5px); backdrop-filter: blur(2.5px);
	-webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 55%); mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
}
/* Blocks under the fade (marked by teasers.js): not selectable, hidden from screen readers. */
.py-tfade-hidden { -webkit-user-select: none; user-select: none; }

/* ---------- KYC locked row (decoy) ---------- */
.py-kyc__row.py-tlocked { position: relative; display: block; min-height: 130px; overflow: hidden; background: var(--py-white); -webkit-user-select: none; user-select: none; }
.py-tlocked__blur { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); filter: blur(5px); opacity: .55;  width: 100%; box-sizing: border-box; }
.py-tlocked__icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* ---------- Ask PY demo ---------- */
.py-ask { max-width: 980px; margin: 0 auto; padding: 64px var(--py-gutter) 112px; }
.py-ask__card {
	padding: 36px 40px 28px; border: 1px solid var(--py-navy); border-radius: 28px; background: var(--py-white);
	box-shadow: 0 18px 44px rgba(11, 46, 99, .08);
}
.py-ask__question { display: flex; align-items: center; gap: 20px; margin-bottom: 36px; }
.py-ask__avatar, .py-ask__badge {
	flex: none; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
}
.py-ask__avatar { border-radius: 50%; background: #EEF1F7; color: var(--py-navy); }
.py-ask__bubble { flex: 1; min-width: 0; margin: 0; padding: 18px 24px; border-radius: 18px; background: #EEF1F7; font-size: 20px; line-height: 1.35; }
.py-ask__answer { display: flex; align-items: flex-start; gap: 20px; transition: opacity .5s ease; }
.py-ask__badge { border-radius: 12px; background: var(--py-navy); color: var(--py-white); font-size: 24px; line-height: 1; }
.py-ask__body { flex: 1; min-width: 0; }
.py-ask__lead { margin: 0 0 22px; font-size: 20px; line-height: 1.5; color: var(--py-ink); }
.py-ask__locked { position: relative; padding-top: 8px; }
.py-ask__blur { filter: blur(3.5px); opacity: .55; -webkit-user-select: none; user-select: none; pointer-events: none; }
.py-ask__steps-intro { margin: 0 0 14px; font-size: 20px; }
.py-ask__steps { margin: 0; padding: 0 0 0 4px; list-style: none; font-size: 20px; line-height: 1.9; }
.py-ask__lock {
	position: absolute; right: 0; bottom: -6px; width: min(400px, 100%); padding: 24px 28px;
	border: 1px solid #E6DFD0; border-radius: 20px; background: rgba(255, 255, 255, .96);
	box-shadow: 0 14px 36px rgba(11, 46, 99, .16); text-align: center;
}
.py-ask__lock-icon { display: block; margin: 0 auto 10px; color: var(--py-gold); }
.py-ask__lock-text { margin: 0 0 14px; font-size: 18px; line-height: 1.4; }
.py-ask__lock-mail { margin: 0; padding-top: 14px; border-top: 1px solid var(--py-hairline); font-size: 18px; line-height: 1.4; }
.py-ask__lock-mail a { color: var(--py-navy); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.py-ask__lock-mail a:hover { color: var(--py-gold); text-decoration: underline; text-underline-offset: 4px; }
.py-ask__input {
	display: flex; align-items: center; gap: 12px; margin-top: 44px; padding: 8px 8px 8px 28px;
	border: 1px solid #C9C9CF; border-radius: 999px; background: var(--py-surface); cursor: not-allowed; transition: background-color .5s ease;
}
.py-ask__placeholder { flex: 1; min-width: 0; font-size: 19px; color: #7A7A82; }
.py-ask__placeholder--open { display: none; }
.py-ask__send {
	flex: none; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
	border-radius: 50%; background: #B9B9BF; color: var(--py-white); transition: background-color .5s ease;
}
.py-ask__note { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; font-size: 14px; color: var(--py-muted); }
.py-ask__note svg { flex: none; }

/* Before the demo has played (only with JS; without it the finished state above shows). */
.py-teasers-js .py-ask:not(.is-started) .py-ask__answer { opacity: 0; }
.py-teasers-js .py-ask:not(.is-locked) .py-ask__lock { display: none; }
.py-teasers-js .py-ask:not(.is-locked) .py-ask__input { background: var(--py-white); cursor: default; }
.py-teasers-js .py-ask:not(.is-locked) .py-ask__placeholder--open { display: block; }
.py-teasers-js .py-ask:not(.is-locked) .py-ask__placeholder--locked { display: none; }
.py-teasers-js .py-ask:not(.is-locked) .py-ask__send { background: var(--py-navy); }
.py-ask__todo { visibility: hidden; }
.py-ask__cursor {
	display: inline-block; width: 2px; height: 1.1em; margin: 0 -3px 0 1px; vertical-align: -3px;
	background: var(--py-navy); animation: py-ask-blink 1s steps(1) infinite;
}
.py-teasers-js .py-ask.is-locked .py-ask__lock { animation: py-ask-in .6s ease both; }
@keyframes py-ask-blink { 50% { opacity: 0; } }
@keyframes py-ask-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.py-ask__answer, .py-ask__input, .py-ask__send { transition: none; }
	.py-ask__cursor, .py-teasers-js .py-ask.is-locked .py-ask__lock { animation: none; }
}

@media (max-width: 900px) {
	.py-tlocked__blur { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
	.py-tband--pill .py-tband__inner { padding: 22px; border-radius: 28px; }
	.py-ask__lock { position: relative; right: auto; bottom: auto; width: 100%; margin-top: -30px; }
}
@media (max-width: 700px) {
	.py-tband--pill .py-tband__wrap, .py-tband--box .py-tband__wrap { padding-bottom: 72px; }
	.py-tband--box .py-tband__inner { padding: 22px; }
	.py-tband__text, .py-tband--box .py-tband__text { font-size: 19px; }
	.py-tband__mail, .py-tband--box .py-tband__mail { height: 48px; padding: 0 22px; font-size: 17px; }
	.py-tband__rule { display: none; }
	.py-ask { padding-block: 40px 72px; }
	.py-ask__card { padding: 24px 20px 20px; border-radius: 22px; }
	.py-ask__question, .py-ask__answer { gap: 12px; }
	.py-ask__question { margin-bottom: 28px; }
	.py-ask__answer { flex-direction: column; }
	.py-ask__avatar, .py-ask__badge { width: 40px; height: 40px; }
	.py-ask__avatar svg { width: 22px; height: 22px; }
	.py-ask__badge { border-radius: 10px; font-size: 18px; }
	.py-ask__bubble { padding: 14px 16px; font-size: 18px; }
	.py-ask__lead, .py-ask__steps-intro, .py-ask__steps { font-size: 18px; }
	.py-ask__lock { padding: 20px; }
	.py-ask__lock-text, .py-ask__lock-mail { font-size: 17px; }
	.py-ask__input { margin-top: 32px; padding-left: 20px; }
	.py-ask__placeholder { font-size: 16px; line-height: 1.3; }
	.py-ask__send { width: 44px; height: 44px; }
}
