

/*==============================================*/
/*============ General Body Styling ============*/
/*==============================================*/


body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #f9f9f9;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh; 
}


/* ---- Roboto Font Familty variations ---------*/
h1, h2, h3 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700; /* Bold for headings */
}

p {
  font-family: 'Roboto', sans-serif;
  font-weight: 400; /* Regular for paragraphs */
}


/*==============================================*/
/*=========== Main Layout Sctructure ==========*/
/*==============================================*/

#main-layout {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 20px;
  width: 100%;

  min-width: 1280px; /* Minimum width before scrolling appears */
  margin: 0 auto;
  padding: 5px;
  box-sizing: border-box;
  height: 100vh; /* Full viewport height */
}


/* -------- Initial Screen Structure --------- */

#initial-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #ffffff; /* Optional background */
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  
  /* Ensure full width and height */
  width: 100%; /* Full width of the viewport */
  height: 100%;
  margin: 0; /* Remove any default margins */
  padding: 0;
}


/* ------- Conversation screen Structure ------ */

#conversation-screen {
  display: flex;
  flex: 1 1 15%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 95%;
  /*height: auto;*/
  max-width: 800px;
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  min-width: 300px;
  overflow-y: auto;
}

#conversation-screen.active {
  flex: 1 1 15%; /* Takes 20% width when alongside the chart-screen */
}



@media (max-width: 1280px) {
  #main-layout {
    flex-direction: column; /* Stack conversation and display vertically */
    gap: 10px;
    min-width: 100%; /* Adjust for smaller screens */
  }

  #display-screen {
    flex: 1 1 auto; /* Allow the items to adjust their width */
    width: 100%; /* Occupy full width in stacked layout */
    max-width: 100%; /* Prevent overflow */
  }
  
  
  #conversation-screen {
    flex: 1 1 auto; /* Allow the items to adjust their width */
    width: 100%; /* Occupy full width in stacked layout */
    max-width: 100%; /* Prevent overflow */
    max-height: 200px;
  }
  
}



/* ---------- Display screen Structure  ------- */

#display-screen {
  height: 100%; /* Full height of the viewport */
  display: none; /* Hidden by default */
  justify-content: space-between;
  background-color: #f9f9f9; /* Optional background color */
  overflow-y: auto;
}

#display-screen.active {
  flex: 0 1 85%; /* Takes 85% of the width when alongside #conversation-screen */
  display: flex; /* Make it visible when active */
}












/*=================== Initial Screen Box  =======================*/




/* Logo section */

.initial-screen-box {
  text-align: center;
  background-color: #ffffff;
  padding: 10px;
  border-radius: 10px;
  box-sizing: border-box;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 70%;
  transition: all 0.5s ease-in-out;
}


/* Logo Styling on Initial Screen */

.initial-screen-logo {
  width: 80px;
  height: auto;
  margin-bottom: 10px;
}


/* Message Section */
.initial-screen-message-heading {
  margin-bottom: 20px;
  font-size: 1.2rem;
  color: #333;
  width: 100%;
  text-align: center;
}


/* Button portion */
.initial-screen-button-section {
  display: flex;
  justify-content: center;
  gap: 15px;
}


/* Icon Buttons */
.initial-screen-button-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.initial-screen-button-icon img {
  width: 50px;
  height: 50px;
}

.initial-screen-button-icon:hover {
  background-color: #e0e0e0;
}

.initial-screen-button-icon:active img {
  filter: brightness(0.8);
}







/*=================== Conversation Screen  =======================*/




/* Logo & Button section */
.conversation-screen-logo-and-button-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Logo Styling */
.conversation-screen-logo {
  width: 60px;
  height: auto;
}

/* Icon Buttons */
.conversation-screen-button-icon {
  background: none;
  border: none;
  cursor: pointer;
  justify-content: flex-end;
  padding: 10px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.conversation-screen-button-icon img {
  width: 50px;
  height: 50px;
}

.conversation-screen-button-icon:hover {
  background-color: #e0e0e0;
}

.conversation-screen-button-icon:active img {
  filter: brightness(0.8);
}





/* Chat Container Styling */

#chat-container {
  display: flex;
  flex-direction: column;
  width: 96%;
  /*height: 250px;*/
  max-height: 200px;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 5px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  gap: 5px; /* Space between messages */
  /*background: url('../images/advisor-watermark.gif') no-repeat left center; 
  background-size: 50%;*/
  overflow-y: auto;
}


