﻿/* ==== Ooredoo chat overlay ==== */
:root {
	--ooredoo-soft: #ffd9d4;
	--scroll-red: #e66462; /* Exact color from requirements */
	--scroll-red-darker: #d45a58; /* Slightly darker for hover */
	--bubble: #ffffff;
	--text: #000;
}

.message-wrapper {
	position: absolute;
	z-index: 3;
	background: transparent;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
	font-family: "Noto Sans", system-ui, -apple-system, Segoe UI, Arial,
		sans-serif;
}

/* The actual scrolling element */
.message-list {
	height: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-behavior: smooth;
	padding-right: 24px;
	scrollbar-width: none;
}
.message-list::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

.message-container--user,
.message-container--bot {
	display: flex;
	pointer-events: auto;
	flex-direction: column;
}

.message {
	width: 92%;
	background: var(--bubble);
	color: var(--text);
	border-radius: 14px;
	padding: 12px 16px;
	margin: 10px 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	line-height: 1.4;
	font-size: clamp(14px, 2.1vh, 18px);
	word-wrap: break-word;
	opacity: 0.9;
}

.message-container--user {
	justify-content: flex-end;
}
.message--user {
	border: 2px solid #ed1c24;
	color: #ed1c24;
	border-radius: 16px 16px 4px 16px;
	background: rgba(255, 255, 255, 0.95);
}
.message-container--bot {
	justify-content: flex-start;
}
.message--bot {
	border: 0;
	border-radius: 16px 16px 16px 4px;
	background: rgba(255, 255, 255, 0.95);
}

p {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

/* ===== Custom Figma-like scrollbar (rounded pill) ===== */
.msg-scrollbar {
	position: absolute;
	right: 0px;
	top: 8px;
	bottom: 8px;
	width: 9px;
	pointer-events: none;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.15s ease;
	z-index: 4;
}
.msg-scrollbar.visible {
	opacity: 1;
}

.msg-scrollbar .thumb {
	width: 12px;
	height: 80px;
	border-radius: 999px;
	background: #e66462; /* Direct color assignment for certainty */
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
	transform: translateY(0);
	transition: background 0.15s ease, height 0.1s ease;
	min-height: 40px;
}
.msg-scrollbar .thumb:hover {
	background: #d45a58;
} /* Hover state */

/* thicker thumb on UHD */
@media (min-height: 3000px) {
	.msg-scrollbar,
	.msg-scrollbar .thumb {
		width: 16px;
	}
	.message-list {
		padding-right: 30px;
	}
}

/* High resolution adjustments */
@media (min-height: 3840px) {
	.message {
		font-size: 1.4rem;
		padding: 1.5rem;
		margin: 1.5rem;
	}

	.msg-scrollbar,
	.msg-scrollbar .thumb {
		width: 18px;
	}
	.message-list {
		padding-right: 34px;
	}
}

/* Mobile adjustments */
@media (max-width: 768px) {
	.message-wrapper {
		left: 5% !important;
		right: 5% !important;
		max-width: 90% !important;
	}

	.message {
		width: 85%;
		font-size: 1rem;
		padding: 0.8rem;
		margin: 0.8rem;
	}
}
/* === Control Bar === */
.obot-controls {
	position: absolute;
	bottom: 1%;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(0.8rem, 2vw, 1.6rem);
	z-index: 10;
}

.obot-btn {
	background: #fff;
	border: 2px solid #ed1c24;
	width: clamp(58px, 6vw, 80px);
	height: clamp(58px, 6vw, 80px);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.25s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.obot-btn img {
	width: 45%;
	height: auto;
}

.obot-btn:hover {
	background: #ed1c24;
}

.obot-btn:hover img {
	filter: brightness(0) invert(1);
}

.obot-btn.mic {
	background: #ed1c24;
	border: 2px solid #ed1c24;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.obot-btn.mic img {
	filter: brightness(0) invert(1);
}

.message-image-container {
	display: flex;
	justify-content: center;
	align-items: center;
}

@media (max-width: 768px) {
	.obot-controls {
		bottom: 3%;
		gap: 1rem;
	}
	.obot-btn {
		width: 56px;
		height: 56px;
	}
}
