/* General body styling */
body {
	font-family: Arial, sans-serif;
	background: #f4f4f4;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	margin: 0;
	padding: 10px;
	overflow-x: hidden;
	overflow-y: auto;
}

/* General container styling for forms */
.container {
	width: 350px;
	max-width: 90%;
	padding: 20px;
	background: #fff;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	box-sizing: border-box;
	text-align: center;
	margin-top: 20px;
}

/* Styling for form messages */
.message {
	color: #3c763d;
	padding: 10px;
	margin-top: 10px;
	border-radius: 4px;
	text-align: center;
}

.error-message {
	color: #d90f0f;
	padding: 10px;
	margin-top: 10px;
	border-radius: 4px;
	text-align: center;
}

/* Form input fields styling */
input[type="text"],
input[type="email"],
input[type="password"] {
	width: 100%;
	padding: 8px;
	margin-bottom: 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
	font-size: 16px;
}

/* Styling for form buttons */
button {
	width: 100%;
	padding: 10px;
	background-color: #4285F4;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
	transition: background-color 0.3s;
}

button:hover {
	background-color: #357ae8;
}

/* Specific styling for the toggle switch */
.toggle-switch {
	position: relative;
	display: inline-block;
	width: 60px;
	/* Adjusted width for better fit */
	height: 34px;
	/* Adjusted height for standard toggle */
	margin: 10px 0;
	/* Added margin for spacing */
}

.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: .4s;
	border-radius: 34px;
}

.slider:before {
	position: absolute;
	content: "";
	height: 26px;
	width: 26px;
	left: 4px;
	bottom: 4px;
	background-color: white;
	transition: .4s;
	border-radius: 50%;
}

input:checked+.slider {
	background-color: #4CAF50;
}

input:checked+.slider:before {
	transform: translateX(26px);
	/* Adjust for proper alignment */
}

input:focus+.slider {
	box-shadow: 0 0 1px #2196F3;
}

/* Styling for clickable items like friend names */
.friend {
	color: #0056b3;
	text-decoration: underline;
	cursor: pointer;
	display: inline-block;
	margin-right: 10px;
}

/* Ensure proper spacing between interface elements */
.profile-settings {
	margin-bottom: 20px;
	/* Space above the close button */
}

#confirmRemovalModal button {
	margin: 10px;
	padding: 5px 10px;
	border: none;
	border-radius: 5px;
	background-color: #4285F4;
	color: white;
	cursor: pointer;
}

#confirmRemovalModal button:hover {
	background-color: #357ae8;
}

#profile-window {
	width: auto;
	/* Adjusted to fit content */
	max-width: 500px;
	/* Max width to contain all elements neatly */
	display: flex;
	/* Changed to flex to manage layout better */
	flex-direction: column;
	/* Stack children vertically */
	padding: 20px;
	overflow: auto;
	/* Allows scrolling within the window if content overflows */
}

.leaflet-tooltip {
	background-color: white;
	border: 1px solid gray;
	border-radius: 4px;
	padding: 4px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	font-size: 14px;
}

.friend-name {
	color: black;
	font-size: 12px;
	background-color: rgba(255, 255, 255, 0.7);
	padding: 2px 4px;
	border-radius: 4px;
	margin-bottom: 5px;
}

.friend-tooltip {
	background-color: rgba(255, 255, 255, 0.8);
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 2px 4px;
	font-size: 12px;
	color: black;
	text-align: center;
}

/* Report Form Styling */
.report-form {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 400px;
	background-color: #fff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
	z-index: 1500;
}

.report-form textarea {
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 8px;
	font-size: 16px;
}

/* Modal Styling */
#confirmLocationRemovalModal {
	background-color: white;
	border: 1px solid gray;
	border-radius: 5px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	padding: 20px;
	max-width: 300px;
	width: 100%;
	box-sizing: border-box;
}

#confirmLocationRemovalModal button {
	margin: 10px;
	padding: 5px 10px;
	border: none;
	border-radius: 5px;
	background-color: #4285F4;
	color: white;
	cursor: pointer;
}

#confirmLocationRemovalModal button:hover {
	background-color: #357ae8;
}

#reports-window {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 500px;
	background-color: #fff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
	z-index: 2000;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	max-height: 80vh;
	/* To allow scrolling */
}

.report-item {
	padding: 10px;
	border-bottom: 1px solid #ccc;
	cursor: pointer;
}

.report-item:hover {
	background-color: #f0f0f0;
}

