/* Blue Wolf Growth Tools
 * Dark ground + electric blue accent, per the blueprint's visual system.
 * Tokens are overridable from the theme so this inherits Pixora once it lands.
 */

.bwgt-chat,
.bwgt-capture {
	--bwgt-accent: #2E7BFF;
	--bwgt-accent-soft: rgba( 46, 123, 255, 0.14 );
	--bwgt-ink: #0d1117;
	--bwgt-ink-2: #151b24;
	--bwgt-line: rgba( 255, 255, 255, 0.10 );
	--bwgt-text: #e8ecf2;
	--bwgt-muted: #9aa5b4;
	--bwgt-radius: 4px;

	font-family: inherit;
	color: var( --bwgt-text );
	box-sizing: border-box;
}

.bwgt-chat *,
.bwgt-capture * { box-sizing: inherit; }

.bwgt-sr {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	white-space: nowrap;
	border: 0;
}

/* honeypot - off-screen, not display:none (bots skip hidden fields) */
.bwgt-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 1px; width: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------------ chat */

.bwgt-chat {
	display: flex;
	flex-direction: column;
	max-width: 680px;
	background: var( --bwgt-ink );
	border: 1px solid var( --bwgt-line );
	border-radius: var( --bwgt-radius );
	overflow: hidden;
}

.bwgt-chat__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	border-bottom: 1px solid var( --bwgt-line );
	background: var( --bwgt-ink-2 );
}

.bwgt-chat__dot {
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var( --bwgt-accent );
	box-shadow: 0 0 0 4px var( --bwgt-accent-soft );
	flex: none;
}

.bwgt-chat__title {
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var( --bwgt-muted );
}

.bwgt-chat__log {
	padding: 18px;
	min-height: 260px;
	max-height: 460px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 14px;
	scroll-behavior: smooth;
}

.bwgt-msg { display: flex; }
.bwgt-msg--user { justify-content: flex-end; }

.bwgt-msg__body {
	max-width: 84%;
	padding: 11px 14px;
	border-radius: var( --bwgt-radius );
	line-height: 1.6;
	font-size: 15px;
	white-space: pre-wrap;   /* model replies use blank lines, not markup */
	word-wrap: break-word;
}

.bwgt-msg--assistant .bwgt-msg__body {
	background: var( --bwgt-ink-2 );
	border: 1px solid var( --bwgt-line );
	border-left: 2px solid var( --bwgt-accent );
}

.bwgt-msg--user .bwgt-msg__body {
	background: var( --bwgt-accent );
	color: #fff;
}

.bwgt-msg--error .bwgt-msg__body {
	background: rgba( 255, 90, 90, 0.10 );
	border: 1px solid rgba( 255, 90, 90, 0.35 );
	color: #ffb4b4;
	font-size: 14px;
}

/* typing indicator */
.bwgt-typing {
	display: flex; gap: 4px;
	padding: 14px;
	background: var( --bwgt-ink-2 );
	border: 1px solid var( --bwgt-line );
	border-left: 2px solid var( --bwgt-accent );
	border-radius: var( --bwgt-radius );
}
.bwgt-typing span {
	width: 6px; height: 6px;
	border-radius: 50%;
	background: var( --bwgt-muted );
	animation: bwgt-bounce 1.3s infinite ease-in-out;
}
.bwgt-typing span:nth-child(2) { animation-delay: 0.16s; }
.bwgt-typing span:nth-child(3) { animation-delay: 0.32s; }

@keyframes bwgt-bounce {
	0%, 70%, 100% { opacity: 0.28; transform: translateY( 0 ); }
	35%           { opacity: 1;    transform: translateY( -4px ); }
}

@media ( prefers-reduced-motion: reduce ) {
	.bwgt-typing span { animation: none; opacity: 0.6; }
	.bwgt-chat__log { scroll-behavior: auto; }
}

/* composer */
.bwgt-chat__form {
	display: flex;
	gap: 10px;
	padding: 14px;
	border-top: 1px solid var( --bwgt-line );
	background: var( --bwgt-ink-2 );
	align-items: flex-end;
}

