/* Container */
.chat-container {
	width: 90%;
	max-width: 900px;
	margin: 20px auto;
	border-radius: 12px;
	background: #fff;
	display: flex;
	flex-direction: column;
	height: auto;
	min-height: 400px;
	border: 2px solid #6E2C6F;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

/* Header */
.chat-header {
	background: linear-gradient(135deg, #6E2C6F 85%, #CCAF1F 100%);
	color: #fff;
	font-weight: bold;
	border-top-left-radius: 12px;
	border-top-right-radius: 12px;
	padding: 10px 15px;
}

/* Messages area */
.chat-messages {
	flex: 1;
	overflow-y: auto;
	background: #fdfdfd;
	padding: 15px;
	display: flex;
	flex-direction: column;
}

/* Scrollbar accent */
.chat-messages::-webkit-scrollbar {
	width: 6px;
}
.chat-messages::-webkit-scrollbar-thumb {
	background: #6E2C6F;
	border-radius: 3px;
}

/* Message wrappers */
.message {
	margin-bottom: 5px;
	display: flex;
	align-items: flex-end;
}

/* Extra space when sender changes */
.user-switch,
.bot-switch {
	margin-top: 15px;
}

/* User messages: fade only */
.message.user {
	justify-content: flex-end;
	animation: fadeIn 0.25s ease;
}

/* Bot messages: fade only */
.message.bot {
	justify-content: flex-start;
	animation: fadeIn 0.25s ease;
}

/* ===== Future grouping styles ===== */
.message.bot + .message.bot .bubble {
	border-top-left-radius: 6px;
}
.message.user + .message.user .bubble {
	border-top-right-radius: 6px;
}
.message.bot + .message.bot,
.message.user + .message.user {
	margin-top: 2px;
}

/* Bot avatar (logo) */
.avatar.bot {
	width: 64px;
	height: 64px;
	margin: 0 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.avatar.bot img {
	width: 100%;
	height: 100%;
	border-radius: 8px;
	object-fit: contain;
}

/* Bubbles */
.bubble {
	display: inline-block;
	padding: 12px 18px;
	border-radius: 16px;
	max-width: 70%;
	word-wrap: break-word;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.message.user .bubble {
	background: linear-gradient(135deg, #6E2C6F, #7f3d80);
	color: #fff;
	border-bottom-right-radius: 0;
}
.message.bot .bubble {
	background: #fafafa;
	border: 1px solid #eee;
	color: #333;
	border-bottom-left-radius: 0;
}

/* Timestamps */
.timestamp {
	display: block;
	font-size: 0.7rem;
	color: #aaa;
	margin-top: 3px;
}

/* System messages */
.system-message {
	text-align: center;
	font-size: 0.8rem;
	color: #888;
	margin: 10px 0;
	font-style: italic;
	animation: fadeIn 0.4s ease;
}

/* Quick replies */
.quick-replies {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.quick-replies button {
	background: #f1f1f1;
	border: none;
	border-radius: 20px;
	padding: 6px 14px;
	font-size: 0.85rem;
	font-weight: 500;
	color: #444;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.quick-replies button:hover {
	background: #6E2C6F; /* purple brand */
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(110,44,111,0.3);
}

.quick-replies button:active {
	transform: scale(0.95);
	box-shadow: 0 2px 4px rgba(110,44,111,0.4);
}

/* Input row */
.chat-input {
	border-top: 1px solid #eee;
	padding: 10px;
	display: flex;
	align-items: center;
	background: #fff;
}
.chat-input input {
	flex: 1;
	border-radius: 20px;
	padding: 10px 15px;
	border: 1px solid #ccc;
	transition: all 0.2s ease;
}
.chat-input input:focus {
	border-color: #6E2C6F;
	box-shadow: 0 0 0 0.2rem rgba(110, 44, 111, 0.25);
}
small.text-muted {
	font-size: 0.75rem;
}
form select[disabled], form input[disabled] {
	background-color: #f4f4f4 !important;
	color: #777 !important;
	cursor: not-allowed;
}


/* Floating gold send button */
.chat-input button {
	border-radius: 50%;
	width: 46px;
	height: 46px;
	margin-left: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #CCAF1F;
	border: none;
	color: #212529;
	font-size: 1.1rem;
	box-shadow: 0 4px 10px rgba(204, 175, 31, 0.4);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chat-input button:hover {
	transform: scale(1.05);
	box-shadow: 0 6px 14px rgba(204, 175, 31, 0.6);
	color: #fff;
}
.chat-input button:active {
	transform: scale(0.95);
	box-shadow: 0 0 10px rgba(204, 175, 31, 0.6);
}

/* Typing indicator */
#typing-indicator {
	display: flex;
	gap: 5px;
	margin: 10px 0 0 74px; /* indent like a bot message (64px avatar + 10px margin) */
}
.typing-dot {
	width: 8px;
	height: 8px;
	background: #6E2C6F;
	border-radius: 50%;
	animation: bounce 1s infinite alternate;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Feedback section */
.feedback {
	margin-top: 4px;
	font-size: 0.75rem; /* smaller than bubble text */
	color: #777;
	display: flex;
	gap: 10px;
}

.feedback-prompt {
	margin-right: 8px;
	font-weight: 500;
	color: #555;
}

/* Feedback buttons */
.feedback-btn {
	cursor: pointer;
	color: #6E2C6F; /* purple by default */
	font-size: 0.75rem;
	padding: 2px 4px;
	border-radius: 4px;
	transition: color 0.2s ease, background 0.2s ease;
}

.feedback-btn:hover {
	color: #CCAF1F; /* gold on hover */
	background: rgba(204, 175, 31, 0.1); /* subtle highlight */
}



/* Animations */
@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes pulseIn {
	from { transform: scale(0.95); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}
@keyframes bounce {
	from { transform: translateY(0); opacity: 0.6; }
	to { transform: translateY(-6px); opacity: 1; }
}
/* Simple Modern Button Styles - Gold Primary Theme */

/* Make buttons equal width and modern looking */
.chat-form .d-flex {
	gap: 10px;
}

.chat-form #cancel-appointment,
.chat-form #next-appointment-step,
.chat-form button[type="submit"] {
	/* Remove Bootstrap defaults */
	border: none !important;

	/* Size */
	min-width: 110px;
	height: 40px;
	flex: 1;

	/* Modern look */
	font-weight: 600;
	font-size: 14px;
	border-radius: 10px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	cursor: pointer;
}

/* Cancel button - subtle white/gray */
.chat-form #cancel-appointment {
	background: #f5f5f5;
	color: #666;
	border: 2px solid #e5e5e5 !important;
}

.chat-form #cancel-appointment:hover {
	background: #fff;
	color: #333;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chat-form #cancel-appointment::before {
	content: "✕ ";
	font-weight: bold;
}

/* Next/Submit button - Gold primary */
.chat-form #next-appointment-step,
.chat-form button[type="submit"] {
	background: linear-gradient(135deg, #CCAF1F, #e6c833);
	color: #2c2c2c;
	font-weight: 700;
}

.chat-form #next-appointment-step:hover,
.chat-form button[type="submit"]:hover {
	background: linear-gradient(135deg, #e6c833, #f0d23d);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(204, 175, 31, 0.3);
}

.chat-form #next-appointment-step::after {
	content: " →";
}

.chat-form button[type="submit"].btn-success::after {
	content: " ✓";
}

/* Active state */
.chat-form button:active {
	transform: translateY(0);
}

/* Disabled state */
.chat-form button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none !important;
}
/* ==========================================
   COLLEGE ACCESS HUB - WELCOME HEADER
   Distinct from chat UI - landing page feel
   ========================================== */

.hub-welcome {
	width: 90%;
	max-width: 900px;
	margin: 30px auto 24px;
	text-align: center;
}

.hub-welcome-inner {
	padding: 0 20px;
}

.hub-tm {
	font-size: 0.5em;
	font-weight: 700;
	vertical-align: super;
	margin-left: 2px;
	opacity: 0.8;
}

/* Badge - floating pill */
.hub-welcome-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: linear-gradient(135deg, #CCAF1F, #e6c833);
	color: #1a1a1a;
	padding: 8px 16px;
	border-radius: 50px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	margin-bottom: 16px;
	box-shadow: 0 4px 15px rgba(204, 175, 31, 0.35);
	animation: float 3s ease-in-out infinite;
}

.hub-welcome-badge i {
	font-size: 0.7rem;
}

/* Title */
.hub-welcome-title {
	font-size: 2.25rem;
	font-weight: 800;
	color: #6E2C6F;
	margin: 0 0 12px;
	letter-spacing: -1px;
	line-height: 1.1;
}

/* Description */
.hub-welcome-desc {
	font-size: 1.05rem;
	color: #555;
	max-width: 520px;
	margin: 0 auto 24px;
	line-height: 1.6;
}

/* Steps - horizontal pills */
.hub-welcome-steps {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.hub-welcome-step {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #f8f5fa;
	padding: 10px 18px;
	border-radius: 50px;
	font-size: 0.85rem;
	color: #444;
	font-weight: 500;
	transition: all 0.25s ease;
}

.hub-welcome-step:hover {
	background: #6E2C6F;
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(110, 44, 111, 0.25);
}

.hub-welcome-step:hover .step-num {
	background: #CCAF1F;
	color: #1a1a1a;
}

.step-num {
	width: 22px;
	height: 22px;
	background: #6E2C6F;
	color: #fff;
	border-radius: 50%;
	font-size: 0.7rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.25s ease;
}

/* Info trigger button */
.hub-info-trigger {
	background: none;
	border: none;
	color: #888;
	font-size: 0.8rem;
	cursor: pointer;
	padding: 8px 16px;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.hub-info-trigger:hover {
	color: #6E2C6F;
	background: #f8f5fa;
}

.hub-info-trigger i {
	margin-right: 6px;
}

/* Collapsible info panel */
.hub-info-panel {
	background: #fafafa;
	border-radius: 12px;
	padding: 16px 24px;
	margin-top: 16px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
}

.hub-info-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.85rem;
	color: #555;
}

.hub-info-item i {
	color: #6E2C6F;
	width: 16px;
	text-align: center;
}

.hub-info-item a {
	color: #6E2C6F;
	font-weight: 600;
	text-decoration: none;
}

.hub-info-item a:hover {
	text-decoration: underline;
}

/* Float animation for badge */
@keyframes float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}

/* ==========================================
   CLICKABLE ELEMENTS + POPOVERS
   ========================================== */

.hub-clickable {
	cursor: pointer;
	position: relative;
}

/* Subtle hint that elements are clickable */
.hub-clickable::after {
	content: '';
	position: absolute;
	inset: -4px;
	border-radius: inherit;
	border: 2px dashed transparent;
	transition: border-color 0.2s ease;
	pointer-events: none;
}

.hub-clickable:hover::after {
	border-color: rgba(110, 44, 111, 0.2);
}

/* Active state when popover is open */
.hub-clickable[aria-describedby]::after {
	border-color: #6E2C6F;
	border-style: solid;
}

/* Custom popover styling */
.popover {
	border: none;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	max-width: 280px;
	font-family: inherit;
}

.popover-header {
	display: none; /* We're not using headers */
}

.popover-body {
	padding: 14px 16px;
	font-size: 0.85rem;
	line-height: 1.5;
	color: #444;
	background: #fff;
	border-radius: 12px;
}

/* Popover arrow styling */
.popover .arrow::before {
	border-color: transparent;
}

.popover .arrow::after {
	border-color: transparent;
}

.bs-popover-bottom .arrow::after,
.bs-popover-auto[x-placement^="bottom"] .arrow::after {
	border-bottom-color: #fff;
}

.bs-popover-top .arrow::after,
.bs-popover-auto[x-placement^="top"] .arrow::after {
	border-top-color: #fff;
}

/* Purple accent bar on popover */
.popover-body::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #6E2C6F, #CCAF1F);
	border-radius: 12px 12px 0 0;
}

/* Tap hint for mobile */
@media (max-width: 768px) {
	.hub-clickable::before {
		content: 'tap for info';
		position: absolute;
		bottom: -18px;
		left: 50%;
		transform: translateX(-50%);
		font-size: 0.6rem;
		color: #aaa;
		opacity: 0;
		transition: opacity 0.2s ease;
		white-space: nowrap;
	}

	.hub-welcome-step.hub-clickable::before {
		bottom: -16px;
	}

	.hub-clickable:active::before {
		opacity: 1;
	}
}

/* Mobile */
@media (max-width: 600px) {
	.hub-welcome {
		margin: 20px auto;
	}

	.hub-welcome-title {
		font-size: 1.75rem;
	}

	.hub-welcome-desc {
		font-size: 0.95rem;
		padding: 0 10px;
	}

	.hub-welcome-steps {
		gap: 8px;
	}

	.hub-welcome-step {
		padding: 8px 14px;
		font-size: 0.8rem;
	}

	.hub-info-panel {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		text-align: left;
	}
	.popover {
		max-width: 250px;
	}
}
/* ==========================================
   CHAT FOOTER
   ========================================== */

.hub-chat-footer {
	width: 90%;
	max-width: 900px;
	margin: 12px auto 30px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

.hub-footer-left {
	flex: 1;
	min-width: 200px;
}

.hub-footer-hint {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8rem;
	color: #888;
	font-style: italic;
}

.hub-footer-hint i {
	color: #CCAF1F;
	font-size: 0.85rem;
}

.hub-footer-right {
	flex-shrink: 0;
}

/* Clear/Start Over button */
.hub-clear-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f5f5f5;
	border: 1px solid #ccc;
	color: #666;
	padding: 8px 16px;
	border-radius: 50px;
	font-size: 0.8rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.hub-clear-btn:hover {
	background: #fee2e2;
	border-color: #ef5350;
	color: #b71c1c;
}

.hub-clear-btn:active {
	transform: scale(0.97);
}

.hub-clear-btn i {
	font-size: 0.75rem;
	transition: transform 0.3s ease;
}

.hub-clear-btn:hover i {
	transform: rotate(-180deg);
}

/* Mobile */
@media (max-width: 600px) {
	.hub-chat-footer {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 16px;
	}

	.hub-footer-left {
		min-width: unset;
		width: 100%;
	}

	.hub-footer-hint {
		justify-content: center;
		font-size: 0.75rem;
	}

	.hub-clear-btn {
		padding: 10px 24px;
	}
}