@media (max-width: 1280px) {
  #chat-container {
    max-height: 400px; /* Reduce the height for smaller screens */
    background-color: #ffffff;
  }
}




/* Message Styling */
#chat-container p {
  margin: 0;
  padding: 5px 10px;
  border-radius: 5px;
  max-width: 85%;
  word-wrap: break-word;
  background-color: rgba(255, 255, 255, 0.8); /* Slightly transparent background for messages */
}

/* Chat Content */
#chat-content {
  position: relative; /* Ensure content is positioned relative to the chat container */
  z-index: 1; /* Place chat content above the background */
  flex: 1; /* Chat content takes up remaining space */
  display: flex;
  flex-direction: column; /* Stack messages vertically */
  justify-content: flex-start;
  align-items: flex-start;
  width: 95%;
  /*padding: 5px;*/

  overflow-y: auto; /* Allow scrolling for chat messages */
}


/* Conversation Screen Initial Message */
.conversation-screen-initial-message {
  margin-bottom: 20px;
  font-size: 1.2rem;
  color: #333;
  width: 100%;
  text-align: center;
  animation: blinkText 2s infinite ease-in-out;
}

@keyframes blinkText {
    10% { opacity: 1; }   /* Visible */
    30% { opacity: 1; }  /* Stay visible longer */
    50% { opacity: 0; }  /* Hidden */
    70% { opacity: 0; }  /* Stay hidden longer */
    100% { opacity: 1; } /* Visible again */
}



/* Scrolling for chat messages */
#chat-container::-webkit-scrollbar {
  width: 4px;
}

#chat-container::-webkit-scrollbar-thumb {
  background: #cfcfcf;
  border-radius: 4px;
}









/* UNUSED??????????????????????????????????? */
/* User messages */
.user-message {
  align-self: flex-start;
  background-color: rgba(128, 188, 215, 0.8);
  color: #BC4C14;
  font-weight: normal;
}

.user-message {
  color: #333;
  font-weight: bold;
}


/* UNUSED??????????????????????????????????? */
/* Assistant messages */
.assistant-message {
  align-self: flex-end;
  background-color: rgba(255, 255, 255, 0.8);
  color: #042433;
  font-weight: normal;
  border: 1px solid #ddd;
}


/* UNUSED??????????????????????????????????? */
/* Advisor Watermark Image */
.advisor-watermark {
  flex: 0 0 50px; /* Fix width of the watermark image */
  height: auto; /* Maintain aspect ratio */
  margin-right: 10px; /* Space between watermark and chat content */
  opacity: 1.0; /* Light watermark effect */
  pointer-events: none; /* Prevent interaction with the image */
}












/*=================== Display Screen  =======================*/



.display-container {
    width: 95%;
    margin: 10px auto;
    padding: 10px;
}





.controls {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}


.controls .control {
    flex: 1;
    text-align: center;
}


.controls label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.controls input[type="range"] {
    width: 80%;
    padding: 5px;
}

.controls input[type="text"] {
    width: 80%;
    padding: 5px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    text-align: center;
}

.controls button {
    padding: 10px 20px;
    background-color: #E97132;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.controls button:hover {
    background-color: #BC4C14;
}

.control button {
    flex: 1 1 20%; /* Occupy 20% of available width */
    width: 20%;
    height: 25px;
    padding: 0; /* Remove extra padding */
    text-align: center; /* Center text */
    cursor: pointer; /* Show pointer cursor */
    background-color: #80BCD7; /* Button color */
    color: white; /* Text color */
    border: none; /* Remove border */
    border-radius: 5px; /* Optional rounded corners */
    box-sizing: border-box; /* Include padding in width */
}

/* Button hover effect */
.control button:hover {
    background-color: #0078AE; /* Darken color on hover */
}












/* ????????????????????????? */




.menu-container {
    display: flex;
    gap: 10px;
}

.menu-item {
    padding: 10px 20px;
    background-color: #0078AE;
    color: white;
    border-radius: 3px;
    cursor: pointer;
}


a {
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Optional: Ensure the link color matches its surrounding */
}

.menu-item:hover {
    text-decoration: none; /* Remove underline on hover */
}


.menu-item.active {
    background-color: #f4f4f4;
    color: #80BCD7;
    border: 1px solid #80BCD7;
}