.settings-menu {
	display: none;
	position: fixed;
	bottom: 80px;
	right: 20px;
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	z-index: 1000;
}

.settings-menu button {
	display: block;
	width: 100%;
	padding: 10px;
	border: none;
	background: none;
	text-align: left;
	cursor: pointer;
	font-size: 16px;
	color: black;
}

.settings-menu button:hover {
	background-color: #f0f0f0;
}

.add-location-form {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 400px;
	background-color: #fff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
	z-index: 1500;
}

.form-input {
	margin-bottom: 10px;
}

.form-input label {
	display: block;
	margin-bottom: 5px;
}

.form-input input,
.form-input select {
	width: 100%;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.form-button {
	width: 100%;
	padding: 10px;
	background-color: #4285F4;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.form-button:hover {
	background-color: #357ae8;
}

#profile-window {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 400px;
	background-color: #fff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
	z-index: 2000;
}

#profile-window button {
	margin-top: 10px;
}

#friend-requests button,
#friends-list button {
	margin-left: 5px;
	padding: 5px 10px;
	font-size: 14px;
}

/* Suggest Form Styling */
.suggest-form {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 400px;
	background-color: #fff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
	z-index: 1500;
}

.suggest-form textarea {
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 8px;
	font-size: 16px;
}

/* Highlight colors for reports */
.report-bug {
	background-color: #f8d7da;
}

.report-suggestion {
	background-color: #d4edda;
}

#friend-profile-window {
	width: 85%;
	max-width: 350px;
	padding: 15px;
	border-radius: 8px;
}

#friend-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.action-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px;
	border: none;
	border-radius: 6px;
	background: #4285F4;
	color: white;
	cursor: pointer;
	transition: background-color 0.2s;
	font-size: 13px;
}

.action-button:hover {
	background: #3367d6;
}

.action-button i {
	font-size: 14px;
}

.close-button {
	width: 100%;
	padding: 12px;
	background-color: #f44336;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	margin-top: 20px;
}

.close-button:hover {
	background-color: #d32f2f;
}

/* Add or update the chat container styles */
.chat-container {
	display: flex;
	flex-direction: column;
	height: 100vh;
	/* Full viewport height */
	overflow: hidden;
	/* Prevent scrolling on the container itself */
}

/* Style for the top bar */
.chat-header {
	flex: 0 0 auto;
	/* Don't allow header to shrink or grow */
	background-color: #4285f4;
	color: white;
	padding: 1rem;
	z-index: 100;
	/* Ensure header stays above messages */
}

/* Style for the messages area */
.messages-container {
	flex: 1;
	/* Take up remaining space */
	overflow-y: auto;
	/* Allow scrolling within messages */
	padding: 1rem;
	margin-top: 0;
	/* Remove any top margin */
	position: relative;
	/* For proper scrolling */
}

/* Style for individual messages */
.message {
	margin-bottom: 0.5rem;
	/* ... other existing message styles ... */
}

/* If you have an input area at the bottom */
.chat-input {
	flex: 0 0 auto;
	/* Don't allow input to shrink or grow */
	padding: 1rem;
	background: white;
	border-top: 1px solid #eee;
}

.logout-button {
	display: none;
	/* Hide the top-right logout button */
}

.profile-actions {
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #e0e0e0;
}

.logout-link {
	display: block;
	padding: 10px;
	background-color: #f44336;
	color: white;
	text-align: center;
	text-decoration: none;
	border-radius: 4px;
	margin-top: 10px;
}

.logout-link:hover {
	background-color: #d32f2f;
}

/* Friends grid styling */
.friends-section {
	padding: 12px;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.friends-section h3 {
	margin-bottom: 12px;
	color: #333;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.friends-section h3 i {
	color: #4285F4;
	font-size: 14px;
}

.friends-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 6px 0;
	overflow-x: auto;
	/* Enable smooth scrolling */
	scroll-behavior: smooth;
	/* Hide scrollbar but keep functionality */
	scrollbar-width: none;
	/* Firefox */
	-ms-overflow-style: none;
	/* IE and Edge */
	/* Add padding for better visibility of last items */
	padding-right: 12px;
	max-height: 96px;
	/* Limit to 2 rows: (32px avatar + 8px padding-top + 8px padding-bottom + 6px margin + 11px text) × 2 */
}

/* Hide scrollbar for Chrome/Safari/Opera */
.friends-grid::-webkit-scrollbar {
	display: none;
}

