@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap');

body,
html {
	height: 100%;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

body {
	position: relative;
	color: #eef1f6;
	background: #050608;
	font-family: 'IBM Plex Mono', monospace;
}

* {
	font-family: inherit;
}

.bg-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background:
		linear-gradient(
			120deg,
			rgba(1, 33, 105, 0.9) 0%,
			rgba(20, 36, 120, 0.7) 20%,
			rgba(255, 255, 255, 0.12) 40%,
			rgba(200, 16, 46, 0.45) 60%,
			rgba(200, 16, 46, 0.7) 75%,
			rgba(1, 33, 105, 0.92) 100%
		),
		radial-gradient(
			circle at 15% 20%,
			rgba(255, 255, 255, 0.08),
			transparent 45%
		),
		radial-gradient(
			circle at 85% 30%,
			rgba(200, 16, 46, 0.35),
			transparent 55%
		),
		radial-gradient(
			circle at 55% 75%,
			rgba(1, 33, 105, 0.35),
			transparent 55%
		);
	background-size: 260% 260%;
	z-index: 1;
	animation: british-wave 18s ease-in-out infinite;
}

.bg-overlay::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.25);
	pointer-events: none;
}

.site-shell {
	position: relative;
	z-index: 2;
}

.chat {
	padding-top: 40px;
}

.contact-form {
	margin-top: 20px;
}

.ticker {
	margin: 6px 0;
	overflow: hidden;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	padding: 5px 0;
}