/* ---------- Display Chart and Assumptions Section  ------- */


.two-columns {
    display: flex;
    width: 100%;
    margin-top: 20px;

}

.column {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 10px;
}

.left-column {
    flex: 75%; /* 75% width */
    background-color: #f9f9f9;
}

.right-column {
    flex: 25%; /* 25% width */
    background-color: #f4f4f4;
    padding: 10px 10px;
    min-width: 300px;
}


@media (max-width: 1024px) {
  .left-column,
  .right-column {
    width: 100%; /* Ensure they occupy full width when stacked */
    min-width: unset; /* Remove minimum width constraint */
  }
}


@media (max-width: 1024px) {
  .two-columns {
    flex-direction: column; /* Stack sections vertically */
    gap: 20px; /* Add space between sections */
    align-items: center; 
  }

  .left-column {
    flex: 1; /* Adjust to take up full width when stacked */
  }

  .right-column {
    flex: 1; /* Adjust to take up full width when stacked */
  }
}





/* UNUSED??????????????????????????????????? */
canvas#assetChart {
  width: 100%; /* Occupy full width */
  height: 100%; /* Occupy full height */
  display: block; /* Prevent inline spacing issues */
}

.chart-section-left {
    display: flex;
    flex: 1;
    height: 100%; /* Take full vertical height */
}
































/* UNUSED??????????????????????????????????? */
/* Form Styling */
.form-container {
  text-align: center;
  font-size: 1rem;
  color: #333;
  margin-top: 20px;
}

h2 {
  font-size: 1.5rem;
  color: #444;
}

input[type="text"] {
  width: 80%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button.start-button {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  margin-top: 20px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

button.start-button:hover {
  background-color: #0056b3;
}

































/* Controls Styling */
#controls {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

#controls button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

#controls button img {
  width: 60px;
  height: auto;
  transition: transform 0.3s, filter 0.3s;
}

#controls button:disabled img {
  filter: grayscale(100%);
  cursor: not-allowed;
}

#controls button:hover img {
  transform: scale(1.1);
  filter: brightness(0.8);
}



/* UNUSED??????????????????????????????????? */
/* Responsive Design */
@media (max-width: 768px) {
  #conversation-screen {
    max-width: 90%;
  }

  #chat-container {
    height: 400px;
  }

  #controls button img {
    width: 50px;
  }
}



/* UNUSED??????????????????????????????????? */
@media (max-width: 480px) {
  #controls button img {
    width: 40px;
  }

  #logo {
    width: 60px;
  }
}


/*----------------===========------------------------*/









.assumptions {
    border-radius: 5px;
    background-color: #f4f4f4;
}

.assumptions h3 {
    margin-top: 0;
    border-bottom: 2px solid #0078AE;
    padding-bottom: 5px;
    color: #333;
}

.assumptions .control {
    display: flex; /* Align items horizontally */
    align-items: center; /* Vertically center items */
    justify-content: flex-start; /* Align items to the left */
    gap: 5px; /* Add space between elements */
    margin-bottom: 10px; /* Preserve spacing between controls */
}

.assumptions label {
    flex: 0 0 140px; /* Fixed width for the label */
    font-weight: normal;
    text-align: right; /* Align text to the right */
    margin: 0; /* Ensure no unnecessary margins */
}

.assumptions input {
    width: calc(100% - 400px);
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;

}

.assumptions select {
    width: auto;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px; /* Match the font size of other inputs */
    background-color: #fff;
    text-align: left;
}


.number-input {
    display: flex;
    align-items: center;
    gap: 5px; /* Space between buttons and input */
}

.number-input button {
    width: 25px;
    height: 25px;
    border: 1px solid #ccc;
    background-color: #f4f4f4;
    line-height: 1;
    font-weight: bold;
    color: #ccc;
    cursor: pointer;
    text-align: center;
    padding: 0;
    border-radius: 4px;
}

.number-input button:hover {
    background-color: #f0f0f0;
}

.number-input input {
    width: 50px;
    text-align: center;
    border: 1px solid #ccc;
    font-weight: normal;
    border-radius: 4px;
    padding: 5px;
    background-color: #fff;
}


/* -------------------Insights-------------------- */

/* Summary Section */
.summary-section {
    margin-top: 20px; /* Add spacing from the Assumptions section */
    padding: 10px; /* Add padding inside the section */
}

