/* =============================================================================
   pixva member panel + TV assistant
   -----------------------------------------------------------------------------
   One file, four parts:
     1. launcher buttons and the dialog shell
     2. the two-step auth panel (tabs, steps, fields, code boxes)
     3. the assistant (chat)
     4. scroll lock and motion preferences

   The panel rules carry a `.px8` prefix on purpose. The dialog shell has been
   styling `label`, `input` and `button` inside it since v7, and a bare class
   would lose to those selectors — the prefix is what makes the new design win
   without a single `!important`.
   ========================================================================== */

/* ------------------------------------------------------------------ 1. shell */

.px7-account,
.px7-launch,
.px7-dialog button {
	font: inherit;
	cursor: pointer;
	border-radius: 12px;
	border: 1px solid #b8cdd5;
	padding: 11px 17px;
	background: #fff;
	color: #103b4a;
	min-height: 44px;
}

.px7-account {
	white-space: nowrap;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.px7-account:hover {
	border-color: #0b6b7a;
	box-shadow: 0 6px 18px rgba(11, 107, 122, .12);
}

.px7-launch {
	position: fixed;
	bottom: 88px;
	left: 20px;
	z-index: 90;
	background: #123f51;
	color: #fff;
	box-shadow: 0 8px 30px rgba(9, 43, 56, .25);
	border-color: #417f8f;
}

.px7-dialog {
	width: min(520px, calc(100% - 32px));
	max-height: 88dvh;
	overflow: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: #b9d5dd transparent;
	box-sizing: border-box;
	border: 1px solid #d1e2e6;
	border-radius: 26px;
	padding: 30px;
	background: #fbfdfd;
	color: #183b48;
	box-shadow: 0 30px 100px rgba(0, 38, 55, .22);
	text-align: right;
}

.px7-dialog::-webkit-scrollbar { width: 10px; }
.px7-dialog::-webkit-scrollbar-thumb { background: #c6dee5; border-radius: 99px; border: 3px solid #fbfdfd; }

.px7-dialog::backdrop {
	background: rgba(7, 40, 55, .62);
	backdrop-filter: blur(4px);
}

.px7-dialog[open] { animation: px8-rise .34s cubic-bezier(.2, .8, .25, 1); }
.px7-dialog[open]::backdrop { animation: px8-fade .34s ease; }

@keyframes px8-rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes px8-fade { from { opacity: 0; } to { opacity: 1; } }

.px7-dialog h2 {
	font-size: 25px;
	margin: 12px 0;
	letter-spacing: -.2px;
}

.px7-eyebrow {
	font-size: 12px;
	letter-spacing: 1px;
	color: #397685;
}

.px7-dialog .px7-close {
	float: left;
	border: 0;
	font-size: 25px;
	padding: 0 10px;
	background: transparent;
	line-height: 1;
	color: #5c7784;
}

.px7-dialog .px7-close:hover { color: #0b6b7a; }

.px7-dialog form > button { margin: 8px 0; }
.px7-dialog button:disabled { opacity: .6; cursor: wait; }
.px7-dialog :focus-visible { outline: 3px solid #eeaf61; outline-offset: 3px; }

.px7-note {
	font-size: 12px;
	line-height: 1.9;
	color: #49616a;
}

#px7-status {
	font-size: 13px;
	line-height: 1.9;
	margin: 14px 0 0;
}

#px7-status:empty { display: none; }

#px7-status.is-error,
#px7-status.is-ok {
	border-radius: 12px;
	padding: 11px 14px;
	border: 1px solid transparent;
}

#px7-status.is-error { background: #fdf1e8; border-color: #f3d3b6; color: #8b4316; }
#px7-status.is-ok { background: #e9f4f3; border-color: #c3e0de; color: #0b6b7a; }

#px7-reply {
	white-space: pre-wrap;
	line-height: 2;
	background: #e9f4f3;
	border-radius: 12px;
	padding: 16px;
	margin: 16px 0;
}

#px7-reply:empty { display: none; }
.px7-repair { display: block; font-weight: bold; color: #075e6c; }
.px7-dialog [hidden] { display: none !important; }

/* ------------------------------------------------------------- 2. auth panel */

.px8 { --px8-brand: #0b6b7a; --px8-brand-dark: #08525e; --px8-line: #d7e6ea; --px8-muted: #5c7784; }

.px8-tabs {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	padding: 4px;
	margin: 4px 0 18px;
	border-radius: 15px;
	background: #eef5f7;
	border: 1px solid var(--px8-line);
}

.px8 .px8-tab {
	position: relative;
	z-index: 1;
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 10px 12px;
	min-height: 42px;
	font-size: 14px;
	font-weight: 600;
	color: var(--px8-muted);
	transition: color .22s ease;
}

.px8 .px8-tab.is-on { color: #fff; }
.px8 .px8-tab:disabled { opacity: 1; cursor: wait; }

.px8-tab-pill {
	position: absolute;
	top: 4px;
	bottom: 4px;
	right: 4px;
	width: calc(50% - 4px);
	border-radius: 11px;
	background: linear-gradient(135deg, #0b6b7a, #0d8a8f);
	box-shadow: 0 6px 16px rgba(11, 107, 122, .25);
	transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}

.px8[data-mode="signup"] .px8-tab-pill { transform: translateX(-100%); }
.px8[data-mode="reset"] .px8-tabs { display: none; }

.px8-lede {
	font-size: 13px;
	line-height: 2;
	color: var(--px8-muted);
	margin: 0 0 16px;
}

.px8-warn {
	margin: 0 0 14px;
	padding: 11px 14px;
	border-radius: 12px;
	background: #fdf1e8;
	border: 1px solid #f3d3b6;
	color: #8b4316;
	font-size: 12px;
	line-height: 1.9;
}

.px8 .px8-field {
	display: block;
	margin: 0 0 14px;
	font-size: 13px;
}

.px8 .px8-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #24485a;
	margin-bottom: 7px;
}

.px8 .px8-label small {
	font-weight: 400;
	color: var(--px8-muted);
	font-size: 11px;
}

.px8 .px8-input {
	display: block;
	box-sizing: border-box;
	width: 100%;
	font: inherit;
	font-size: 15px;
	border: 1px solid var(--px8-line);
	background: #fff;
	border-radius: 12px;
	padding: 13px 14px;
	margin: 0;
	color: #183b48;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.px8 .px8-input::placeholder { color: #9fb4bc; }
.px8 .px8-input:hover { border-color: #b7d1d8; }

.px8 .px8-input:focus {
	outline: none;
	border-color: var(--px8-brand);
	box-shadow: 0 0 0 4px rgba(11, 107, 122, .12);
}

.px8 .px8-wrap { position: relative; display: block; }
.px8 .px8-wrap .px8-input { padding-left: 74px; }

.px8 .px8-eye {
	position: absolute;
	left: 6px;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--px8-muted);
	font-size: 12px;
	padding: 6px 10px;
	min-height: 0;
	border-radius: 8px;
}

.px8 .px8-eye:hover { color: var(--px8-brand); background: #eef5f7; }

.px8-pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.px8 .px8-check {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 12px;
	line-height: 1.9;
	color: var(--px8-muted);
	margin: 0 0 16px;
}

.px8 .px8-check input { accent-color: #0b6b7a; width: 18px; height: 18px; margin: 3px 0 0; }
.px8 .px8-check a { color: var(--px8-brand); }

.px8 .px7-captcha { margin: 4px 0 14px; }

.px8 .px7-captcha-box {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 12px;
	border: 1px dashed #c6dee5;
	border-radius: 14px;
	background: #f4fafb;
}

.px8 .px7-captcha-box img,
.px8 .px7-captcha-box svg { height: 54px; width: auto; border-radius: 8px; background: #fff; }

.px8 .px7-captcha-box input {
	flex: 1 1 110px;
	min-width: 90px;
	margin: 0;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--px8-line);
	font: inherit;
}

.px8 .px7-captcha-box small { flex: 1 1 100%; margin: 0; }

.px8 .px7-captcha-refresh {
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--px8-brand);
	font-size: 12px;
	text-decoration: underline;
	padding: 4px 6px;
	min-height: 0;
}

.px8 .px8-go {
	width: 100%;
	border: 0;
	margin: 6px 0 0;
	padding: 15px 18px;
	min-height: 52px;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	border-radius: 14px;
	background: linear-gradient(135deg, #0b6b7a, #0d8a8f);
	box-shadow: 0 10px 26px rgba(11, 107, 122, .26);
	transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.px8 .px8-go:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(11, 107, 122, .32); }
.px8 .px8-go:active:not(:disabled) { transform: translateY(0); filter: brightness(.97); }
.px8 .px8-go:disabled { opacity: .55; cursor: wait; }

.px8 .px8-link {
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--px8-brand);
	font-size: 13px;
	padding: 8px 2px;
	min-height: 0;
	border-radius: 8px;
	text-decoration: none;
}

.px8 .px8-link:hover { text-decoration: underline; }
.px8 .px8-link:disabled { color: #9fb4bc; text-decoration: none; cursor: default; }
.px8 .px8-link-wide { display: block; width: 100%; text-align: center; margin-top: 6px; }

.px8 .px8-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 14px;
}

.px8-target {
	margin: 0 0 16px;
	padding: 13px 15px;
	border-radius: 14px;
	background: #e9f4f3;
	border: 1px solid #c3e0de;
	color: #0b6b7a;
	font-size: 13px;
	line-height: 1.9;
}

/* ------------------------------------------------------------ code boxes -- */

/*
 * A code is read off a phone screen and typed once. One wide, centred,
 * monospaced field is the shape that survives that: no cells to tab between,
 * no partial paste, and a height that is easy to hit on a phone.
 */
/*
 * A code is read off a phone screen and typed once into one wide box.
 *
 * Three things this rule is doing on purpose:
 *   - nothing here is a secret, so the digits are dark, large and monospaced —
 *     a visitor has to be able to check what they typed against their phone;
 *   - `-webkit-text-security` is switched off explicitly. Some autofill
 *     heuristics and password managers see a six-digit field, decide it is a
 *     PIN, and mask it; no stylesheet of ours asks for that;
 *   - `caret-color` and a real focus ring make it obvious the box is live.
 */
.px8 .px8-codecard {
	display: block;
	margin: 0 0 16px;
	padding: 16px 18px 14px;
	border: 1px solid var(--px8-line);
	border-radius: 16px;
	background: #f7fbfc;
}

.px8 .px8-codecard .px8-label { margin-bottom: 10px; }

.px8 .px8-otp {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 280px;
	margin: 0 auto;
	padding: 12px 6px;
	border: 1.5px solid #cfe2e7;
	border-radius: 14px;
	background: #fff;
	color: #0b3b4a;
	opacity: 1;
	caret-color: var(--px8-brand);
	text-align: center;
	direction: ltr;
	font-family: "Vazirmatn", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 32px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: .3em;
	/* balances the trailing letter-spacing so the row sits dead centre */
	text-indent: .3em;
	line-height: 1.25;
	-webkit-text-security: none !important;
	text-security: none !important;
	-webkit-text-fill-color: #0b3b4a;
	transition: border-color .18s ease, box-shadow .18s ease;
}

.px8 .px8-otp::placeholder { color: #b9ced6; letter-spacing: .3em; }

.px8 .px8-otp:focus {
	outline: none;
	border-color: var(--px8-brand);
	box-shadow: 0 0 0 4px rgba(11, 107, 122, .12);
}

.px8 .px8-hint {
	display: block;
	margin: 9px 0 0;
	text-align: center;
	font-size: 11.5px;
	line-height: 1.8;
	color: var(--px8-muted);
	transition: color .18s ease;
}

/* Six digits in: the line stops counting and confirms instead. */
.px8 .px8-hint.is-full { color: #0d7d72; font-weight: 600; }

/* Two codes on one screen: one column, a real gap, nothing touching. */
.px8 .px8-dual { display: grid; grid-template-columns: 1fr; gap: 4px; }

.px8 .px8-newpass { margin: 4px 0 18px; }
.px8 .px8-newpass .px8-note { margin: 4px 0 0; }

.px8-foot {
	margin: 18px 0 0;
	padding-top: 14px;
	border-top: 1px solid rgba(185, 213, 221, .35);
	font-size: 11.5px;
	line-height: 2;
	color: #6d858f;
}

/* --------------------------------------------------------------- 3. chat ---- */

.px7-dialog #px7-chat > p { font-size: 13px; line-height: 2; color: #49616a; }
.px7-dialog label { display: block; margin: 14px 0; font-size: 14px; }

.px7-dialog textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	font: inherit;
	border: 1px solid #bfd0d6;
	background: #fff;
	border-radius: 12px;
	padding: 12px;
	margin-top: 7px;
	color: #183b48;
}

.px7-dialog input[type="checkbox"] { accent-color: #0b6b7a; width: 18px; height: 18px; }

.px7-dialog .px7-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	flex-wrap: wrap;
}

#px7-chat-form button {
	width: 100%;
	border: 0;
	margin: 6px 0 0;
	padding: 14px 18px;
	min-height: 50px;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	border-radius: 14px;
	background: linear-gradient(135deg, #0b6b7a, #0d8a8f);
	box-shadow: 0 10px 26px rgba(11, 107, 122, .26);
}

/* --------------------------------------------- 4. scroll lock and motion ---- */

/*
 * Belt and braces for the wheel: the dialog carries data-lenis-prevent so the
 * smooth scroller ignores events that start inside it, Lenis itself is parked
 * while any dialog is open, and plain pages (no Lenis) are held by this rule.
 */
.px7-scroll-lock { overflow: hidden; }

@media (max-width: 600px) {
	.px7-launch { bottom: 90px; left: 12px; font-size: 12px; }
	.px7-account { font-size: 12px; padding: 8px 10px; }
	.px7-dialog { padding: 22px 18px; border-radius: 22px; max-height: 92dvh; }
	.px7-dialog h2 { font-size: 22px; }
	.px8-pair { grid-template-columns: 1fr; }
	.px8 .px8-codecard { padding: 14px 14px 12px; }
	.px8 .px8-otp { font-size: 26px; letter-spacing: .24em; text-indent: .24em; max-width: 100%; }
	.px8 .px8-actions { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	.px7-dialog[open],
	.px7-dialog[open]::backdrop { animation: none; }
	.px8-tab-pill,
	.px8 .px8-go,
	.px8 .px8-otp { transition: none; }
	.px8 .px8-go:hover:not(:disabled) { transform: none; }
}
