/**
 * Speaker Co-Pilot public mode (v0.7.314).
 *
 * E*TRADE theme values per the help-window spec: white surfaces,
 * deep navy #1F4E82 primary (hover #1A4170), steel #2F6DB3
 * secondary (hover #27619E), header #0D2B6C, square boxes with a
 * 4px radius and #C3CEDA borders, pill buttons. While the cookie
 * banner is visible the shell offsets by the banner height
 * (--spp-consent-h, published by consent.js) and stays above it.
 */

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

/* Launcher: a pill-clear primary, one silhouette (spec 3.1). */
.spp-copub-launcher {
	position: fixed;
	right: 20px;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	height: 52px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 22px;
	background: #1F4E82;
	color: #FFFFFF;
	border: 0;
	border-radius: 999px;
	font: 700 15px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	cursor: pointer;
	box-shadow: 0 10px 24px rgba(13, 43, 108, .28);
	z-index: 99995;
}
.spp-copub-launcher:hover { background: #1A4170; }
.spp-copub-launcher:focus-visible {
	outline: 3px solid #2F6DB3;
	outline-offset: 2px;
}
.spp-copub-launcher .spp-copub-launcher-compact { display: none; }
.spp-copub-launcher.spp-copub-launcher-hide { display: none; }

/* While the consent banner is up, the launcher rides above it. */
body.spp-consent-visible .spp-copub-launcher {
	bottom: calc(var(--spp-consent-h, 0px) + 16px + env(safe-area-inset-bottom, 0px));
}

/* Panel: a square contemporary box, 360px on desktop, a bottom
   sheet on small screens (spec 3.2). */
.spp-copub {
	position: fixed;
	display: flex;
	flex-direction: column;
	background: #FFFFFF;
	border: 1px solid #C3CEDA;
	border-radius: 4px;
	box-shadow: 0 18px 48px rgba(13, 43, 108, .22);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #3B4A68;
	z-index: 99996;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.spp-copub.spp-copub-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}
@media (min-width: 940px) {
	.spp-copub {
		width: 360px;
		max-width: calc(100vw - 48px);
		right: 24px;
		bottom: 24px;
		height: min(600px, calc(100dvh - 48px));
		transform: translateY(8px);
	}
	.spp-copub.spp-copub-open { transform: none; }
	body.spp-consent-visible .spp-copub {
		bottom: calc(var(--spp-consent-h, 0px) + 16px);
	}
}
@media (max-width: 939.98px) {
	.spp-copub {
		left: 0;
		right: 0;
		bottom: 0;
		height: min(76dvh, 640px);
		border-radius: 4px 4px 0 0;
		border-bottom: 0;
		transform: translateY(102%);
	}
	.spp-copub.spp-copub-open { transform: none; }
	body.spp-consent-visible .spp-copub {
		bottom: var(--spp-consent-h, 0px);
	}
}
@media (max-width: 640px) {
	.spp-copub-launcher {
		right: 16px;
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
		padding: 0 18px;
	}
	body.spp-consent-visible .spp-copub-launcher {
		bottom: calc(var(--spp-consent-h, 0px) + 16px + env(safe-area-inset-bottom, 0px));
	}
	.spp-copub-launcher .spp-copub-launcher-full { display: none; }
	.spp-copub-launcher .spp-copub-launcher-compact { display: inline; }
}

.spp-copub-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: #0D2B6C;
	color: #FFFFFF;
	padding: 12px 8px 12px 16px;
	border-radius: 3px 3px 0 0;
}
.spp-copub-headtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spp-copub-title { font-size: 16px; font-weight: 700; line-height: 1.25; }
.spp-copub-sub { font-size: 12.5px; line-height: 1.3; opacity: .85; }
.spp-copub-close {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	border-radius: 4px;
	color: #FFFFFF;
	cursor: pointer;
}
.spp-copub-close:hover { background: rgba(255, 255, 255, .14); }
.spp-copub-close:focus-visible,
.spp-copub button:focus-visible,
.spp-copub input:focus-visible,
.spp-copub textarea:focus-visible {
	outline: 3px solid #2F6DB3;
	outline-offset: 2px;
}