.summary-label {
    display: block; /* Ensure the label takes full width */
    font-weight: bold; /* Bold text */
    margin-bottom: 10px; /* Spacing between the label and the line */
    text-align: left; /* Align the text to the left */
    padding-left: 5px; /* Optional: Add some padding */
    border-bottom: 2px solid #0078AE; /* Blue line under the label */
    padding-bottom: 5px; /* Space between text and border */
}

.summary-box {
    position: relative; /* Ensure the text appears on top of the background */
    background: url('../images/advisor-watermark.gif') no-repeat center center;
    background-size: contain; /* Scale the watermark to fit */
    background-color: white; /* White background */
    border: 1px solid #ccc; /* Light border */
    border-radius: 5px; /* Rounded corners */
    padding: 10px; /* Inner padding */
    font-size: 14px; /* Font size */
    color: #333; /* Text color */
    height: 150px; /* Fixed height */
    overflow-y: auto; /* Enable vertical scrolling if content exceeds height */
    text-align: left; /* Align text content to the left */
}


/* UNUSED??????????????????????????????????? */
#summary-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/advisor-watermark.gif') no-repeat center center;
    background-size: contain;
    opacity: 0.2; /* Make the watermark less prominent */
    z-index: 1; /* Place it below the text */
}

#summary-box > span {
    position: relative;
    z-index: 2; /* Ensure the text appears on top */
}

/* -------------------Expense Form Styles-------------------- */
/* -------------------Expense Form Styles-------------------- */
/* -------------------Expense Form Styles-------------------- */
/* -------------------Expense Form Styles-------------------- */
/* -------------------Expense Form Styles-------------------- */
/* -------------------Expense Form Styles-------------------- */


/*--------------------General Styles--------------------*/

.title-section {
    text-align: left; /* Align title to the left */
    padding-left: 20px; /* Add padding for spacing */
    margin-top: 20px; /* Spacing below the banner */
    margin-bottom: 10px; /* Spacing between the title and the form */
}

.title-section h2 {
    font-size: 24px;
    color: #333; /* Title color */
}

/*--------------------Expense Form Styles--------------------*/

#expense-name {
    flex-grow: 2; /* Allows the field to take up more space */
    min-width: 180px; /* Sets a minimum width */
    max-width: 400px; /* Maximum width */
}

#expense-amount {
    flex-grow: 1; /* Grow proportionally */
    max-width: 150px; /* Maximum width */
}

#from-year,
#to-year {
    flex-grow: 1; /* Grow proportionally */
    max-width: 80px; /* Maximum width */
}

.expense-form {
    display: flex;
    justify-content: flex-start; /* Align fields and button to the left */
    align-items: center; /* Vertically align fields and button */
    gap: 10px; /* Add space between form elements */
    padding-left: 20px; /* Align the form with the title */
}

/* General input field styles */
.expense-form input,
.expense-form select,
.expense-form button {
    padding: 10px; /* Consistent padding for all fields */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px; /* Uniform font size */
    height: 40px; /* Set consistent height */
    box-sizing: border-box; /* Ensure padding doesn't affect height */
    width: auto;
}





/* UNUSED??????????????????????????????????? */
/* Specific styles for year input fields */
.year-input {
    flex-grow: 1; /* Allow proportional resizing */
    max-width: 80px; /* Restrict maximum width */
    height: 40px; /* Explicitly set height to match other inputs */
    line-height: normal; /* Fix alignment issues in some browsers */
}



.expense-form button {
    background-color: #E97132; /* Button color */
    color: white; /* Text color */
    border: none; /* Remove border */
    cursor: pointer; /* Pointer cursor */
}

.expense-form button:hover {
    background-color: #BC4C14; /* Hover effect for button */
}


/* Style for the expense display box */
.expense-display-box {
    border: 1px solid #aaa;
    background-color: #ccc;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: normal;
    color: #000;
    margin-left:100px;
    float: right;
}

/* Style for the expense form container */
.expense-form-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}





/* Divider line between sections */
.section-divider {
    border-top: 2px solid #ccc; /* Horizontal line */
    margin: 20px auto; /* Spacing above and below */
    width: 100%; /* Full-width line */
}

/*--------------------Table Styles--------------------*/


#expense-table {
    display: none; /* Initially hide the table */
}


.table-wrapper {
    display: flex;
    align-items: center; /* Align vertically */
    justify-content: flex-start; /* Align left */
    margin: 20px auto; /* Spacing around the table */
}

