/* Cup Series Q&A Bot: right-edge slide-out panel */
.csb {
	--csb-navy-900: var(--cs-navy-900, #04091a);
	--csb-navy-850: var(--cs-navy-850, #061027);
	--csb-navy-700: var(--cs-navy-700, #0b1f44);
	--csb-navy-600: var(--cs-navy-600, #102a58);
	--csb-gold: var(--cs-gold, #f2b01e);
	--csb-gold-dark: var(--cs-gold-dark, #d3960d);
	--csb-light: var(--cs-light, #f3f5f8);
	--csb-ink: var(--cs-ink, #0b1f44);
	--csb-ink-soft: var(--cs-ink-soft, #4a5a76);
	--csb-on-dark-soft: var(--cs-on-dark-soft, #a8b8d1);
	--csb-line: var(--cs-line-light, rgba(11, 31, 68, 0.12));
	--csb-display: var(--cs-display, 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif);
	--csb-body: var(--cs-body, 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif);
	--csb-w: min(380px, calc(100vw - 52px));
	--csb-h: min(580px, calc(100vh - 120px));

	position: fixed;
	right: 0;
	top: 50%;
	z-index: 99990;
	display: flex;
	align-items: center;
	transform: translate(var(--csb-w), -50%);
	transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
	font-family: var(--csb-body);
	font-size: 14px;
	line-height: 1.5;
	color: var(--csb-ink);
	pointer-events: none;
}
.csb[data-open="true"] {
	transform: translate(0, -50%);
}
.csb *,
.csb *::before,
.csb *::after {
	box-sizing: border-box;
}
.csb button,
.csb input,
.csb textarea {
	font-family: inherit;
	font-size: inherit;
	letter-spacing: normal;
	text-transform: none;
	margin: 0;
	min-height: 0;
	box-shadow: none;
}
.csb p {
	margin: 0;
}

/* ---- edge tab ---- */
.csb .csb-tab {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 16px 9px 18px;
	border: 0;
	border-radius: 12px 0 0 12px;
	background: var(--csb-gold);
	color: var(--csb-navy-900);
	cursor: pointer;
	box-shadow: -6px 8px 24px rgba(4, 9, 26, 0.28);
	transition: background-color 0.2s ease, padding 0.2s ease;
	align-self: center;
}
.csb .csb-tab:hover {
	background: var(--csb-gold-dark);
	padding-right: 12px;
}
.csb .csb-tab:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -6px;
}
.csb-tab__icon {
	display: block;
	width: 22px;
	height: 22px;
}
.csb-tab__icon svg {
	display: block;
	width: 100%;
	height: 100%;
}
.csb-tab__label {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-family: var(--csb-display);
	font-weight: 700;
	font-size: 17px;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* ---- panel ---- */
.csb-panel {
	pointer-events: auto;
	width: var(--csb-w);
	height: var(--csb-h);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 14px 0 0 14px;
	box-shadow: -10px 16px 48px rgba(4, 9, 26, 0.35);
	overflow: hidden;
	visibility: hidden;
	transition: visibility 0s linear 0.38s;
}
.csb[data-open="true"] .csb-panel {
	visibility: visible;
	transition: visibility 0s linear 0s;
}

.csb-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 12px 14px 16px;
	background: linear-gradient(135deg, var(--csb-navy-850) 0%, var(--csb-navy-600) 100%);
	color: #fff;
	border-bottom: 3px solid var(--csb-gold);
}
.csb-head__logo {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
	object-fit: contain;
	flex: none;
}
.csb-head__text {
	flex: 1;
	min-width: 0;
}
.csb .csb-head__title {
	font-family: var(--csb-display);
	font-weight: 700;
	font-size: 22px;
	line-height: 1.05;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
}
.csb .csb-head__sub {
	font-size: 12.5px;
	color: var(--csb-on-dark-soft);
	margin-top: 2px;
}
.csb .csb-close {
	flex: none;
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	cursor: pointer;
	padding: 0;
}
.csb .csb-close:hover {
	background: rgba(255, 255, 255, 0.16);
}
.csb .csb-close svg {
	width: 18px;
	height: 18px;
}
.csb .csb-close:focus-visible {
	outline: 2px solid var(--csb-gold);
	outline-offset: 2px;
}

/* ---- conversation ---- */
.csb-log {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px 14px 8px;
	background: var(--csb-light);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.csb-msg {
	display: flex;
}
.csb-msg--me {
	justify-content: flex-end;
}
.csb-bubble {
	max-width: 88%;
	padding: 10px 13px;
	border-radius: 14px 14px 14px 4px;
	background: #fff;
	border: 1px solid var(--csb-line);
	color: var(--csb-ink);
	word-wrap: break-word;
}
.csb-msg--me .csb-bubble {
	background: var(--csb-navy-700);
	border-color: var(--csb-navy-700);
	color: #fff;
	border-radius: 14px 14px 4px 14px;
}
.csb-bubble p + p,
.csb-bubble p + ul,
.csb-bubble ul + p {
	margin-top: 6px;
}
.csb-bubble ul {
	margin: 4px 0 0;
	padding-left: 18px;
}
.csb-bubble li {
	margin: 2px 0;
}
.csb-bubble a {
	color: var(--csb-navy-600);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.csb .csb-more {
	display: inline-block;
	margin-top: 8px;
	font-weight: 600;
	color: var(--csb-navy-600);
}
.csb-actions {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px dashed var(--csb-line);
}
.csb .csb-askteam {
	border: 0;
	padding: 0;
	background: none;
	color: var(--csb-ink-soft);
	font-size: 12.5px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}
.csb .csb-askteam:hover {
	color: var(--csb-ink);
}

/* chips */
.csb-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-left: 2px;
}
.csb .csb-chips__label {
	width: 100%;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--csb-ink-soft);
	margin: 2px 0 0;
}
.csb .csb-chip {
	border: 1px solid rgba(11, 31, 68, 0.18);
	background: #fff;
	color: var(--csb-ink);
	border-radius: 999px;
	padding: 7px 12px;
	font-size: 13px;
	line-height: 1.25;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}
.csb .csb-chip:hover {
	border-color: var(--csb-gold);
	background: #fffaf0;
}
.csb .csb-chip:focus-visible,
.csb .csb-askteam:focus-visible,
.csb .csb-more:focus-visible {
	outline: 2px solid var(--csb-navy-600);
	outline-offset: 2px;
}

/* typing indicator */
.csb-typing .csb-bubble {
	display: flex;
	gap: 4px;
	padding: 12px 14px;
}
.csb-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--csb-ink-soft);
	opacity: 0.4;
	animation: csb-dot 1s infinite ease-in-out;
}
.csb-typing span:nth-child(2) { animation-delay: 0.15s; }
.csb-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes csb-dot {
	0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-3px); }
}

/* ---- input row ---- */
.csb-form {
	display: flex;
	gap: 8px;
	padding: 10px 12px;
	background: #fff;
	border-top: 1px solid var(--csb-line);
}
.csb .csb-input {
	flex: 1;
	min-width: 0;
	height: 44px;
	padding: 0 14px;
	border: 1px solid rgba(11, 31, 68, 0.2);
	border-radius: 999px;
	background: #fff;
	color: var(--csb-ink);
	font-size: 15px;
	outline: none;
}
.csb .csb-input:focus {
	border-color: var(--csb-navy-600);
	box-shadow: 0 0 0 3px rgba(16, 42, 88, 0.15);
}
.csb .csb-send {
	flex: none;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: var(--csb-gold);
	color: var(--csb-navy-900);
	cursor: pointer;
	padding: 0;
}
.csb .csb-send:hover {
	background: var(--csb-gold-dark);
}
.csb .csb-send:focus-visible {
	outline: 2px solid var(--csb-navy-600);
	outline-offset: 2px;
}
.csb .csb-send svg {
	width: 20px;
	height: 20px;
}
.csb .csb-foot {
	padding: 0 12px 10px;
	background: #fff;
	font-size: 11.5px;
	color: var(--csb-ink-soft);
	text-align: center;
}
.csb-foot a {
	color: var(--csb-ink-soft);
	text-decoration: underline;
}

/* ---- lead form ---- */
.csb-lead .csb-bubble {
	max-width: 100%;
	width: 100%;
	border-radius: 14px;
}
.csb .csb-lead__title {
	font-family: var(--csb-display);
	font-weight: 700;
	font-size: 18px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.csb .csb-lead__intro {
	font-size: 13px;
	color: var(--csb-ink-soft);
	margin: 2px 0 8px;
}
.csb-lead__form label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	margin: 8px 0 3px;
	color: var(--csb-ink);
}
.csb-lead__form label span {
	font-weight: 400;
	color: var(--csb-ink-soft);
}
.csb-lead__form input,
.csb-lead__form textarea {
	display: block;
	width: 100%;
	padding: 9px 11px;
	border: 1px solid rgba(11, 31, 68, 0.22);
	border-radius: 8px;
	background: #fff;
	color: var(--csb-ink);
	font-size: 14px;
	line-height: 1.4;
}
.csb-lead__form input:focus,
.csb-lead__form textarea:focus {
	outline: none;
	border-color: var(--csb-navy-600);
	box-shadow: 0 0 0 3px rgba(16, 42, 88, 0.15);
}
.csb-lead__form textarea {
	resize: vertical;
	min-height: 70px;
}
.csb .csb-lead__submit {
	width: 100%;
	margin-top: 12px;
	padding: 11px 14px;
	border: 0;
	border-radius: 999px;
	background: var(--csb-gold);
	color: var(--csb-navy-900);
	font-weight: 700;
	cursor: pointer;
}
.csb .csb-lead__submit:hover {
	background: var(--csb-gold-dark);
}
.csb .csb-lead__submit:disabled {
	opacity: 0.6;
	cursor: wait;
}
.csb .csb-lead__error {
	margin-top: 8px;
	font-size: 12.5px;
	color: #b3261e;
}
.csb .csb-lead__privacy {
	margin-top: 8px;
	font-size: 11px;
	color: var(--csb-ink-soft);
	text-align: center;
}
.csb-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.csb-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---- small screens ---- */
@media (max-width: 600px) {
	.csb {
		--csb-w: calc(100vw - 40px);
		--csb-h: min(620px, calc(100vh - 130px));
		top: calc(50% + 28px); /* keep the open panel clear of the site header */
	}
	@supports (height: 100dvh) {
		.csb {
			--csb-h: min(620px, calc(100dvh - 130px));
		}
	}
	.csb .csb-tab {
		gap: 8px;
		padding: 12px 7px 14px;
		border-radius: 10px 0 0 10px;
	}
	.csb-tab__icon {
		width: 18px;
		height: 18px;
	}
	.csb-tab__label {
		font-size: 14px;
	}
	.csb .csb-input {
		font-size: 16px; /* stops iOS zooming into the field */
	}
}

@media (prefers-reduced-motion: reduce) {
	.csb,
	.csb-panel {
		transition: none;
	}
	.csb-typing span {
		animation: none;
	}
}

@media print {
	.csb {
		display: none !important;
	}
}