.bwgt-chat__input {
	flex: 1;
	resize: none;
	padding: 11px 13px;
	font: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var( --bwgt-text );
	background: var( --bwgt-ink );
	border: 1px solid var( --bwgt-line );
	border-radius: var( --bwgt-radius );
	max-height: 160px;
	overflow-y: auto;
}
.bwgt-chat__input::placeholder { color: var( --bwgt-muted ); }
.bwgt-chat__input:focus {
	outline: none;
	border-color: var( --bwgt-accent );
	box-shadow: 0 0 0 3px var( --bwgt-accent-soft );
}

.bwgt-chat__send {
	flex: none;
	padding: 11px 20px;
	font: inherit;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #fff;
	background: var( --bwgt-accent );
	border: 0;
	border-radius: var( --bwgt-radius );
	cursor: pointer;
	transition: opacity 0.2s ease;
}
.bwgt-chat__send:hover { opacity: 0.88; }
.bwgt-chat__send:disabled { opacity: 0.45; cursor: not-allowed; }

/* --------------------------------------------------------------- capture */

.bwgt-capture {
	max-width: 560px;
	padding: 28px;
	background: var( --bwgt-ink );
	border: 1px solid var( --bwgt-line );
	border-radius: var( --bwgt-radius );
}

.bwgt-capture__heading {
	margin: 0 0 8px;
	font-size: 26px;
	line-height: 1.2;
	color: var( --bwgt-text );
}

.bwgt-capture__text {
	margin: 0 0 20px;
	color: var( --bwgt-muted );
	line-height: 1.6;
}

.bwgt-capture__form { display: flex; flex-direction: column; gap: 10px; }

.bwgt-capture__form input {
	padding: 12px 14px;
	font: inherit;
	color: var( --bwgt-text );
	background: var( --bwgt-ink-2 );
	border: 1px solid var( --bwgt-line );
	border-radius: var( --bwgt-radius );
}
.bwgt-capture__form input::placeholder { color: var( --bwgt-muted ); }
.bwgt-capture__form input:focus {
	outline: none;
	border-color: var( --bwgt-accent );
	box-shadow: 0 0 0 3px var( --bwgt-accent-soft );
}

.bwgt-capture__form button {
	margin-top: 4px;
	padding: 13px 22px;
	font: inherit;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #fff;
	background: var( --bwgt-accent );
	border: 0;
	border-radius: var( --bwgt-radius );
	cursor: pointer;
	transition: opacity 0.2s ease;
}
.bwgt-capture__form button:hover { opacity: 0.88; }
.bwgt-capture__form button:disabled { opacity: 0.45; cursor: not-allowed; }