.friend-card {
	background: #f8f9fa;
	border-radius: 4px;
	padding: 8px;
	text-align: center;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
	border: 1px solid #e0e0e0;
	width: 80px;
	/* Fixed width for consistent sizing */
	flex-shrink: 0;
	/* Prevent cards from shrinking */
}

.friend-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.friend-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
	background-color: #4285F4;
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	margin: 0 auto 6px;
	border: 1px solid #e0e0e0;
}

.friend-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.friend-avatar.large {
	width: 80px;
	height: 80px;
	font-size: 24px;
	margin-bottom: 12px;
}

.friend-info {
	margin-top: 4px;
}

.friend-name {
	font-weight: 500;
	color: #333;
	font-size: 11px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 75px;
	margin: 0 auto;
}

.no-friends {
	text-align: center;
	color: #666;
	padding: 20px;
	font-style: italic;
}

/* Friend Profile Styling */
.friend-profile-header {
	text-align: center;
	margin-bottom: 15px;
	padding: 15px;
	background: #f8f9fa;
	border-radius: 6px;
}

.friend-profile-header h2 {
	margin: 8px 0;
	color: #333;
	font-size: 18px;
}

.last-seen {
	color: #666;
	font-size: 12px;
	margin-top: 4px;
}

.last-seen i {
	margin-right: 4px;
	font-size: 12px;
}

#friend-user-info {
	padding: 12px;
	background: #fff;
	border-radius: 6px;
	margin-bottom: 15px;
}

#friend-user-info p {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #333;
	font-size: 13px;
}

#friend-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.action-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px;
	border: none;
	border-radius: 6px;
	background: #4285F4;
	color: white;
	cursor: pointer;
	transition: background-color 0.2s;
	font-size: 13px;
}

.action-button:hover {
	background: #3367d6;
}

.action-button.remove {
	background: #dc3545;
}

.action-button.remove:hover {
	background: #c82333;
}

.action-button i {
	font-size: 14px;
}

/* Basic UI Elements Group */
.button {
	position: fixed;
	width: 50px;
	height: 50px;
	background-color: #0056b3;
	color: white;
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 24px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	transition: background-color 0.3s;
	z-index: 1000;
}

.button:hover {
	background-color: #004494;
}

.logout-button,
.login-button,
.search-button {
	top: 20px;
	right: 20px;
}

.location-button {
	bottom: 20px;
	left: 20px;
}

.settings-button {
	bottom: 20px;
	right: 20px;
}

.profile-button {
	top: 20px;
	right: 20px;
}

.search-bar {
	position: fixed;
	top: 20px;
	left: 50px;
	z-index: 1001;
}

.search-input {
	padding: 10px;
	width: 300px;
	font-size: 16px;
	border: 2px solid #ccc;
	border-radius: 4px;
}

.search-results {
	position: fixed;
	top: 60px;
	left: 50px;
	width: 300px;
	max-height: 200px;
	overflow-y: auto;
	background-color: white;
	border: 1px solid #ccc;
	border-radius: 4px;
	z-index: 1001;
	display: none;
}

.search-results div {
	padding: 10px;
	cursor: pointer;
}

.search-results div:hover {
	background-color: #f0f0f0;
}

.profile-picture-container {
	position: relative;
	width: 100px;
	height: 100px;
	margin: 0 auto 20px;
	cursor: pointer;
	border-radius: 50%;
	overflow: hidden;
	/* This ensures the image is clipped to the circle */
	border: 2px solid #4285F4;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-picture {
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* This ensures the image covers the area without distortion */
	border-radius: 50%;
}

.profile-picture-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s;
}

.profile-picture-container:hover .profile-picture-overlay {
	opacity: 1;
}

.profile-picture-overlay i {
	color: white;
	font-size: 24px;
}

#profile-picture-input {
	display: none;
}

/* Prevent text selection and image copying */
* {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

/* Allow text selection only in input fields and textareas */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea {
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
	user-select: text;
}

/* Prevent image dragging and context menu */
img {
	-webkit-user-drag: none;
	-khtml-user-drag: none;
	-moz-user-drag: none;
	-o-user-drag: none;
	pointer-events: none;
}

body {
	margin: 0;
	padding: 0;
}

#map {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 100%;
}

.icon-link {
	margin-right: 15px;
	display: inline-block;
	font-size: 20px;
	color: #4285F4;
}

