/* style.css */

html,
body {
    height: 100%;  /* Fallback for older browsers */
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Fallback */
    min-height: 100dvh; /* Use dvh for dynamic viewport height */
}

*, *::before, *::after {
    box-sizing: border-box;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1600px;
    margin: auto;
    /* height: 100vh;  Removed:  Let the inner container handle height */
    /* max-height: 100vh; Removed */
    flex-grow: 1; /* Make it grow */
}

.chat-container {
    width: 100%;
    background-color: #fff;
    border-radius: 0px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* Use 100% height within the flex container */
      max-height: 100dvh;
}

.left-pane {
    width: 350px;
    background-color: #eee;
    border-right: 1px solid #ccc;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    /*Initially hide on smaller screens*/
    display: none;

    background-color: #f9f9f9; /* Light background for the pane */
    border-right: 1px solid #ddd; /* Subtle border */
    padding: 10px;
    box-sizing: border-box; /* Important: Include padding in width */
}


.left-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}


h1 {
    text-align: left;
    padding: 10px;
    margin: 0;
    color: #333;
    background-color: #eee;
    border-bottom: 1px solid #ccc;
}

#chat-output {
    padding: 10px 20px;
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.6;
    flex-grow: 1; /*  VERY IMPORTANT:  Allows chat output to fill space */
    background: #ECE5DD;
}

.message {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 15px;
    clear: both;
    word-wrap: break-word;
}

.user-message {
    background-color: #DCF8C6;
    float: right;
    text-align: left;
}

.gemini-message {
    background-color: white;
    float: left;
    text-align: left;
    max-width: calc(95%);
}

#message-input-area {
    padding: 15px;
    border-top: 1px solid #ccc;
    box-sizing: border-box;
    display: flex;
     /* No need for fixed positioning or bottom: 0; */
}

#message-input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    overflow: hidden;
    resize: none;
    min-height: 30px;
    font-family: sans-serif;
    max-height: 300px;
}

#message-input:focus {
    outline: none;
    border-color: #66afe9;
    box-shadow: 0 0 5px rgba(102, 175, 233, .5);
}

pre code {
    display: block;
    padding: 15px;
    background-color: #2d2d2d;
    color: #f8f8f2;
    border-radius: 5px;
    overflow-x: auto;
    font-family: monospace, monospace;
    font-size: 0.9rem;
}


.ora-header {
    background-color:white;
    /* WhatsApp header color */
    color: black;
    padding: 15px;
    padding-top: 5px;
    padding-bottom: 5px;
    text-align: left;
    font-weight: bold;
    font-size: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ccc;

}


/* Styles for the open/close buttons */
.open-button,
.close-button {
    background: none;
    border: none;
    color: black;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0;
}

.open-button:hover,
.close-button:hover {
    opacity: 0.8;
}


/*Media query for large screens*/
@media (min-width: 768px) {
    .left-pane {
        display: block;
        /* Make visible on larger screens */
    }

    .chat-container {
        width: calc(100% - 350px);
        /* Adjust chat container width */
    }

    .ora-header .open-button {
        display: none;
        /* Hide the open button on larger screens */
    }

    .close-button {
        display: none;
        /* Hide the open button on larger screens */
    }
}

/* Style to show the left pane */
.left-pane.open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 10;
    /* Ensure it's on top */
    box-shadow: 3px 0 5px rgba(0, 0, 0, 0.3);

}



.left-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    //margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Subtle divider */
    //padding-bottom: 10px;
}

.left-pane-header h2 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 500;
}

.close-button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2em;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close-button:hover {
    opacity: 1;
}

.left-pane p {
    line-height: 1.6;
    margin-bottom: 20px;
}

.left-pane ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.left-pane ul li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

}

.left-pane ul li:last-child {
    border-bottom: none;
}

.era-container {
  display: flex;
  align-items: center; /* Vertically centers the icon and text */
}