.bwgt-capture__status {
	margin: 6px 0 0;
	font-size: 14px;
	min-height: 20px;
	color: var( --bwgt-muted );
}
.bwgt-capture__status.is-ok    { color: #6ee7a8; }
.bwgt-capture__status.is-error { color: #ffb4b4; }

@media ( max-width: 600px ) {
	.bwgt-capture { padding: 20px; }
	.bwgt-chat__log { max-height: 60vh; }
	.bwgt-msg__body { max-width: 92%; }
}


/* ---------------------------------------------------------- newsletter */

.bwgt-news {
	--bwgt-accent: #FC6024;
	--bwgt-accent-soft: rgba(252,96,36,.14);
	--bwgt-ink: #050A16;
	--bwgt-ink-2: #08122A;
	--bwgt-line: rgba(156,192,204,.13);
	--bwgt-text: #E6EDF5;
	--bwgt-muted: #8FA3BC;
	--bwgt-radius: 0px;

	padding: 28px;
	background: var( --bwgt-ink-2 );
	border: 1px solid var( --bwgt-line );
	color: var( --bwgt-text );
	max-width: 620px;
	box-sizing: border-box;
}
.bwgt-news__h { margin: 0 0 8px; font-size: 1.4rem; line-height: 1.2; }
.bwgt-news__t { margin: 0 0 18px; color: var( --bwgt-muted ); font-size: 15px; }

.bwgt-news__form { display: flex; flex-wrap: wrap; gap: 10px; }
.bwgt-news__form input {
	flex: 1 1 190px;
	padding: 12px 14px; font: inherit;
	color: var( --bwgt-text );
	background: var( --bwgt-ink );
	border: 1px solid var( --bwgt-line );
}
.bwgt-news__form input::placeholder { color: var( --bwgt-muted ); }
.bwgt-news__form input:focus {
	outline: none; border-color: var( --bwgt-accent );
	box-shadow: 0 0 0 3px var( --bwgt-accent-soft );
}
.bwgt-news__form button {
	flex: none;
	padding: 12px 24px; font: inherit;
	font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
	color: #fff; background: var( --bwgt-accent ); border: 0; cursor: pointer;
	transition: opacity .2s ease;
}
.bwgt-news__form button:hover { opacity: .88; }
.bwgt-news__form button:disabled { opacity: .45; cursor: not-allowed; }
.bwgt-news__form .bwgt-capture__status { flex: 1 0 100%; margin: 2px 0 0; }

@media ( max-width: 560px ) {
	.bwgt-news { padding: 20px; }
	.bwgt-news__form input, .bwgt-news__form button { flex: 1 1 100%; }
}

/* ---------------------------------------------------------------------------
   Full contact form - [bluewolf_contact]
   Inherits the theme's tokens where they exist so the form does not read as a
   bolted-on plugin widget; falls back to literals if the theme changes.
   -------------------------------------------------------------------------- */
.bwgt-form { display: grid; gap: 18px; }

.bwgt-row {
	display: grid;
	gap: 18px;
	grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) {
	.bwgt-row { grid-template-columns: 1fr; }
}

.bwgt-field { display: grid; gap: 7px; min-width: 0; }

.bwgt-field label {
	font-family: var(--mono, ui-monospace, monospace);
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--dim, #8fa0bd);
}
.bwgt-req { color: var(--accent, #1a6dff); }

.bwgt-field input,
.bwgt-field select,
.bwgt-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 13px 14px;
	font: inherit;
	font-size: 15px;
	color: var(--paper, #e8eefc);
	background: rgba(255, 255, 255, .035);
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 0;
	transition: border-color .15s ease, background .15s ease;
	/* iOS zooms the page when a focused control is under 16px; 15px is safe
	   because the mobile bump below lifts it to 16px. */
}
.bwgt-field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }

/* Native select arrow is unstyleable across browsers, so draw our own. */
.bwgt-field select {
	appearance: none;
	-webkit-appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, var(--dim, #8fa0bd) 50%),
	                  linear-gradient(135deg, var(--dim, #8fa0bd) 50%, transparent 50%);
	background-position: calc(100% - 19px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 40px;
}
/* Options render in the OS menu, which uses the system palette - force a
   readable pair or dark-theme browsers show white-on-white. */
.bwgt-field select option { color: #10151f; background: #fff; }

.bwgt-field input:focus,
.bwgt-field select:focus,
.bwgt-field textarea:focus {
	outline: 2px solid var(--accent, #1a6dff);
	outline-offset: 1px;
	border-color: transparent;
	background: rgba(255, 255, 255, .06);
}
.bwgt-field input::placeholder,
.bwgt-field textarea::placeholder { color: rgba(232, 238, 252, .34); }

.bwgt-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 4px;
}
.bwgt-contact .bwgt-actions button { flex: 0 0 auto; }

@media (max-width: 640px) {
	.bwgt-field input,
	.bwgt-field select,
	.bwgt-field textarea { font-size: 16px; }
	.bwgt-actions button { width: 100%; }
}

/* The button styling above is scoped to .bwgt-capture__form, which the full
   contact form does not use - without this it falls back to the default
   browser button. Reuses the same tokens rather than redefining them. */
.bwgt-form button[type="submit"] {
	padding: 14px 26px;
	font: inherit;
	font-size: 12px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #fff;
	background: var( --bwgt-accent, #2E7BFF );
	border: 0;
	border-radius: var( --bwgt-radius, 0 );
	cursor: pointer;
	transition: opacity .2s ease;
}
.bwgt-form button[type="submit"]:hover    { opacity: .88; }
.bwgt-form button[type="submit"]:disabled { opacity: .45; cursor: not-allowed; }

/* Six fields in two columns need more room than the 560px newsletter box. */
.bwgt-contact { max-width: 720px; }

/* Align the field chrome to the component's own tokens. */
.bwgt-contact .bwgt-field label { color: var( --bwgt-muted, #8fa0bd ); }
.bwgt-contact .bwgt-field input,
.bwgt-contact .bwgt-field select,
.bwgt-contact .bwgt-field textarea {
	color: var( --bwgt-text, #e8ecf2 );
	border-color: var( --bwgt-line, rgba(255,255,255,.10) );
	border-radius: var( --bwgt-radius, 0 );
}
.bwgt-contact .bwgt-req { color: var( --bwgt-accent, #2E7BFF ); }