/* Message window styles */
.message-window {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	max-width: 100%;
	height: 85vh;
	max-height: 100vh;
	background-color: #f0f2f5;
	border-radius: 0;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
	z-index: 2000;
	flex-direction: column;
	overflow: hidden;

	@media (max-width: 768px) {
		top: 0;
		left: 0;
		transform: none;
		width: 100%;
		height: 100vh;
		border-radius: 0;
	}
}

/* App top bar styles */
.app-top-bar {
	width: 100%;
	height: 40px;
	background-color: #4285F4;
	background: linear-gradient(135deg, #4285F4, #3b78e7);
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 1.1em;
	font-weight: 600;
	letter-spacing: 0.3px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	position: relative;
}

.app-top-bar::after {
	content: "Trippy Chat";
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	text-align: center;
}

.message-content-wrapper {
	display: flex;
	flex-direction: row;
	flex: 1;
	overflow: hidden;
}

.message-sidebar {
	width: 18%;
	/* Reduced from 22% */
	height: 100%;
	overflow-y: auto;
	background-color: #fff;
	display: flex;
	flex-direction: column;
	border-right: 1px solid #e4e6eb;

	/* Mobile optimization */
	@media (max-width: 768px) {
		width: 28%;
		font-size: 0.9em;
	}
}

.message-content {
	width: 82%;
	/* Increased from 78% */
	height: 100%;
	display: flex;
	flex-direction: column;
	background-color: #f0f2f5;

	/* Mobile optimization */
	@media (max-width: 768px) {
		width: 68%;
	}
}

.message-header {
	flex: 0 0 60px;
	border-bottom: 1px solid #eaeaea;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	background-color: #fff;
	color: #333;
	padding: 0 20px;
	position: sticky;
	top: 0;
	z-index: 10;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);

	/* Mobile optimization */
	@media (max-width: 768px) {
		padding: 0 10px;
		font-size: 0.9em;
	}
}

.message-header.chats-header {
	background-color: #fff;
	color: #050505;
	font-size: 0.95em;
	font-weight: 600;
	padding: 0 16px;
	flex: 0 0 45px;
	display: flex;
	align-items: center;
	position: sticky;
	top: 0;
	z-index: 10;
	border-bottom: 1px solid #e4e6eb;

	/* Mobile optimization */
	@media (max-width: 768px) {
		padding: 0 12px;
		font-size: 0.9em;
	}
}