.era-icon {
  width: 36px; /* Slightly larger for better visual weight */
  height: 36px; /* Slightly larger */
  border-radius: 50%;
  background-color: #f0f0f0; /* Keeping this for now */
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px; /* Adjust font size */
  font-weight: 600; /* Slightly bolder weight */
  color: #449455;
  border: 5px solid #a2adff; /* Modified Border Color */
  margin-right: 10px;
  /* Gradient Border (Cross-Browser) */
  background-image: linear-gradient(to bottom right, #73ff92, #feffa2); /* Added gradient to background */
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  font-family: 'Helvetica Neue', sans-serif; /* A cleaner font for initial */
}

.era-text {
  font-size: 16px;
  margin-top: 5px;
  font-family: Arial, sans-serif; /* Set a default font */
}


.left-pane ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.left-pane ul li {
  //margin-bottom: 5px; /* Slightly more spacing between items */
}

.left-pane ul li a {
  display: block;
  padding: 10px 15px; /* Increased padding for better touch targets */
  margin-bottom: 3px;
  text-decoration: none;
  color: #333; /* Darker, more readable text color */
  cursor: pointer;
  border-radius: 5px; /* Rounded corners for a softer look */
  transition: background-color 0.2s ease; /* Smooth hover transition */
  font-size: 16px; /* Adjust font size as needed */
}

.left-pane ul li{
    padding: 0px;
}

.left-pane ul li a.active {
  font-weight: 600; /* Slightly bolder active item */
  background-color: #d0e7ff; /* Muted blue for active state */
  color: #2962ff; /* Darker text color for active state */
}

.left-pane ul li a:hover {
  background-color: #e8f0fe; /* Lighter blue on hover */
}

/* Optional: Add an icon before the text */
.left-pane ul li a i {
  margin-right: 8px; /* Spacing between icon and text */
  font-size: 1.2em; /* Adjust icon size */
  vertical-align: middle; /* Align icon vertically with text */
}


.user-info {
    padding: 10px 0;           /* Add some padding */
    text-align: left;         /* Center the text */
    font-size: 0.9em;          /* Adjust font size as needed */
    color: #666;             /* Adjust color as needed */
    border-top: 1px solid #ccc;  /* Add a subtle top border */
}


table {
  /* 1. Make the table more predictable and easier to manage */
  table-layout: fixed;

  /* 2. Collapse borders for a cleaner look */
  border-collapse: collapse;

  /* 3. Set a width (can be 100% for responsive) */
  width: 100%; /* Or a fixed width like 800px */

  /* 4. Set a font */
  font-family: sans-serif;

  /* 5. Add a subtle box-shadow */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* Header Styles */
thead {
  /* 6. Visually distinct header */
  background-color: #f2f2f2; /* Light gray background */
}

th {
  /* 7. Header cell padding and alignment */
  padding: 12px 15px;
  text-align: left; /* Or center, as desired */
  font-weight: bold;
    color: #ffffff;
    background-color: #54585d;

}

/* Body Styles */
tbody tr:nth-child(odd) {
  /* 8. Zebra striping for readability */
  background-color: #f9fafb;
}
tbody tr:nth-child(even) {
    background-color: #ffffff;
}


td {
  /* 9. Data cell padding */
  padding: 12px 15px;
    border: 1px solid #dddfe1;
    color:#636363
}



/* Hover effect */
tbody tr:hover {
  /* 10. Highlight rows on hover */
  background-color: #e0e0e0; /* Slightly darker gray */
}


/* Optional: Footer Styles */
tfoot {
    background-color:#f2f2f2;
    font-weight: bold;
}
tfoot td{
    padding: 12px 15px;

}

/* Optional: Add borders (if border-collapse isn't enough) */
/* Use this if you *don't* want collapsed borders */
/*
th, td {
  border: 1px solid #ddd;
}
*/

/* Optional: Center table content vertically */
td, th {
    vertical-align: middle;
}



/* Optional: Responsive adjustments (using media queries) */
@media (max-width: 768px) { /* Adjust as needed */
  table, thead, tbody, th, td, tr {
    display: block; /* Stack table elements */
  }

  thead tr {
    position: absolute; /* Hide the header row */
    top: -9999px;
    left: -9999px;
  }

  td {
    /* Create label-like behavior */
    position: relative;
    padding-left: 50%; /* Adjust as needed */
    border:none;
  }

  td:before {
    /* Place labels before content */
    position: absolute;
    left: 6px;
    content: attr(data-label); /* Use data-label attribute */
    font-weight: bold;
    text-transform: uppercase;
      border: none;
  }
    tbody tr:nth-child(odd){
        background-color: transparent;
    }
    tbody tr{
        margin-bottom: 1rem;
        display: block;
        border: 1px solid #ddd;
    }

}


/* CSS to style the copy button */
.code-wrapper {
  position: relative; /* Needed for absolute positioning of the button */
}

.copy-button {
  position: absolute;
  top: 0.5em; /* Adjust as needed */
  right: 0.5em; /* Adjust as needed */
  background-color: #4CAF50; /* Green */
  border: none;
  color: white;
  padding: 5px 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 12px;
  cursor: pointer;
  border-radius: 5px;
  opacity: 0.7; /* Make it slightly transparent */
  transition: opacity 0.3s ease; /* Smooth transition for opacity */
}

.copy-button:hover {
  opacity: 1; /* Fully visible on hover */
}

pre {
  position: relative; /* Ensure pre is positioned relative to the wrapper */
}





/* The Modal (hidden by default) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000; /* Ensure it's on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6); /* Darker overlay */
    transition: opacity 0.3s ease; /* Smooth fade in */
    opacity: 0;
}

.modal.show {
    display: block;
    opacity: 1;
}

/* Modal Content/Box */
.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto; /* Reduced top margin */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    width: 80%;
    max-width: 600px; /* Limit width */
    animation: slideIn 0.4s ease; /* Slide in animation */
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

/* The Close Button */
.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #888;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none; /* Remove default button styling */
    border: none;
    padding: 0;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
}

