/**
 * Multilingual Chatbot - Frontend Styles
 */

:root {
	--mcb-primary-color: #007AFF;
	--mcb-light-gray: #f5f5f5;
	--mcb-dark-gray: #333333;
	--mcb-border-color: #e0e0e0;
}

/* Widget Container */
.mcb-widget {
	position: fixed;
	bottom: 20px;
	right: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	z-index: 9999;
}

/* Toggle Button */
.mcb-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	border-radius: 50%;

	color: white;
	background: var(--mcb-primary-color);
	cursor: pointer;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
	font-size: 24px;
	position: relative;
	}

	/* Notification Badge for Toggle Button */
	.mcb-toggle .mcb-notification-badge {
		position: absolute;
		top: 0px;
		right: 0px;
		width: 25px;
		height: 25px;
		background: #FF3B30;
		color: #fff;
		border-radius: 50%;
		border: 2px solid white;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 12px;
		font-weight: bold;
		box-shadow: 0 1px 4px rgba(0,0,0,0.15);
		z-index: 2;
		pointer-events: none;
	}




.mcb-toggle:hover {
	transform: scale(1.1);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Notification Badge */
.mcb-notification-badge {
	position: absolute;
	top: -10px;
	right: -10px;
	width: 12px;
	height: 12px;
	background: #FF3B30;
	border-radius: 50%;
	border: 2px solid white;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

/* Chat Container */
.mcb-container {
	position: absolute;
	bottom: 100px;
	right: 20px;
	width: 360px;
	height: 700px;

	max-height: 90vh;
	background: white;
	border-radius: 8px;
	box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

@media (max-width: 768px) {
	.mcb-container {
		width: calc(100vw - 20px);
		height: calc(100vh - 120px);
		max-height: calc(100vh - 120px);
		bottom: 110px;
		right: 10px;
		transform: none;
		top: auto;
	}
}

@media (max-width: 480px) {
	.mcb-container {
		position: fixed;
		width: 100vw;
		height: 85vh;
		max-height: 85vh;
		bottom: 0;
		right: 0;
		left: 0;
		top: 0;
		border-radius: 0;
	}

	.mcb-widget {
		bottom: 20px;
		right: 20px;
		z-index: 10000;
	}
}

/* Header */
.mcb-header {
	background: white;
	border-bottom: 1px solid var(--mcb-border-color);
	padding: 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.mcb-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--mcb-dark-gray);
}

.mcb-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: var(--mcb-dark-gray);
	padding: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mcb-close:hover {
	color: #FF3B30;
}

/* Messages Area */
.mcb-messages {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 16px 16px 200px 16px;
	background: var(--mcb-light-gray);
	display: flex;
	flex-direction: column;
	gap: 12px;
	scroll-behavior: smooth;
	overflow-anchor: auto;
}

/* Message Bubble */
.mcb-message {
	display: flex;
	gap: 8px;
	animation: slideIn 0.3s ease;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.mcb-message.bot {
	justify-content: flex-start;
}

.mcb-message.user {
	justify-content: flex-end;
}

.mcb-message-content {
	max-width: 80%;
	padding: 12px 16px;
	border-radius: 18px;
	font-size: 14px;
	line-height: 1.4;
	word-wrap: break-word;
}

.mcb-message.bot .mcb-message-content {
	background: white;
	color: var(--mcb-dark-gray);
	border: 1px solid var(--mcb-border-color);
}

.mcb-message.user .mcb-message-content {
	background: var(--mcb-primary-color);
	color: white;
}

/* Typing Animation */
.mcb-typing {
	display: flex;
	gap: 4px;
	align-items: center;
	padding: 12px 16px;
}

.mcb-typing span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--mcb-dark-gray);
	animation: typing 1.4s infinite;
}

.mcb-typing span:nth-child(2) {
	animation-delay: 0.2s;
}

.mcb-typing span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes typing {
	0%, 60%, 100% {
		opacity: 0.3;
		transform: translateY(0);
	}
	30% {
		opacity: 1;
		transform: translateY(-10px);
	}
}

/* Input Area */
.mcb-input-area {
	flex: 0 0 auto;
	border-top: 1px solid var(--mcb-border-color);
	padding: 12px;
	background: white;
	overflow-y: auto;
	max-height: 40vh;
}

.mcb-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Form Container */
#mcb-form-container {
	margin-bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Multiple Choice Options */
.mcb-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 35vh;
	overflow-y: auto;
}

.mcb-radio{
	display:none
}

.mcb-checkbox{
	display:none
}

.mcb-option {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	flex-shrink: 0;
	cursor:none;
}

.mcb-option input[type="radio"],
.mcb-option input[type="checkbox"] {
	cursor: pointer;
	margin-top: 8px;
	flex-shrink: 0;
}

.mcb-option label {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid var(--mcb-border-color);
	color: #333333!important;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	margin: 0;
	font-size: 13px;
	word-wrap: break-word;
}

.mcb-option input:checked + label {
	background: var(--mcb-primary-color);
	color: white;
	border-color: var(--mcb-primary-color);
}

.mcb-option label:hover {
	border-color: var(--mcb-primary-color);
}

/* Text Input */
.mcb-text-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--mcb-border-color);
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
}

.mcb-text-input:focus {
	outline: none;
	border-color: var(--mcb-primary-color);
	box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Submit Button */
.mcb-submit-btn {
	width: 100%;
	padding: 12px 16px;
	background: var(--mcb-primary-color);
	color: white;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	box-sizing: border-box;
	flex-shrink: 0;
}

.mcb-submit-btn:hover {
	background: #0051D5;
	box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.mcb-submit-btn:active {
	transform: scale(0.98);
}

/* Button Row - for back and send buttons side by side */
.mcb-button-row {
	display: flex;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
}

.mcb-button-row .mcb-back-btn {
	flex: 1;
	margin-top: 0;
}

.mcb-button-row .mcb-submit-btn {
	flex: 1;
}

/* Back Button */
.mcb-back-btn {
	width: 100%;
	padding: 12px 16px;
	background: #f0f0f0;
	color: var(--mcb-dark-gray);
	border: 1px solid var(--mcb-border-color);
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-top: 12px;
	box-sizing: border-box;
	flex-shrink: 0;
}

.mcb-back-btn:hover {
	background: #e0e0e0;
	border-color: var(--mcb-dark-gray);
}

.mcb-back-btn:active {
	transform: scale(0.98);
}

/* Language Selection */
.mcb-language-selector {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 35vh;
	overflow-y: auto;
}

.mcb-language-btn {
	padding: 10px 12px;
	border: 1px solid var(--mcb-border-color);
	background: white;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: left;
	font-size: 14px;
	box-sizing: border-box;
	flex-shrink: 0;
}

.mcb-language-btn:hover {
	background: var(--mcb-light-gray);
	border-color: var(--mcb-primary-color);
}

/* Scrollbar Styling */
.mcb-messages::-webkit-scrollbar {
	width: 6px;
}

.mcb-messages::-webkit-scrollbar-track {
	background: var(--mcb-light-gray);
}

.mcb-messages::-webkit-scrollbar-thumb {
	background: var(--mcb-border-color);
	border-radius: 3px;
}

.mcb-messages::-webkit-scrollbar-thumb:hover {
	background: #ccc;
}