.message-list {
	flex-grow: 1;
	overflow-y: auto;
	padding: 10px 8px;
	/* Reduced padding to allow messages closer to sides */
	background-color: #fff;
	margin-top: 0;
	height: calc(100% - 110px);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.message-input {
	padding: 8px;
	display: flex;
	align-items: center;
	background-color: transparent;
	border-top: none;
}

.message-input-container {
	display: flex;
	align-items: center;
	background: white;
	border-radius: 20px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	width: 100%;
	height: 40px;
	padding-left: 16px;
}

.message-input input {
	flex: 1;
	padding: 8px 12px 8px 0;
	border: none;
	height: 40px;
	font-size: 14px;
	outline: none;
	background: transparent;
}

.message-input button {
	width: 36px;
	height: 36px;
	min-width: 36px;
	margin: 0 2px;
	border: none;
	border-radius: 50%;
	background-color: #4285F4;
	color: white;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s, transform 0.2s;
	padding: 0;
}

.message-input button:hover {
	background-color: #357ae8;
	transform: scale(1.05);
}

.message-input button.delete-button {
	background-color: #ff4444;
}

.message-input button.delete-button:hover {
	background-color: #cc0000;
}

/* Ensure icon is centered and crisp */
.message-input button i {
	font-size: 1.1em;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.friend-chat {
	padding: 6px 12px;
	border-bottom: 1px solid #e4e6eb;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: all 0.2s ease;
	font-size: 0.82em;
	position: relative;
	min-height: 34px;
	max-height: 34px;

	/* Mobile optimization */
	@media (max-width: 768px) {
		padding: 6px 10px;
		font-size: 0.8em;
	}
}

.friend-chat strong {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 500;
}

.friend-chat .friend-avatar {
	width: 24px;
	height: 24px;
	min-width: 24px;
	border-radius: 50%;
	background-color: #0084ff;
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 500;
	font-size: 0.85em;

	/* Mobile optimization */
	@media (max-width: 768px) {
		width: 22px;
		height: 22px;
		min-width: 22px;
		font-size: 0.8em;
	}
}

.friend-chat:hover {
	background-color: #f2f3f5;
}

.friend-chat.active {
	background-color: #e7f3ff;
}

.friend-chat .friend-avatar {
	width: 28px;
	height: 28px;
	min-width: 28px;
	border-radius: 50%;
	background-color: #4285F4;
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 500;
	font-size: 0.9em;

	/* Mobile optimization */
	@media (max-width: 768px) {
		width: 24px;
		height: 24px;
		min-width: 24px;
		font-size: 0.85em;
	}
}

.message-bubble {
	max-width: 60%;
	padding: 6px 10px;
	margin: 1px 0;
	border-radius: 12px;
	position: relative;
	word-wrap: break-word;
	font-size: 11px;
	/* Match chat list font size */
	line-height: 1.3;
	user-select: none;
	touch-action: pan-y;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.message-bubble.pressed {
	opacity: 0.7;
}

.message-bubble.selected {
	background-color: rgba(0, 0, 0, 0.1) !important;
}

.message-sent {
	background-color: #0084ff;
	color: white;
	margin-left: auto;
	border-radius: 12px 12px 4px 12px;
	margin-right: 4px;
	/* Closer to right side */
}

.message-sent.selected {
	background-color: #006acc !important;
	opacity: 0.9;
}

.message-received {
	background-color: #e4e6eb;
	color: #050505;
	margin-right: auto;
	border-radius: 12px 12px 12px 4px;
	margin-left: 4px;
	/* Closer to left side */
}

.message-received.selected {
	background-color: #d8d8d8 !important;
	opacity: 0.9;
}

.message-checkbox {
	display: none;
	width: 20px;
	height: 20px;
	margin-left: 8px;
	position: absolute;
	left: -28px;
	top: 50%;
	transform: translateY(-50%);
	appearance: none;
	-webkit-appearance: none;
	background-color: rgba(255, 255, 255, 0.95);
	border: 2px solid #0084ff;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-checkbox:hover {
	transform: translateY(-50%) scale(1.05);
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.message-checkbox:checked {
	background-color: #0084ff;
	border-color: #0084ff;
}

.message-checkbox:checked::after {
	content: '';
	position: absolute;
	left: 7px;
	top: 3.5px;
	width: 5px;
	height: 10px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	animation: checkmark 0.2s ease-in-out forwards;
}

@keyframes checkmark {
	0% {
		opacity: 0;
		transform: rotate(45deg) scale(0.8);
	}

	100% {
		opacity: 1;
		transform: rotate(45deg) scale(1);
	}
}

.deletion-mode .message-sent {
	padding-left: 35px;
	transition: padding-left 0.2s ease-in-out;
}

.deletion-mode .message-sent .message-checkbox {
	display: block;
	opacity: 0;
	animation: fadeIn 0.2s ease-in-out forwards;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-50%) scale(0.8);
	}

	to {
		opacity: 1;
		transform: translateY(-50%) scale(1);
	}
}

.message-bubble.selected {
	opacity: 0.85;
	transform: scale(0.98);
	transition: all 0.2s ease-in-out;
}

.delete-button {
	background-color: #ff4444 !important;
	color: white !important;
}

.delete-button:hover {
	background-color: #cc0000 !important;
}

.message-bubble.pressed {
	opacity: 0.7;
	/* Visual feedback when pressed */
	background-color: rgba(0, 0, 0, 0.1);
}

.message-sent {
	background-color: #0084ff;
	color: white;
	margin-left: auto;
	border-radius: 12px 12px 4px 12px;
	margin-right: 4px;
	/* Closer to right side */
}

.message-sent .message-timestamp {
	color: rgba(255, 255, 255, 0.7);
}

.message-received {
	background-color: #e4e6eb;
	color: #050505;
	margin-right: auto;
	border-radius: 12px 12px 12px 4px;
	margin-left: 4px;
	/* Closer to left side */
}

.message-timestamp {
	font-size: 9px;
	/* Even smaller timestamp */
	color: #65676b;
	margin-top: 1px;
	text-align: right;
}

.notification-dot {
	width: 8px;
	height: 8px;
	background-color: #0084ff;
	border-radius: 50%;
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	animation: pulse 2s infinite;
}

.message-context-menu {
	position: absolute;
	background: white;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	border-radius: 4px;
	padding: 8px 0;
	z-index: 1000;
	min-width: 120px;
	touch-action: none;
	user-select: none;
}

.message-context-menu-item {
	padding: 8px 16px;
	cursor: pointer;
	color: #333;
	font-size: 14px;
	touch-action: none;
	-webkit-tap-highlight-color: transparent;
}

.message-context-menu-item:hover,
.message-context-menu-item:active {
	background-color: #f5f5f5;
}

.message-context-menu-item.delete {
	color: #ff4444;
}

@keyframes pulse {
	0% {
		transform: translateY(-50%) scale(0.95);
		opacity: 0.9;
	}

	50% {
		transform: translateY(-50%) scale(1.1);
		opacity: 0.7;
	}

	100% {
		transform: translateY(-50%) scale(0.95);
		opacity: 0.9;
	}
}

.sidebar {
	width: 18%;
	/* Reduced from 22% */
	height: 100vh;
	background-color: #fff;
	border-right: 1px solid #e0e0e0;
	overflow-y: auto;
}

.content {
	width: 82%;
	/* Increased from 78% */
	height: 100vh;
	display: flex;
	flex-direction: column;
}

.chat-header,
.sidebar-header,
.message-header {
	height: 36px !important;
	/* Force exact same height */
	min-height: 36px !important;
	max-height: 36px !important;
	padding: 0 10px;
	display: flex;
	align-items: center;
	background: #ffffff;
	border-bottom: 1px solid #e4e6eb;
	font-size: 13px;
	font-weight: 500;
}

.chat-header h2,
.sidebar-header h2 {
	font-size: 16px;
	/* Reduced from 18px */
	margin: 0;
	color: #333;
}

.message-container {
	padding: 0 4px;
	/* Reduced side padding to allow bubbles closer to edges */
}

.message {
	max-width: 65%;
	padding: 4px 8px;
	margin: 1px 4px;
	/* Reduced side margins */
	border-radius: 12px;
	font-size: 10px;
	/* Reduced message text size further */
	line-height: 1.2;
}

.message.received {
	background-color: #f0f2f5;
	border-bottom-left-radius: 4px;
	margin-left: 2px;
	/* Closer to left side */
}

.message.sent {
	background-color: #0084ff;
	color: white;
	border-bottom-right-radius: 4px;
}

.message-time {
	font-size: 9px;
	/* Reduced timestamp size */
	color: #8e8e8e;
	margin-top: 1px;
}

.friend-chat {
	padding: 6px 10px;
	height: 36px;
	background: linear-gradient(to right, rgba(248, 249, 250, 0.5), rgba(255, 255, 255, 0.8));
	border-bottom: 1px solid #e4e6eb;
}

.friend-chat:hover {
	background: linear-gradient(to right, rgba(248, 249, 250, 0.8), rgba(255, 255, 255, 0.9));
}

.friend-chat.active {
	background: linear-gradient(to right, #e3f2fd, #ffffff);
	border-left: 3px solid #0084ff;
}

.friend-name {
	font-size: 11px;
	/* Reduced size */
	font-weight: 500;
	color: #1c1e21;
}

/* Add subtle shadow to message bubbles */
.message {
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Style the input area */
.message-input {
	background-color: #f8f9fa;
	border-top: 1px solid #e4e6eb;
	padding: 8px;
}

.message-input input {
	font-size: 11px;
	padding: 6px 12px;
	border-radius: 20px;
	border: 1px solid #e4e6eb;
	background-color: white;
}

/* Add subtle hover effect to messages */
.message:hover {
	filter: brightness(98%);
}

/* Mobile optimizations */
@media (max-width: 768px) {
	.sidebar {
		width: 28%;
		/* Adjusted for mobile */
	}

	.content {
		width: 72%;
		/* Adjusted for mobile */
	}

	.message {
		max-width: 85%;
		font-size: 12px;
	}
}

/* Trip Planner Styles */
.trip-planner-button {
	position: fixed;
	bottom: 80px;
	right: 20px;
	width: 50px;
	height: 50px;
	background-color: #0056b3;
	color: white;
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 24px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	transition: background-color 0.3s;
	z-index: 1000;
}

.trip-planner-button:hover {
	background-color: #004494;
}

.trip-planner-window {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background-color: #f0f2f5;
	z-index: 2000;
	flex-direction: column;
	overflow: hidden;
}

.trip-planner-top-bar {
	width: 100%;
	height: 40px;
	background-color: #4285F4;
	background: linear-gradient(135deg, #4285F4, #3b78e7);
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 1.1em;
	font-weight: 600;
	letter-spacing: 0.3px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.trip-planner-top-bar span {
	text-align: center;
}

/* Mobile optimization */
@media (max-width: 768px) {
	.trip-planner-window {
		top: 0;
		left: 0;
		transform: none;
		width: 100%;
		height: 100vh;
		border-radius: 0;
	}
}

/* ... existing trip planner styles ... */

.trip-item {
	padding: 15px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	margin-bottom: 10px;
	background-color: white;
}

.trip-item h3 {
	margin: 0 0 5px 0;
	color: #333;
}

.trip-item p {
	margin: 0;
	color: #666;
	font-size: 0.9em;
}

.form-button {
	background-color: #4285F4;
	color: white;
	border: none;
	border-radius: 4px;
	padding: 10px 20px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.2s;
}

.form-button:hover {
	background-color: #357ae8;
}

#back-to-planner-btn {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	padding: 12px 24px;
	background-color: #4285F4;
	color: white;
	border: none;
	border-radius: 25px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	display: none;
	z-index: 1000;
	transition: all 0.2s ease;
}

#back-to-planner-btn:hover {
	background-color: #357ae8;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.hidden-during-selection {
	display: none !important;
}

.trip-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px;
	border-bottom: 1px solid #eee;
	transition: background-color 0.2s;
}

.trip-item:hover {
	background-color: #f8f9fa;
}

.trip-info {
	flex: 1;
}

.trip-info h3 {
	margin: 0 0 5px 0;
	font-size: 16px;
}

.trip-info p {
	margin: 0;
	color: #666;
	font-size: 14px;
}

.trip-actions {
	display: flex;
	gap: 5px;
}

.trip-actions button {
	padding: 6px 12px;
	font-size: 14px;
	border: none;
	border-radius: 4px;
	color: white;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
	transition: all 0.2s ease;
}

.trip-actions button:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.trip-actions .maps-btn {
	background-color: #4285F4 !important;
}

.trip-actions .maps-btn:hover {
	background-color: #357ABD !important;
}

.trip-actions button i {
	font-size: 14px;
}

.custom-number-icon {
	background: none;
	border: none;
}

.marker-number {
	font-family: Arial, sans-serif;
	font-size: 14px;
}

.trip-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px;
	border-bottom: 1px solid #eee;
	transition: background-color 0.2s;
}

.trip-item:hover {
	background-color: #f8f9fa;
}

.trip-info {
	flex: 1;
}

.trip-info h3 {
	margin: 0 0 5px 0;
	font-size: 16px;
}

.trip-info p {
	margin: 0;
	color: #666;
	font-size: 14px;
}

.trip-actions {
	display: flex;
	gap: 5px;
}

.trip-actions button {
	padding: 6px 12px;
	font-size: 14px;
	border: none;
	border-radius: 4px;
	color: white;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
	transition: all 0.2s ease;
}

.trip-actions button:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.trip-actions .maps-btn {
	background-color: #4285F4 !important;
}

.trip-actions .maps-btn:hover {
	background-color: #357ABD !important;
}

.trip-actions button i {
	font-size: 14px;
}

.points-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.points-title {
	font-size: 0.9em;
	margin: 0;
	color: #666;
}

.add-points-btn {
	background-color: #4285F4;
	color: white;
	border: none;
	border-radius: 4px;
	padding: 6px 12px;
	font-size: 0.85em;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	height: 28px;
}

.add-points-btn i {
	font-size: 0.9em;
}

.add-points-btn:hover {
	background-color: #357ABD;
}

.trip-point-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 8px;
	border-bottom: 1px solid #eee;
	background: #f8f9fa;
	margin-bottom: 4px;
	border-radius: 4px;
}

.point-name {
	font-size: 0.85em;
	color: #333;
	margin-right: 8px;
	flex: 1;
}

.point-remove-btn {
	background-color: #dc3545;
	color: white;
	border: none;
	border-radius: 3px;
	width: 24px;
	height: 24px;
	font-size: 0.8em;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.point-remove-btn:hover {
	background-color: #c82333;
}

.points-list {
	border: 1px solid #e9ecef;
	border-radius: 4px;
	padding: 8px;
	max-height: 200px;
	overflow-y: auto;
}

.points-list::-webkit-scrollbar {
	width: 6px;
}

.points-list::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 3px;
}

.points-list::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 3px;
}