/* Task Form Styling */
#addTaskForm {
    display: flex;
    flex-direction: column;
}

#addTaskForm > div {
    margin-bottom: 20px;
}

#addTaskForm label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
    display: block; /* Ensure labels take full width */
}

#addTaskForm input[type="text"],
#addTaskForm input[type="date"],
#addTaskForm textarea,
#addTaskForm select {
    width: 100%; /* Use full width */
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    color: #333;
    transition: border-color 0.3s ease;
}

#addTaskForm input[type="text"]:focus,
#addTaskForm input[type="date"]:focus,
#addTaskForm textarea:focus,
#addTaskForm select:focus {
    outline: none;
    border-color: #66b3ff; /* Highlight on focus */
    box-shadow: 0 0 5px rgba(102, 179, 255, 0.5);
}

#addTaskForm textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 100px;
}

#addTaskForm select {
    appearance: none; /* Remove default arrow in some browsers */
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

#addTaskForm button[type="submit"] {
    background-color: #007bff;
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 17px;
    transition: background-color 0.3s ease;
    align-self: flex-start; /* Adjust button alignment */
}

#addTaskForm button[type="submit"]:hover {
    background-color: #0056b3;
}

#addTaskModal h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    #addTaskForm input[type="text"],
    #addTaskForm input[type="date"],
    #addTaskForm textarea,
    #addTaskForm select {
        font-size: 15px;
    }

    #addTaskForm button[type="submit"] {
        font-size: 16px;
    }
}

.task-description {
    margin-top: 5px;
    padding: 10px;
    //background-color: #f9f9f9;
    //border: 1px solid #eee;
    border-radius: 4px;
    font-size: 0.9em;
    color: #555;
}

.delete-button {
    background-color: #f44336; /* Red color */
    color: white;
    border: none;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 0.8em;
    margin-left: 10px;
    cursor: pointer;
    border-radius: 4px;
}

.delete-button:hover {
    background-color: #da190b; /* Darker red on hover */
}



.task-list-item {
	margin-left: 45px;
    clear: both;
    position: relative;
    padding-left: 25px; /* Space for the checkbox */
}

.checkbox {
    position: absolute;
    left: -5px;
    top: 0px;
}

.task-list-item .task-title {
    /* Adjust as needed */
}

.task-list-item .task-title .due-date {
    float: left;
    padding-left: 0px;
    color: red;
    font-size: 11px;
}

.task-description {
    clear: both;
    padding: 5px 20px;
	margin-bottom: 20px;
}

.task-list-item .task-title .due-date {
	
    float: left;
    padding-left: 0px;
    color: gray;
    font-size: 15px;
	margin-bottom: 20px;
	margin-top: 5px;
}

.delete-button {
    position: absolute;
    right: 0;
    top: 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em; /* Adjust as needed */
    color: #888;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.delete-button:hover {
    opacity: 1;
    color: white;
}

.task-description {
    clear: both;
    padding: 5px 0;
}


.ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%; /* Set a width to the container */
}