.ticker-block {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
	max-width: 240px;
	margin: 0 auto;
	animation: dropBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dropBounce {
	0% {
		opacity: 0;
		transform: translateY(-80px);
	}
	60% {
		opacity: 1;
		transform: translateY(8px);
	}
	80% {
		transform: translateY(-4px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

.ticker-label,
.ticker-pledge {
	font-size: 0.68rem;
	letter-spacing: 0.28em;
	color: rgba(255, 255, 255, 0.7);
	text-align: center;
	width: 100%;
}

.ticker-label {
	font-size: 1.85rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.ticker-pledge {
	letter-spacing: 0.32em;
	color: rgba(255, 255, 255, 0.55);
}

.ticker-track {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	white-space: nowrap;
	animation: ticker-scroll 12s linear infinite;
}

.ticker {
	width: 100%;
}

.ticker-item {
	font-size: 0.6rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}

.ticker-divider {
	font-size: 0.6rem;
}

.ticker-divider {
	color: rgba(255, 255, 255, 0.35);
}

.ticker-green {
	color: #27d17f;
	text-shadow: 0 0 10px rgba(39, 209, 127, 0.35);
}

.ticker-red {
	color: #e34a4a;
	text-shadow: 0 0 10px rgba(227, 74, 74, 0.35);
}

.contact-form label {
	font-weight: 600;
}

#root {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow-y: auto;
	height: 100%;
	/* padding: 10px; */
}

.message {
	margin-bottom: 10px;
	display: flex;
	gap: 12px;
}

.message .user {
	font-weight: 600;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: rgba(255, 255, 255, 0.5);
	min-width: 80px;
	text-align: right;
	flex-shrink: 0;
}

.message .ten.columns {
	flex: 1;
	width: auto;
	margin-left: 0;
}

.message .remove {
	position: absolute;
	width: 22px;
	height: 20px;
	left: -60px;
	/* display: "block", */
	display: none;
	padding: 0;
	line-height: 18px;
	border: "none";
}

.send-message {
	padding: 0;
}

input.my-input-text,
input.contact-input,
input.u-full-width {
	transition:
		box-shadow 220ms ease,
		border-color 220ms ease;
	background-color: rgba(12, 16, 24, 0.3);
	color: #eef1f6;
	border-color: rgba(255, 255, 255, 0.2);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

input.my-input-text.chat-input-ready {
	background-color: rgba(6, 8, 12, 0.18);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

input.my-input-text:focus,
input.contact-input:focus,
input.u-full-width:focus {
	outline: none;
	border-color: rgba(205, 175, 115, 0.75);
	box-shadow:
		0 0 0 2px rgba(205, 175, 115, 0.18),
		0 0 12px rgba(90, 160, 255, 0.22),
		0 0 20px rgba(255, 140, 90, 0.16),
		0 0 30px rgba(120, 220, 180, 0.18);
}

input.my-input-text::placeholder,
input.contact-input::placeholder,
input.u-full-width::placeholder {
	color: #ccc;
}

.chat-banner {
	margin: 6px 0 14px;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.join-notice {
	margin: 0 0 12px;
	font-size: 0.78rem;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
}

.chat-banner-actions {
	display: flex;
	justify-content: flex-end;
}

.action-link {
	font-size: 0.7rem;
	text-transform: lowercase;
	letter-spacing: 0.15em;
	color: rgba(255, 255, 255, 0.45);
	cursor: pointer;
	transition: color 200ms ease, text-shadow 200ms ease;
}

.action-link:hover {
	color: rgba(255, 255, 255, 0.8);
	text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.message.assistant {
	background: rgba(8, 10, 14, 0.25);
	border-radius: 4px;
	padding: 4px 6px;
	color: #eef1f6;
}

.message.assistant .user {
	color: rgba(255, 255, 255, 0.75);
}

.typing-indicator {
	margin: 4px 0 10px;
	font-size: 0.9rem;
	color: #666;
}

.typing-dots span {
	display: inline-block;
	margin-left: 2px;
	animation: typing-dot 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
	animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
	animation-delay: 0.4s;
}

.contact-input-shell {
	position: relative;
}

.contact-send-overlay {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.28em;
	color: rgba(255, 255, 255, 0.6);
	pointer-events: none;
	text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

input.contact-input-ready {
	box-shadow:
		0 0 14px rgba(200, 16, 46, 0.25),
		0 0 20px rgba(1, 33, 105, 0.28),
		0 0 28px rgba(255, 255, 255, 0.16);
	animation: input-ready-glow 2.6s ease-in-out infinite;
}

@keyframes typing-dot {
	0%,
	80%,
	100% {
		opacity: 0.2;
		transform: translateY(0);
	}
	40% {
		opacity: 1;
		transform: translateY(-2px);
	}
}

@keyframes ticker-scroll {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

@keyframes british-wave {
	0% {
		background-position: 0% 50%;
		filter: blur(0px);
		opacity: 0.78;
	}
	50% {
		background-position: 100% 50%;
		filter: blur(0.6px);
		opacity: 1;
	}
	100% {
		background-position: 0% 50%;
		filter: blur(0px);
		opacity: 0.8;
	}
}



.chat-input-ready {
	box-shadow:
		0 0 14px rgba(200, 16, 46, 0.25),
		0 0 20px rgba(1, 33, 105, 0.28),
		0 0 28px rgba(255, 255, 255, 0.16);
	animation: input-ready-glow 2.6s ease-in-out infinite;
}

@keyframes start-chat-glow {
	0%,
	100% {
		filter: brightness(1);
	}
	50% {
		filter: brightness(1.08);
	}
}

@keyframes input-ready-glow {
	0%,
	100% {
		box-shadow:
			0 0 10px rgba(200, 16, 46, 0.18),
			0 0 16px rgba(1, 33, 105, 0.2),
			0 0 22px rgba(255, 255, 255, 0.12);
	}
	50% {
		box-shadow:
			0 0 16px rgba(200, 16, 46, 0.3),
			0 0 26px rgba(1, 33, 105, 0.3),
			0 0 30px rgba(255, 255, 255, 0.2);
	}
}

@media (max-width: 720px) {
	body {
		display: block;
	}

	.site-shell {
		width: 92%;
		height: auto;
	}

	.site-shell > .row {
		height: auto;
	}

	.site-shell .one-third.column {
		margin-top: 18px !important;
	}

	.site-shell .two-thirds.column {
		margin-top: 18px;
	}

	.ticker-block {
		max-width: 220px;
	}

	.chat {
		padding-top: 24px;
	}

	.chat-banner {
		font-size: 0.85rem;
	}

	.chat-banner-actions {
		justify-content: flex-start;
		margin-top: 8px;
	}

	.join-notice {
		font-size: 0.7rem;
		letter-spacing: 0.22em;
	}

	.message {
		font-size: 0.95rem;
	}

	.message .user {
		text-align: left;
		margin-bottom: 4px;
	}

	.typing-indicator {
		font-size: 0.8rem;
	}

	input.my-input-text,
	input.contact-input,
	input.u-full-width {
		font-size: 1rem;
	}

	.send-message {
		width: 100% !important;
		margin-top: 8px;
	}
}

.typewriter-cursor {
	animation: blink 0.7s infinite;
	font-weight: 300;
	color: rgba(255, 255, 255, 0.7);
}

@keyframes blink {
	0%, 50% { opacity: 1; }
	51%, 100% { opacity: 0; }
}

.typewriter-complete {
	/* Optional: add subtle glow when complete */
}

.form-hidden {
	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
}

.form-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
	transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Progress dots */
.progress-dots {
	display: flex;
	justify-content: center;
	gap: 4px;
	margin-bottom: 12px;
}

.progress-dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	transition: all 0.3s ease;
}

.progress-dot.active {
	background: rgba(255, 255, 255, 0.7);
	box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.progress-dot.completed {
	background: #27d17f;
}

/* Messages container */
.messages-container {
	flex: 1;
	overflow-y: auto;
	scroll-behavior: smooth;
	padding-bottom: 10px;
}

/* Message animations */
.message-animate {
	animation: messageSlideIn 0.3s ease forwards;
	opacity: 0;
}

@keyframes messageSlideIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Message timestamp */
.message-time {
	display: block;
	font-size: 0.65rem;
	color: rgba(255, 255, 255, 0.35);
	margin-top: 4px;
}

/* Skeleton loader */
.skeleton-loader {
	background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.5s infinite;
	border-radius: 4px;
	padding: 8px 12px;
}

@keyframes skeleton-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* Input shell with inline action */
.input-shell {
	position: relative;
	flex: 1;
	display: flex;
	align-items: center;
}

.input-shell .my-input-text {
	flex: 1;
	padding-right: 60px;
}

.input-action-label {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.7rem;
	text-transform: lowercase;
	letter-spacing: 0.2em;
	color: rgba(39, 209, 127, 0.8);
	pointer-events: none;
	text-shadow: 0 0 10px rgba(39, 209, 127, 0.4);
	animation: action-pulse 2s ease-in-out infinite;
}

@keyframes action-pulse {
	0%, 100% { opacity: 0.7; }
	50% { opacity: 1; }
}

.input-shell:hover .input-action-label {
	cursor: pointer;
}

.input-ready {
	border-color: rgba(39, 209, 127, 0.4) !important;
	box-shadow: 0 0 12px rgba(39, 209, 127, 0.15);
}

/* Input when assistant is typing */
.assistant-typing {
	border-color: rgba(200, 16, 46, 0.4) !important;
	box-shadow: 0 0 10px rgba(200, 16, 46, 0.2);
}

/* Chat form layout */
.chat form.row {
	display: flex;
	align-items: center;
	gap: 0;
	margin-top: 10px;
}

.chat form .my-input-text {
	flex: 1;
	margin-bottom: 0;
}

.site-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 12px 20px;
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.35);
	text-align: center;
	z-index: 2;
}