.no-points {
	text-align: center;
	color: #666;
	font-size: 0.85em;
	padding: 10px;
}

/* Add these styles to your existing CSS */
.long-press-indicator {
	position: fixed;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	border: 4px solid #007bff;
	pointer-events: none;
	display: none;
	z-index: 9999;
	transform: translate(-50%, -50%);
}

.long-press-indicator::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: rgba(0, 123, 255, 0.1);
	animation: fillCircle 1s linear forwards;
}

@keyframes fillCircle {
	from {
		transform: scale(0);
	}

	to {
		transform: scale(1);
	}
}

.long-press-indicator.active {
	display: block;
}

.custom-user-marker {
	background: none;
	border: none;
}

.user-marker-container {
	position: relative;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #4285F4;
	border: 2px solid #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	overflow: hidden;
}

.user-marker-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.user-marker-fallback {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: none;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 20px;
}

.no-image .user-marker-fallback {
	display: flex;
}

.upload-status {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(0, 0, 0, 0.8);
	color: white;
	padding: 10px 15px;
	border-radius: 20px;
	z-index: 1000;
	white-space: nowrap;
}

.upload-progress {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
}

.upload-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid #ffffff;
	border-top: 2px solid transparent;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

.upload-progress.success {
	color: #4CAF50;
}