.spp-copub-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}
.spp-copub-msgs {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
}
.spp-copub-msg { margin-bottom: 12px; }
.spp-copub-msg:last-child { margin-bottom: 0; }
.spp-copub-bubble {
	display: inline-block;
	max-width: 92%;
	padding: 10px 12px;
	border-radius: 4px;
	font-size: 15px;
	line-height: 1.55;
	word-wrap: break-word;
}
.spp-copub-msg-bot .spp-copub-bubble {
	background: #F1F5FE;
	border: 1px solid #D8E2F7;
	color: #3B4A68;
}
.spp-copub-msg-user { text-align: right; }
.spp-copub-msg-user .spp-copub-bubble {
	background: #1F4E82;
	color: #FFFFFF;
	text-align: left;
}
.spp-copub-msg-typing .spp-copub-bubble { color: #64748B; }

/* The one page card and the one CTA under an answer (spec 4.5). */
.spp-copub-page {
	margin-top: 8px;
	background: #FFFFFF;
	border: 1px solid #C3CEDA;
	border-radius: 4px;
	padding: 12px;
}
.spp-copub-page a {
	color: #1F4E82;
	font-weight: 700;
	text-decoration: none;
	font-size: 15px;
}
.spp-copub-page a:hover { text-decoration: underline; }
.spp-copub-page p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: #3B4A68; }
.spp-copub-cta {
	display: inline-block;
	margin-top: 8px;
	padding: 10px 18px;
	background: #1F4E82;
	color: #FFFFFF;
	border: 0;
	border-radius: 999px;
	font: 700 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	text-decoration: none;
	cursor: pointer;
}
.spp-copub-cta:hover { background: #1A4170; color: #FFFFFF; }
.spp-copub-gap {
	display: inline-block;
	margin-top: 8px;
	padding: 4px 2px;
	background: none;
	border: 0;
	color: #3B4A68;
	font-size: 12.5px;
	text-decoration: underline;
	cursor: pointer;
}

/* Contextual chips: a quiet starter set, gone after the first ask.
   v0.7.347 (bubble symmetry): the set renders as a 2x2 grid; every
   chip shares the same width (1fr columns) and the same height
   (1fr rows sized by the tallest chip), so no row sits uneven. */
.spp-copub-chips {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-auto-rows: 1fr;
	gap: 8px;
	padding: 0 16px 12px;
}
.spp-copub-chips:empty { display: none; }
.spp-copub-chips button {
	width: 100%;
	height: 100%;
	padding: 8px 12px;
	background: #FFFFFF;
	border: 1px solid #C3CEDA;
	border-radius: 999px;
	color: #0D2B6C;
	font-size: 13.5px;
	line-height: 1.3;
	cursor: pointer;
}
.spp-copub-chips button:hover { background: #F1F5FE; }

.spp-copub-form {
	display: flex;
	gap: 8px;
	padding: 12px 16px 16px;
	border-top: 1px solid #D8E2F7;
}
.spp-copub-form input {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	padding: 0 12px;
	border: 1px solid #C3CEDA;
	border-radius: 4px;
	font-size: 15px;
	color: #22304D;
	background: #FFFFFF;
}
.spp-copub-form button {
	flex: 0 0 auto;
	height: 44px;
	padding: 0 18px;
	background: #1F4E82;
	color: #FFFFFF;
	border: 0;
	border-radius: 999px;
	font: 700 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	cursor: pointer;
}
.spp-copub-form button:hover { background: #1A4170; }
.spp-copub-form button:disabled { opacity: .55; cursor: default; }

/* The Send-to-the-team mini-form (spec 6.4). */
.spp-copub-ticket {
	padding: 4px 16px 16px;
	border-top: 1px solid #D8E2F7;
	overflow-y: auto;
}
.spp-copub-ticket-title { margin: 12px 0 10px; font-size: 15px; font-weight: 700; color: #0D2B6C; }
.spp-copub-field { display: block; margin-bottom: 10px; }
.spp-copub-field span { display: block; margin-bottom: 4px; font-size: 13px; color: #3B4A68; }
.spp-copub-field input,
.spp-copub-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #C3CEDA;
	border-radius: 4px;
	font-size: 15px;
	line-height: 1.45;
	color: #22304D;
	background: #FFFFFF;
}
.spp-copub-ticket-help { margin: -4px 0 10px; font-size: 12.5px; color: #64748B; }
.spp-copub-ticket-actions { display: flex; gap: 8px; }
.spp-copub-ticket-actions button {
	flex: 1 1 0;
	height: 44px;
	padding: 0 12px;
	border: 0;
	border-radius: 999px;
	font: 700 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	cursor: pointer;
}
#spp-copub-ticket-send { background: #1F4E82; color: #FFFFFF; }
#spp-copub-ticket-send:hover { background: #1A4170; }
#spp-copub-ticket-send:disabled { opacity: .55; cursor: default; }
#spp-copub-ticket-cancel { background: #2F6DB3; color: #FFFFFF; }
#spp-copub-ticket-cancel:hover { background: #27619E; }
.spp-copub-ticket-status { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: #3B4A68; }
.spp-copub-ticket-status a { color: #1F4E82; font-weight: 700; }

/* v0.7.377: at mobile widths the launcher stops floating over
   the first screen (Speed Queen SQ-1103-2, the 390 half: the
   52px pill sat at y776-828 of an 844px screen, on the hero's
   lower corner). It docks to the bottom edge of the viewport
   instead: a small tab, 44px tall, bottom-right, its bottom
   edge flush with the screen edge and its top edge below the
   first screen's content, in the compact label at every width
   in this band. Appended last so it wins its ties against the
   base and max-width:640px launcher rules above. While the
   consent banner is visible, the higher-specificity
   body.spp-consent-visible rule still lifts the launcher
   above the banner, exactly as before; the dock applies once
   the banner is gone. Desktop is untouched. */
@media (max-width: 700px) {
	.spp-copub-launcher {
		right: 12px;
		bottom: 0;
		height: 44px;
		padding: 0 16px;
		border-radius: 14px 14px 0 0;
		box-shadow: 0 -4px 18px rgba(13, 43, 108, .18);
		font-size: 13.5px;
		gap: 6px;
	}
	.spp-copub-launcher .spp-copub-launcher-full { display: none; }
	.spp-copub-launcher .spp-copub-launcher-compact { display: inline; }
}