.table-container {
    overflow-x: auto; /* Enable horizontal scrolling */
    flex-grow: 1; /* Allow table to expand */
    margin: 0 5px; /* Space on the sides */
    white-space: nowrap; /* Prevent wrapping */

}

#expense-table {
    border-collapse: collapse; /* Remove gaps between table cells */
    width: max-content; /* Dynamically adjust table width */
}

#expense-table th,
#expense-table td {
    padding: 15px; /* Padding inside cells */
    border: 1px solid #ccc; /* Border around cells */
    text-align: center; /* Center-align text */
}

#expense-table th {
    background-color: #f4f4f4; /* Set background color to white */
    color: #333; /* Set text color to dark */
    font-weight: bold; /* Ensure bold text */
    text-align: center; /* Align text to center */
    border: none; /* Remove all borders initially */
    border-bottom: 2px dotted #ccc; /* Add dotted bottom border */
}

/* Style for year header cells */
.year-header {
    background-color: #f9f9f9; /* Light gray background */
    border-bottom: 1px dotted #ccc; /* Dotted bottom border */
    color: #333; /* Dark text color */
    font-weight: bold;
    text-align: center;
}

.expense-description {
    width: 300px; /* Set the desired width */
    text-align: left; /* Optional: Align the content to the left */
    white-space: nowrap; /* Prevent text from wrapping */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Add ellipsis if text overflows */
}

#expense-table td:first-child {
    text-align: left; /* Align text to the left */
    padding-left: 10px; /* Optional: Add some padding for spacing */
}

/* Add a thicker right border for the "Years" column */
#expense-table th:nth-child(3), /* Header for the Years column */
#expense-table td:nth-child(3)  /* Cells for the Years column */
{
    border-right: 3px solid #ccc; /* Thicker right border */
}


/* Header row: Add a right border after the column with the right scroll button */
#expense-table th:last-child {
    border-right: 3px solid #ccc; /* Add a thicker right border */
}

/* Data rows: Add only the left border for the last column (right scroll button) */
#expense-table td:last-child {
    border: none; /* Remove all borders */
    border-right: 3px solid #ccc; /* Add a thicker left border */
}


/* Highlight alternate rows */
.even-row {
    background-color: #f9f9f9; /* Light gray for even rows */
}

.odd-row {
    background-color: white; /* White for odd rows */
}

/* Highlight active cells */
.highlight-cell {
    background-color: #0078AE; /* Dark blue for highlighted cells */
    color: white; /* White text for contrast */
    font-weight: normal; /* Bold text */
    text-align: center; /* Center-align text */
}

/*--------------------Scroll Button Styles--------------------*/
/* UNUSED??????????????????????????????????? */
.scroll-container {
    width: 50px; /* Adjust width as necessary */
    text-align: center;
}

/* UNUSED??????????????????????????????????? */
.scroll-left,
.scroll-right {
    background-color: #cccccc;
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: bold;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-left:hover,
.scroll-right:hover {
    background-color: #999999;
}

.delete-button {
    background-color: #cccccc; /* Button color */
    color: #fff; /* Text color */
    border: none; /* No border */
    font-size: 14px; /* Font size */
    font-weight: bold;
    width: 30px; /* Button width */
    height: 30px; /* Button height */
    border-radius: 50%; /* Make it circular */
    cursor: pointer; /* Pointer cursor */
    text-align: center;
    line-height: 30px; /* Vertically center the text */
    align-items: center;
    justify-content: center;
}

.delete-button:hover {
    background-color: #999999; /* Darker hover effect */
}


/* Styling for the Total Row */
.total-row {
    background-color: #80BCD7; /* Light blue background */
    font-weight: bold; /* Bold text */
}



/* UNUSED??????????????????????????????????? */
.total-row td {
    text-align: center; /* Center align text */
    font-weight: bold; /* Bold text */
}













/* UNUSED??????????????????????????????????? */
/* Transition Styling */
.transition-container {
  opacity: 0;
  transform: scale(0.9);
  animation: fadeIn 0.5s forwards;
}



/* UNUSED??????????????????????????????????? */
@keyframes fadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}


/* UNUSED??????????????????????????????????? */
.banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #042433;
    padding: 15px;
    color: White;
}


/* UNUSED??????????????????????????????????? */
.banner .logo {
    width: 80px;
    height: auto;
}