.upload-progress.error {
	color: #f44336;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* Splash Screen Modal Styles */
.splash-screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: white;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 10000;
	transition: opacity 0.3s ease-out;
}

.splash-screen.fade-out {
	opacity: 0;
	pointer-events: none;
}

.splash-screen img {
	width: 150px;
	height: auto;
	margin-bottom: 20px;
}

.splash-screen .splash-text {
	font-family: 'Roboto', sans-serif;
	font-size: 18px;
	color: #333;
	text-align: center;
	line-height: 1.4;
}

.trip-planner-main-view {
	max-height: 60vh;
	overflow-y: auto;
}

.trip-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.trip-title {
	font-size: 1.1em;
	margin: 0;
	color: #1a73e8;
}

.add-trip-btn {
	width: 24px;
	height: 24px;
	background-color: #28a745;
	color: white;
	border: none;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 16px;
	padding: 0;
}

.trips-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.trip-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px;
	background: #f8f9fa;
	border-radius: 4px;
	border: 1px solid #e9ecef;
}

.trip-name {
	flex: 1;
	font-size: 0.9em;
}

.trip-actions {
	display: flex;
	gap: 4px;
}

.trip-actions button {
	padding: 4px 8px;
	font-size: 0.8em;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	color: white;
	display: flex;
	align-items: center;
	gap: 4px;
	transition: all 0.2s ease;
}

