/* Login Page Styling */
.login-wrapper {
    height: 100vh;
}

/* Style the login container with rounded corners and a slight shadow */
.login-container {
    position: fixed;
    bottom: 85px;
    left: 125px;
    background-color: rgba(255, 255, 255, 0.7); /* Slightly transparent white */
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 300px;
    text-align: center;
}

.login-container h2 {
    margin-top: 0;
}

/* Style the form elements */
.login-container form {
    display: flex;
    flex-direction: column;
}

.login-container label {
    text-align: left;
    margin-bottom: 5px;
    font-weight: bold;
}

.login-container input {
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Style the Login button */
.login-container button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #132f44;
    color: #fff;
    cursor: pointer;
}

.login-container button:hover {
    background-color: #57f3f2;
}

/* Area below the Login button for error messages */
.error-message {
    margin-top: 10px;
    color: red;
    font-size: 0.9em;
}

/* Start Main Page Styling */
html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
	overflow: hidden;
	font-family: Arial, sans-serif;
}

body {
    display: flex;
}

#sidebar {
    width: 300px;
    background: #222;
    color: white;
    padding: 10px;
    height: 100vh;
	box-sizing: border-box;
    overflow-y: auto;
	overflow-x: hidden;
}

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

.sidebar-header h2 {
    margin: 0;
}

.menu-icon {
    width: 75px;
    height: 75px;
    object-fit: contain;
}

#sidebar h2 {
    margin-top: 0;
}

#sidebar input {
    width: 90%;
    padding: 5px;
    margin: 5px 0;
	box-sizing: border-box;
}

/* User Info container in the sidebar */
#userInfo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

#loggedInUser {
    font-weight: bold;
}

/* User menu button */
#userMenuBtn {
    cursor: pointer;
    padding: 5px;
}

/* User dropdown menu styling */
.user-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: #333;
    color: white;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000;
}

.user-menu a {
    display: block;
    padding: 8px;
    color: white;
    text-decoration: none;
}

.user-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
}

#chatList {
    list-style: none;
    padding: 0;
}

#chatList li {
    cursor: pointer;
    padding: 10px;
    border-bottom: 1px solid #444;
    transition: background-color 0.3s ease, border-radius 0.3s ease;
}

#chatList li:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.menu-btn {
    float: right;
    cursor: pointer;
    padding: 5px;
}

.chat-menu {
    position: absolute;
    background: #333;
    color: white;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
	z-index: 1000;
}

.chat-menu button {
    display: block;
    width: 100%;
    padding: 8px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    text-align: left;
}

.chat-menu button:hover {
    background: rgba(255, 255, 255, 0.2);
}

#newChatBtn {
	width: 100%;
	margin-top: 10px;
	padding: 10px 10px;
	cursor: pointer;
	border: none;
	background: #007BFF;
	color: $fff;
	border-radius: 4px;
}

/* Chat Window container */
#chatWindow {
    flex: 1;
    position: relative;
    background: #f9f9f9;
    height: 100vh;
    box-sizing: border-box;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

/* Chat Box: scrollable area for messages */
#chatBox {
    height: calc(100% - 100px);
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
}

/* Chat Input Area */
#chatInputArea {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #ccc;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
	z-index: 100;
}

#userInput {
    flex: 1;
    height: 60px;
    padding: 10px;
    border: 1px solid #ccc;
    resize: none;
}

/* Send button styling */
#sendMessage {
    padding: 10px 20px;
    margin-left: 10px;
    cursor: pointer;
    border: none;
    background: #007BFF;
    color: #fff;
    border-radius: 4px;
}

/* Message bubble styling */
.message {
    max-width: 70%;
    padding: 10px;
    margin: 10px;
    border-radius: 15px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.user {
    background-color: #DCF8C6; /* user bubble color */
    align-self: flex-end;
    border-bottom-right-radius: 0;
	margin-left: auto;
}

.message.ai {
    background-color: #FFF;
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

/* Reasoning bubble styling */
.reasoning-container {
    max-width: 70%;
    background-color: #f0f0f0;
    color: #555;
    border-radius: 10px;
    padding: 8px;
    margin: 10px;
    align-self: flex-start;
    font-size: 0.9em;
}

.reasoning-header {
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    font-weight: bold;
}

.reasoning-content {
    margin-top: 5px;
}

button {
    border: none;
    background: #007BFF;
    color: #fff;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Modal Overlay styling */
#modalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* slightly opaque */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* Modal Content */
#modalContent {
    text-align: center;
    color: #fff;
}

/* Spinner */
.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Modal Message */
.modalMessage {
    margin-top: 10px;
    font-size: 18px;
}