.trip-actions button:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.trip-actions .maps-btn {
	background-color: #4285F4 !important;
}

.trip-actions .maps-btn:hover {
	background-color: #357ABD !important;
}

.trip-actions button i {
	font-size: 14px;
}

.view-btn {
	background-color: #28a745;
}

.delete-btn {
	background-color: #dc3545;
}

.trip-planner-create-view {
	padding: 20px;
}

.form-group {
	margin-bottom: 15px;
}

.form-group label {
	display: block;
	margin-bottom: 5px;
	color: #333;
}

.form-control {
	width: 100%;
	padding: 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.add-points-btn {
	background-color: #4285F4;
	color: white;
	border: none;
	border-radius: 4px;
	padding: 8px 15px;
	cursor: pointer;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 5px;
	margin-bottom: 10px;
}

.add-points-btn:hover {
	background-color: #357ae8;
}

.form-actions {
	display: flex;
	gap: 10px;
	margin-top: 20px;
}

.save-trip-btn,
.cancel-btn {
	padding: 8px 15px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 14px;
}

.save-trip-btn {
	background-color: #28a745;
	color: white;
}

.save-trip-btn:hover {
	background-color: #218838;
}

.cancel-btn {
	background-color: #dc3545;
	color: white;
}

.cancel-btn:hover {
	background-color: #c82333;
}

.trip-points-list {
	margin-top: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	max-height: 300px;
	overflow-y: auto;
}

.trip-point-item {
	display: flex;
	align-items: center;
	padding: 8px;
	border-bottom: 1px solid #eee;
}

.trip-point-item:last-child {
	border-bottom: none;
}

.point-name {
	flex: 1;
	font-size: 14px;
}

.point-remove-btn {
	background-color: #dc3545;
	color: white;
	border: none;
	border-radius: 4px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.point-remove-btn:hover {
	background-color: #c82333;
}