:root {
  --light-bg: #fff;
  --light-text: #333;
  --dark-bg: #141619;
  --dark-text: #e0e0e0;

  --accent-blue: #2C6BE4;
  --accent-blue-hover: hsla(219, 77%, 53%, 0.8);
  --accent-chat: #96BBFF;
  --accent-mail: #FBACFF;
  --accent-pay: #CCFFAC;
  --accent-news: #ACFCFF;
  --red: #FF7878;
  --yellow: #FAEA90;
  --grey: #CBCBCB;
  --green: #a8f67e;
  --pill-bg-light: #F2F0F0;
  --pill-bg-dark: #292C33;
  --user-initials-bg: #2C6BE4;
  --nuvatar-initials-bg: #fff;

  --card-bg-dark: #292c33;
  --card-bg-light: #F2F0F0;
  --card-bar-dark: #363B45;
  --card-bar-light: #DFDFDF;
  --modal-bg-dark-rgb: rgb(41, 44, 51, 0.8);
  --modal-bg-light-rgb: rgb(242, 240, 240, 0.8);

  --msg-user-dark: #2C6BE4;
  --msg-user-light: #2C6BE4;
  --msg-nuvatar-dark: #363B45;
  --msg-nuvatar-light: #fff;
  
  --text-muted: #888;
}

html[data-theme="light"] {
  --bg-color: var(--light-bg);
  --text-color: var(--light-text);
  --pill-bg: var(--pill-bg-light);
  --card-bg: var(--card-bg-light);
  --modal-bg-rgb: var(--modal-bg-light-rgb);
  --card-bar: var(--card-bar-light);
  --msg-user: var(--msg-user-light);
  --msg-nuvatar: var(--msg-nuvatar-light);
}

html[data-theme="dark"] {
  --bg-color: var(--dark-bg);
  --text-color: var(--dark-text);
  --pill-bg: var(--pill-bg-dark);
  --card-bg: var(--card-bg-dark);
  --modal-bg-rgb: var(--modal-bg-dark-rgb);
  --card-bar: var(--card-bar-dark);
  --msg-user: var(--msg-user-dark);
  --msg-nuvatar: var(--msg-nuvatar-dark);
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Disable page-level scroll */
}

body {
  margin: 0;
  background: var(--bg-color);
  font-family: ui-sans-serif, -apple-system, system-ui, Segoe UI, Helvetica, Arial, sans-serif;
  color: var(--text-color);
}

body a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: normal;
  transition: color 0.3s ease;
}

/* Hover effect */
body a:hover {
  color: var(--accent-chat);
  text-decoration: underline; 
}

body h1 {
  font-size: 20px;
  font-weight: 600;
}

body h2 {
  font-size: 16px;
  font-weight: 600;
}

body h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0px;
}

body p {
  font-size: 13px;
  font-weight: normal;
}

body ul li {
  font-size: 13px;
  font-weight: normal;
  padding-top: 5px;
}

.main-content {
  display: flex;
  flex-direction: row;
  height: 100vh; /* Full viewport height */
  width: 100%; /* Ensure it takes full width */
  justify-content: space-between; /* Adjust the space between the sidebars and the main chat section */
  box-sizing: border-box; /* Ensure padding is included in the width/height */
  overflow: hidden; /* Prevent content overflow and disable scrolling */
}

.layout-container {
  display: grid;
  grid-template-columns: 1fr 2fr 35px;
  gap: 10px;
  padding: 0px 25px 0px 20px;
  height: calc(100vh - 110px);
  box-sizing: border-box;
  overflow: hidden;
}

.layout-container > div {
  /*background: var(--card-bg);*/
  /*border-radius: 10px;*/
  overflow: hidden;
}

.left-panel, .center-panel, .right-panel {
  padding: 0px;
}
.left-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.center-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 15px;
}

.right-panel {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Small screen optimization */
@media screen and (max-width: 1280px) {
  .main-content {
    flex-direction: column; /* Stack content vertically */
  }

  .layout-container {
    display: flex;
    flex-direction: column;
    padding: 0; /* Remove unnecessary padding */
    height: 100vh; /* Use full viewport height */
  }

  .left-panel {
    /*width: 100%;  Make left panel take full width */
    height: 100vh; /* Ensure it covers the full height */
    padding: 10px; /* Adjust padding */
  }

  .center-panel {
    display: none; /* Hide right panel */
  }

  .right-panel {
    display: none; /* Hide right panel */
  }
}

/* Hide right panel on small screens */
@media (max-width: 1280px) {
  .center-panel {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    transition: transform 0.3s ease-in-out;
    z-index: 10;
  }

  /* Slide in when `.slide-in` is added */
  .center-panel.slide-in {
    transform: translateX(-100%);
  }

  /* Back button styling */
  .back-button {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    display: none; /* Initially hidden */
  }

  .back-button.visible {
    opacity: 1;
  }

  .back-button:hover {
    background-color: #0056b3;
  }
  .back-button {
    display: block;
  }
}

/* Basic styling for the alert */
.alert {
    position: fixed;
    top: -50px;
    left: 0;
    width: 100%;
    background-color: #007bff;
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 15px;
    z-index: 1000;
    transition: top 0.5s ease, opacity 0.5s ease;
  }
  
.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg-rgb);
    z-index: 999; /* Below the slide-in panel */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none; /* Initially non-interactive */
}

  .alert-confirm-button, .alert-cancel-button {
    font-size: 13px;
    background-color: white;
    color: #007bff;
    border: 1px solid white;
    border-radius: 20px; /* Pill-shaped button */
    padding: 5px 20px;
    margin-left: 10px;
    cursor: pointer;
    margin-top: 10px;
  }
  .alert-cancel-button {
    background-color: transparent;
    color: white;
  }
  /* Hidden state (when the alert is not shown) */
  .hidden {
    opacity: 0;
    top: -50px;
    height: 10px;
  }
  
  /* Visible state (when the alert is shown) */
  .visible {
    opacity: 1;
    top: 0;
  }
  
  /* Close button for the alert */
  .close-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    cursor: pointer;
  }


  .tooltip {
    position: relative;
    display: inline-block;
    width: 100%;
  }
  
  .tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    font-size: 12px;
    background-color: var(--accent-blue);
    color: #fff;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: normal;        
    overflow-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  }
  
  .tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
  }
  
  /* Top */
  .tooltip-top .tooltiptext {
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
  }
  .tooltip-top .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--accent-blue) transparent transparent transparent;
  }
  
  /* Bottom */
  .tooltip-bottom .tooltiptext {
    top: 125%;
    left: 50%;
    transform: translateX(-50%);
  }
  .tooltip-bottom .tooltiptext::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent var(--accent-blue) transparent;
  }
  
  /* Left */
  .tooltip-left .tooltiptext {
    top: 50%;
    right: 105%;
    transform: translateY(-50%);
  }
  .tooltip-left .tooltiptext::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent var(--accent-blue);
  }
  
  /* Right */
  .tooltip-right .tooltiptext {
    top: 50%;
    left: 125%;
    transform: translateY(-50%);
  }
  .tooltip-right .tooltiptext::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent var(--accent-blue) transparent transparent;
  }
  
/*###################
 TERMS/PRIVACY STYLES  
 ####################*/
.content-container {
  padding: 25px;
  overflow-y: auto;
  height: 100%;
  scrollbar-color: var(--msg-nuvatar) var(--card-bg);
  scrollbar-width: thin;
}

/*###################
 BASE.HTML STYLES  
 ####################*/

 .top-menu {
  display: flex;
  align-items: center;
  padding: 25px;
  gap: 25px;
}

/* Spacer to push user badges to the far right */
.spacer {
  flex: 1;
}

/* General Pill Style */
.pill {
  display: inline-flex;
  align-items: center;
  background: var(--pill-bg);
  padding: 10px 30px;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  font-size: 13px;
  color: var(--text-color);
  white-space: nowrap;
}

.pill:hover {
  background: var(--card-bar);
}

.pill .caret {
  margin-left: 8px;
  font-size: 9px;
  opacity: 0.3;
  padding-top: 2px;
}

/* Logo Pill */
.pill-logo {
  padding: 4px 27px 9px 34px;
}
.logo {
  height: 22px;
}

/* Blue Pill for + Start New */
.pill-action-blue {
  background: var(--accent-blue);
  color: #fff;
}
.pill-action-blue:hover {
  background: var(--accent-blue-hover);
}

.pill img.brain-icon {
  height: 16px; /* adjust as necessary */
  width: auto;
  margin-right: 8px; /* small spacing between icon and text */
}

.pill img.filter-icon,
.pill img.search-icon {
  height: 14px; /* adjust as necessary */
  width: auto;
  margin-right: 8px; /* small spacing between icon and text */
}

/* Search Pill */
.pill-search {
  background: var(--pill-bg);
  padding: 10px 30px;
}
.pill-search input[type=search] {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-color);
  font-size: 13px;
}

/* Pill styling for top-menu items that are circular icons */
.pill.pill-circle {
  /*display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background: var(--pill-bg);
  border-radius: 50%;
  cursor: pointer;
  margin-left: 10px; */
  width: 14px;
  height: 14px;
  padding: 14px 12px 10px 12px;
}

.layout-icon {
    height: 14px;
}

.theme-icon {
    height: 14px;
}

/* Optional hover effect */
.pill.pill-circle:hover {
  background: var(--card-bar);
}

/* Dropdown Menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; /* directly under the parent, no gap */
  left: auto;
  right: 0;
  background: var(--pill-bg);
  border-radius: 8px;
  padding: 5px 0;
  min-width: 120px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  z-index: 999;
  white-space: nowrap; /* Prevent text wrapping */
}

.dropdown-item {
  padding: 8px 15px;
  font-size: 13px;
  color: var(--text-color);
  cursor: pointer;

  transition: background 0.2s ease, color 0.2s ease; /* Smooth hover transition */
  border-radius: 5px;
}

.dropdown-item:hover {
  background: rgba(0,0,0,0.1);
}

/* Specific hover effect for nu:chat */
.dropdown-item.nuchat:hover {
  background: var(--accent-chat);
  color: #333; /* Ensure readability */
}

/* Specific hover effect for nu:mail */
.dropdown-item.numail:hover {
  background: var(--accent-mail);
  color: #333; /* Ensure contrast */
}


.has-dropdown.open .dropdown-menu {
  display: block;
}

.top-menu {
  display: flex;
  align-items: center;
  padding: 25px;
  gap: 15px; /* Reduced gap for tighter spacing */
}




/* Filter Container */
/*.filter-container {
  position: relative;
  display: inline-block;
  background: #1e1e1e;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}*/

/* Filter Header */
.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-title {
  font-size: 13px;
}

.caret {
  font-size: 14px;
  margin-left: 8px;
}

/* Filter Dropdown */
.filter-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--pill-bg);
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  min-width: 375px;
  z-index: 100;
}

/* Filter Group */
.filter-group {
  margin-bottom: 12px;
}

.filter-label {
  font-weight: 600;
  margin-bottom: 10px;
}

/* Filter Buttons */
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  background: transparent;
  border: 2px solid var(--card-bar);
  color: white;
  font-size: 13px;
  padding: 5px 25px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn.selected {
  background: #377ef9;
  color: white;
  border: none;
}

.type-nuchat.selected { background: var(--accent-chat); color: black; border: none;}
.type-numail.selected { background: var(--accent-mail); color: black; border: none;}

/* Urgency Colors */
.urgent-critical.selected { background: var(--red); border: none;}
.urgent-actionable.selected { background: var(--yellow); color: black; border: none;}
.urgent-informational.selected { background: var(--grey); color: black; border: none;}

/* Thread Status */
.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}












.user-badges-container {
  display: flex;
  align-items: center;
  position: relative;
}

.user-badges {
  position: relative;
  width: 34px;
  height: 34px;
  margin-left: -10px; /* Adjust overlap between badges */
  z-index: 3;
  cursor: pointer;
}

.user-badges:first-child {
  margin-left: 0; /* Reset margin for the first badge */
  z-index: 4;
}

.initials {
  width: 34px;
  height: 34px;
  background: var(--accent-blue);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: #fff;
  font-size: 13px;
  z-index: 3;
}

.nuvatar-initials {
  background: #F2F0F0;
  color: var(--accent-blue);
}
.nuvatar-initials:hover {
  background: var(--card-bar);
}

.main-user-initials {
  background: var(--accent-blue);
}
.main-user-initials:hover {
  background: var(--accent-blue-hover);
}

/* Shared container for user/nuvatar info at top of dropdown */
.badge-nuvatar-info .badge-nuvatar-label,
.badge-nuvatar-info .badge-nuvatar-handle,
.badge-nuvatar-info .badge-nuvatar-email {
  display: block;        /* Each on its own line */
  margin-bottom: 5px;    /* Extra space below each line */
}

.badge-user-info,
.badge-nuvatar-info {
  padding: 10px 30px;
  font-size: 14px;
  color: var(--text-color);
}

/* Title for user */
.badge-user-profession {
  font-size: 12px;
  opacity: 0.7; /* Slightly dimmer text */
}

/* Additional label for Nuvatar e.g. "(the Nuvatar)" */
.badge-nuvatar-label {
  font-size: 12px;
  opacity: 0.7;
}

/* Nuvatar handle/email clickable style */
.badge-nuvatar-handle,
.badge-nuvatar-email {
  font-size: 13px;
  color: var(--accent-blue);
  cursor: pointer;
}

.badge-nuvatar-handle:hover,
.badge-nuvatar-email:hover {
  color: var(--accent-chat);
}

/* Divider line in the dropdown */
.badge-divider {
  margin: 5px 0;
  border-top: 1px solid #88888833; /* Semi-transparent line */
}

/* Dropdown menus for user badges */
.nuvatar-badge-dropdown, .user-badge-dropdown {
  position: absolute;
  top: calc(100% + 5px); /* Slight spacing from badge */
  right: 0;
  background: var(--pill-bg);
  border-radius: 8px;
  padding: 5px 0;
  min-width: 150px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 999;
}

.has-dropdown-badge.open .nuvatar-badge-dropdown,
.has-dropdown-badge.open .user-badge-dropdown {
  display: block;
}

/* Dropdown item for menu options */
.badge-dropdown-item {
  padding: 6px 30px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-color);
  transition: background 0.2s ease;
  white-space: nowrap;
}

.badge-dropdown-item:hover {
  background: rgba(0,0,0,0.1);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  overflow-y: auto;
  background: var(--card-bar);
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  z-index: 1000;
  width: 270px;
  padding: 10px;
}

.search-results.hidden {
  display: none;
}

.search-item {
  padding: 8px 15px 8px 15px;
  cursor: pointer;
  border-radius: 10px;
}

.search-item:hover {
  background-color: var(--card-bg);
}

.search-item strong {
  font-weight: bold;
}

.search-item p {
  margin: 0;
  color: #666;
}


/* General Panel Styles */
.slide-in-panel {
    position: fixed;
    top: 0;
    right: -500px; /* Hidden by default */
    width: 500px;
    height: 100%;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: right 1s ease-in-out;
    overflow-y: auto;
    background-color: var(--bg-color);
    border-radius: 15px 0 0 15px;
    scrollbar-color: var(--msg-nuvatar) var(--card-bg);
    scrollbar-width: thin;
}

.slide-in-panel.visible {
    right: 0; /* Visible when active */
}

.slide-in-panel-content {
  padding: 25px;
  max-width: 500px;
  margin: 0 auto;
}

h2.panel-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-color);
}

/* Section Styles */
.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-muted);
  margin-top: 0px;
}

section {
  margin-bottom: 25px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0px 0px 25px;
}

.panel-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted); 
    padding-right: 25px;
}
.panel-close-btn:hover {
  color: var(--red);
}

.slide-in-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg-rgb);
    z-index: 99; /* Below the slide-in panel */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none; /* Initially non-interactive */
}

.slide-in-overlay.visible {
    opacity: 1;
    pointer-events: all; /* Allow interaction with the overlay when visible */
}

/* General Information Section */
.general-details {
  background-color: var(--card-bg);
  border-radius: 15px; /* Rounded corners */
  padding: 20px; /* Padding inside the box */
}

/*.general-details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-bar);
}*/

.general-details-row {
  display: flex;
  flex-direction: column; /* Allow multiple rows */
  padding: 10px 0;
  border-bottom: 1px solid var(--card-bar);
}

.general-details-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%; /* Ensures label & value take up full width */
}

.input-guidance {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  width: 100%; /* Ensures guidance spans full width */
}

.general-details-row:last-child {
  border-bottom: none; /* Remove border from the last row */
}

.general-details .label {
  font-weight: 600; /* Make label text bold */
  color: var(--text-color); /* Subtle gray for labels */
  font-size: 13px;
}

.general-details .value {
  font-weight: normal; /* Default weight for values */
  color: var(--text-muted); /* Darker text for values */
  font-size: 13px;
}

/* Editable Fields */
.general-details .editable {
  font-weight: normal;
  color: var(--text-color);
  cursor: pointer;
}

/* Editable field input */
.editable-input {
  padding: 3px 10px;
  width: 200px; /* Ensure input stays within the parent container */
  border: none;
  color: var(--text-color);
  background-color: var(--bg-color);
  border-radius: 5px;
  transition: border 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Optional: Focus state for input */
.editable-input:focus {
  outline: none;
  box-shadow: 0 0 5px 2px var(--accent-blue); 
  border-color: var(--accent-blue);
}

/* Editable Input Field with Send Button */
.editable-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

/* Submit button styling */
.editable-input-button {
  background-color: var(--accent-blue);
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  border: none;
  border-radius: 3px;
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
}

.editable-input-button:hover {
  background-color: var(--accent-blue-hover);
}

/* Style when hovered */
.general-details .editable:hover {
  color: var(--text-muted);
}

/* Read-only Fields */
.general-details .readonly {
  color: var(--text-muted); /* Light gray for read-only fields */
  cursor: not-allowed;
}

/* Dropdown Styling for Select Fields */
.general-details select {
  border-radius: 4px; /* Slightly rounded corners */
  padding: 2px; /* Padding inside select box */
  font-size: 13px;
  color: var(--text-color); /* Text color */
  background-color: var(--card-bg); 
  /*text-align: right; */
  border: none;
}

.general-details select:focus {
  outline: none; /* Remove default blue outline */
  border-color: #007bff; /* Blue border on focus */
}

#nuvatar-handle {
  display: flex;
  align-items: center;
  text-transform: lowercase;
}

#nuvatar-handle .readonly {
  color:var(--text-muted); 
}

#nuvatar-handle .editable {
  cursor: pointer;
  color: var(--text-color);
}

/* Form Group Styles */
.form-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

label {
  font-size: 14px;
  font-weight: bold;
  color: #666666;
  margin-bottom: 5px;
}

.form-input,
.form-select {
  border: 1px solid #dddddd;
  border-radius: 4px;
  padding: 8px;
  font-size: 14px;
  color: #333333;
  background-color: #f9f9f9;
}

.form-input[readonly],
.form-select[readonly] {
  background-color: #eeeeee;
  color: #999999;
  cursor: not-allowed;
}

.input-group {
  display: flex;
  align-items: center;
}

.input-prefix {
  background-color: #f9f9f9;
  padding: 8px 12px;
  border: 1px solid #dddddd;
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  color: #666666;
}

.input-field {
  flex: 1;
  border-radius: 0 4px 4px 0;
}

/* Responsive Design */
@media (max-width: 1280px) {
  .slide-in-panel-content {
    padding: 15px;
    font-size: 14px;
  }

  h2.panel-title {
    font-size: 20px;
  }

  .form-button {
    font-size: 12px;
  }
}

/*###################
 PANEL-RIGHT.HTML STYLES  
 ####################*/
/*
.contact-initial {
  width: 15px;
  height: 15px;
  background: #F2F0F0;
  color: var(--accent-blue);
  border-radius: 50%;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin: 5px;
  cursor: pointer;
}

.contact-initial:hover {
  background-color: #e0e0e0;
}*/

.right-panel-grid {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contacts-scrollable {
  flex-grow: 1;
  overflow-y: auto;
  padding-bottom: 10px;
}

.support-anchor {
  padding: 25px 0 27px 0px;
  border-top: 1px solid var(--card-bg);
  display: flex;
  justify-content: center;
}

.support-contact {
  background-color: #e6f0ff;
  cursor: pointer;
  border-radius: 50%;
}

.contact-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: #f3f3f3;
  font-size: 13px;
  font-weight: bold;
  color: var(--accent-blue);
  margin: 5px;
  cursor: pointer;
  position: relative;
}

.contact-circle:hover {
  background-color: var(--card-bar);
}

.default-contact {
  background-color: var(--pill-bg);
}

.default-contact:hover {
  background-color: var(--card-bar);
}

.support-contact {
  background-color: var(--pill-bg);
}

.support-contact:hover {
  background-color: var(--card-bar);
}

.contact-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.contact-icon {
  /*width: 14px;*/
  height: 12px;
}

.support-icon {
  height: 16px;
}

.selected-contact {
  box-shadow: 0 0 5px 2px var(--accent-blue);
}

/*###################
 PANEL-LEFT.HTML STYLES  
 ####################*/

.left-panel-grid {
  display: grid;
  /* 
    auto-fill will create as many columns of minmax(300px, 1fr) as can fit
    300px = approximate min card width. Adjust as needed.
    1fr  = each column expands to fill leftover space 
  */
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  
  gap: 10px;
  overflow-y: auto; /* Allows vertical scrolling */
  max-height: 100%; /* The parent .left-panel or container should control available height */
  box-sizing: border-box;
  padding: 5px 10px 5px 5px;
}

/* Scrollbar styling (optional) */
.left-panel-grid::-webkit-scrollbar {
  width: 5px;
}
.left-panel-grid::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}
.left-panel-grid::-webkit-scrollbar-thumb {
  background: var(--card-bg);
  border-radius: 10px;
}
.left-panel-grid::-webkit-scrollbar-thumb:hover {
  background: var(--card-bar);
}


.card-container {
  display: flex;
  background: var(--card-bg);
  border-radius: 15px;
  color: var(--text-color);
  position: relative;
  padding: 0 25px 0 0;
  box-sizing: border-box;
  height: 80px;
  cursor: pointer;
  /* min-width: 380px;  <-- remove or reduce to 300px if you want consistency */
}

.card-container:hover {
  box-shadow: 0 0 5px 2px var(--accent-blue); 
}

.card-container.selected-card {
  box-shadow: 0 0 5px 2px var(--accent-blue); 
}

.card-container .left-bar {
  width: 5px;
  background: var(--red); /* default critical color */
  border-radius: 0px 20px 20px 0px;
  margin-right: 20px;
  margin-top: 15px;
  height: 50px;
  cursor: pointer;
}
.card-container .left-bar:hover {
  filter: brightness(.8);
}

/* Urgency colors based on data-urgency attribute */
[data-urgency="critical"] .left-bar {
  background: var(--red) !important;
}
[data-urgency="actionable"] .left-bar {
  background: var(--yellow) !important;
}
[data-urgency="informational"] .left-bar {
  background: var(--grey) !important;
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Top Bar Styles */
.top-bar-container {
  /* This container forms the pill shape with bottom radius */
  background: var(--card-bar); /* The entire top bar background is red */
  border-radius: 0 0 7px 10px; /* Rounded corners only at bottom */
  padding: 0 20px 0 0; /* Horizontal padding for spacing */
  box-sizing: border-box;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Left items on left, type-pill on right */
  font-size: 10px;
  color: var(--text-color);
  /*padding: 8px 0;*/ /* Vertical padding inside the red bar */
}

.time {
  opacity: 0.8;
}

.category {
  font-weight: 600;
  text-transform: capitalize;
  cursor: pointer;
  transition: filter 0.2s;
  color: var(--text-muted);
}
.category:hover {
  filter: brightness(1.2);
}

.type-pill {
  background: var(--accent-chat);
  padding: 1px 20px;
  border-radius: 0px 0px 7px 7px;
  color: #333;
  font-size: 10px;
  font-weight: 600;
  /*line-height: 1;*/
}

/* Type colors based on data-type */
[data-type="nu:chat"] .type-pill, 
[data-type="nu:chat"] .thread-type-pill {
  background: var(--accent-chat) !important;
}
[data-type="nu:mail"] .type-pill, 
[data-type="nu:mail"] .thread-type-pill {
  background: var(--accent-mail) !important;
}
[data-type="nu:pay"] .type-pill, 
[data-type="nu:pay"] .thread-type-pill {
  background: var(--accent-pay) !important;
}
[data-type="nu:news"] .type-pill, 
[data-type="nu:news"] .thread-type-pill {
  background: var(--accent-news) !important;
}

/* Main Body */
.main-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Sender Info */
.sender-info {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  margin-top: 10px;
}

.sender-avatar {
  /*width: 40px;*/
  /*height: 40px;*/
  border-radius: 50%;
  overflow: hidden;
  margin-right: 10px;
}

.sender-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sender-initials {
  width: 20px;
  height: 20px;
  background: var(--accent-blue);
  color: var(--dark-text);
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.sender-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 0vw; /* keeps details inside of the card */
}

.sender-details .subject {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
}

.sender-details .sender-id {
  font-size: 12px;
  color: var(--text-muted);
}

.sender-details .subject,
.sender-details .sender-id {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}

@media screen and (max-width: 1280px) {
  .sender-details .subject,
  .sender-details .sender-id {
    max-width: 240px;
  }
}

/* Nuvatar Message */
.nuvatar-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.nuvatar-initial {
  width: 15px;
  height: 15px;
  background: var(--nuvatar-initials-bg);
  color: var(--accent-blue);
  border-radius: 50%;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.bubble-outer {
  background: var(--msg-nuvatar);
  border-radius: 15px;
  padding: 10px 15px;
  font-size: 13px;
  color: var(--text-color);
}

.bubble-inner {
  margin: 0; /* or minimal side margins */
}

.message-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  /* This container has minimal or no side padding, so text doesn't force new lines. */
  max-height: calc(1.4em * 2);
}

/* Bottom Bar */
.bottom-bar-container {
  background: var(--card-bar); /* Same red background as top bar */
  border-radius: 15px 15px 0 0; /* Rounded at the top corners */
  padding: 0px 20px;
  box-sizing: border-box;
  /*margin-top: 20px; Space above the bottom bar if needed */
}

.bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Pin on left, other icons on right */
  padding: 6px;
}

.left-items,
.right-items {
  display: flex;
  align-items: center;
  gap: 40px;
}
.left-items {
  gap: 20px;
}

.icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: filter 0.2s;
  cursor: pointer;
}

.icon:hover {
  filter: brightness(1.2);
}

/* Assign each icon its respective background image */
.pin-icon {
  background-image: url('/static/img/icons/pin.png');
}

.reply-icon {
  background-image: url('/static/img/icons/reply.png');
}

.archive-icon {
  background-image: url('/static/img/icons/archive.png');
}

.trash-icon {
  background-image: url('/static/img/icons/trash.png');
}

.play-icon {
  background-image: url('/static/img/icons/play.png');
}

.pause-icon {
  background-image: url('/static/img/icons/pause.png');
}

.restart-icon {
  background-image: url('/static/img/icons/restart.png');
}

.pin-icon.pinned {
  filter: drop-shadow(0px 1000px 0 var(--accent-blue));
  opacity: 1;
  transform: translateY(-1000px);
}

/*###################
 THREAD.HTML STYLES  
 ####################*/

/* Ensure .thread-container occupies the full space */
.dynamic-thread-container {
  height: 100%;
}

.thread-container {
  display: flex;
  /*flex-direction: column;*/
  height: 99%;
  box-sizing: border-box;
  background: var(--card-bg);
  border-radius: 15px;
  /* The container won't scroll; the messages area does */
  overflow: hidden;
  padding: 0 25px 0 0;
  margin-top: 5px;
  transition: height 0.3s ease;
  position: relative;
  z-index: 2;
}

@media screen and (max-width: 1280px) {
  .thread-container {
    margin-top: 0px !important;
  }
}

.thread-container.hidden {
  display: none;
}

.thread-container .left-bar {
  width: 5px;
  background: var(--grey); /* default critical color */
  border-radius: 0px 20px 20px 0px;
  margin-right: 20px;
  margin-top: 8%;
  height: 80%;
  cursor: pointer;
}
.thread-container .left-bar:hover {
  filter: brightness(.8);
}



.thread-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.nuvatar-avatar-container {
  /*display: block !important;
  height: 30vh;*/
  display: none;
  height: 30%;
  position: relative;
  z-index: 1;
}

.thread-container {
  transition: height 0.3s ease;
}

.thread-container.with-avatar {
  height: calc(100% - 30%);
}

#akool-avatar-slot {
  width: 100%;
  height: 150%;
  min-height: 200px;
  /*background: #000;  optional */
  overflow: hidden;
}



.thread-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Outer container: pill shape with bottom radius */
.thread-top-bar-container {
  background: var(--card-bar); /* For example, red or any color */
  border-radius: 0 0 15px 15px; /* Rounded corners only at bottom */
  /*padding: 0 20px;*/
  box-sizing: border-box;
}

@media screen and (max-width: 1280px) {
  .thread-top-bar-container {
    max-width: 90%;
  }
}

/* The top bar itself with 3 columns: left, center, right */
.thread-top-bar {
  display: grid;
  grid-template-columns: auto 1fr auto; /* left, center, right */
  align-items: center;
  /*padding: 10px 0; /* Vertical space inside the bar */
  font-size: 12px;
  color: var(--text-color);
}

/* Left items: thread-time + thread-category */
.thread-left-items {
  display: flex;
  align-items: center;
  gap: 15px;
}

.thread-time {
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}

.thread-category {
  font-weight: 600;
  text-transform: capitalize;
  cursor: pointer;
  transition: filter 0.2s;
  color: var(--text-muted);
}
.thread-category:hover {
  filter: brightness(1.2);
}

/* Center pill */
.thread-center-items {
  display: flex;
  justify-content: center; /* Center the pill horizontally in the middle column */
}
@media screen and (max-width: 1280px) {
  .thread-center-items {
    max-width: 100px;
  }
}

/* The pill that displays the thread type (nu:chat, nu:mail, etc.) */
.thread-type-pill {
  background: var(--accent-chat); /* Default color, can be overridden by data-type logic */
  padding: 6px 30px;
  border-radius: 0 0 15px 15px;
  color: #333;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

/* For different thread types (optional):
   e.g. .card-container[data-type="nu:chat"] .thread-type-pill => var(--accent-chat) 
   Or you can apply logic in JS. */

/* Right items: archive + trash icons */
.thread-right-items {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-right: 25px;
}

@media screen and (max-width: 1280px) {
  .thread-right-items {
    gap: 25px !important;
    margin-right: 10px !important;
  }
}

.thread-archive-icon, .thread-trash-icon, .thread-nuvatar-icon {
  width: 14px;
  height: 14px;
  background-size: contain;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: filter 0.2s;
}
.thread-archive-icon {
  background-image: url('/static/img/icons/archive.png');
}
.thread-trash-icon {
  background-image: url('/static/img/icons/trash.png');
}
.thread-nuvatar-icon {
  background-image: url('/static/img/icons/nuvatar.png');
}
.thread-archive-icon:hover,
.thread-trash-icon:hover,
.thread-nuvatar-icon:hover {
  filter: brightness(1.2);
}
/* Thread Header pinned at top */
.thread-header {
  background: transparent; /* or var(--card-bg), if you want a bar-like background */
  padding: 20px;
  border-bottom: 1px solid var(--card-bar);
  /* Not scrollable, so no overflow here */
  flex-shrink: 0; /* Prevents it from shrinking */
}

@media (max-width: 1280px) {
  .thread-header {
    padding: 10px !important;
  }
  .thread-body {
    padding: 5px !important;
  }
}
/* Info about the initiator or main thread subject */
.initiator-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.initiator-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--accent-blue);
  display: flex;
  justify-content: center;
  align-items: center;
}

.initiator-initials {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
}

/* Thread subject and from info */
.initiator-details .thread-subject {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  padding: 5px;
}

.initiator-details .thread-from {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 5px;
  padding-bottom: 2px;
}

.thread-to-text {
  margin-right: 5px;
}

.initiator-details .thread-subject,
.initiator-details .thread-from,
.thread-to-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /*max-width: 80%;*/
}

@media screen and (max-width: 1280px) {
  .initiator-details .thread-subject,
  .initiator-details .thread-from {
      max-width: 240px;
  }
}

@media screen and (max-width: 1280px) {
  .thread-to-text {
      max-width: 150px;
  }
}

.thread-from-container {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.thread-to-dropdown {
  position: relative;
}

.thread-to-pill {
  display: inline-flex;
  align-items: center;
  background: var(--card-bar);
  color: var(--text-color);
  padding: 3px 10px 5px 10px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 13px;
  margin-top: 6px;
}

.dropdown-caret {
  font-size: 9px;
  opacity: 0.3;
  padding-top: 2px;
}

.thread-to-submenu {
  display: none; /* Hidden by default */
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card-bar);
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 10px;
  z-index: 10;
  width: 270px;
}

/* Show submenu on hover 
.thread-to-dropdown:hover .thread-to-submenu {
  display: block; 
}*/

.nu-search-bar {
  margin-bottom: 10px;
  width: 93%;
}

.nu-search-bar input {
  width: 100%;
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  font-size: 13px;
  color: var(--text-color);
  background: var(--card-bg);
}

.nu-search-bar input:focus {
    outline: none;
    box-shadow: 0 0 5px 2px var(--accent-blue); 
    border-color: var(--accent-blue); 
}

.nu-search-results {
  margin-top: 10px;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-color: var(--card-bg) var(--msg-nuvatar);
  scrollbar-width: thin;
}

.nu-search-result-item {
  display: flex;
  align-items: center;
  padding: 5px 10px 5px 10px;
  cursor: pointer;
}

.nu-search-result-item:hover {
  background-color: var(--card-bg);
  border-radius: 10px;
}

.nu-search-result-avatar {
  width: 28px;
  height: 28px;
  background-color: var(--nuvatar-initials-bg);
  color: var(--accent-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  margin-right: 10px;
}

.nu-search-result-info {
  display: flex;
  flex-direction: column;
}

.nu-search-result-name {
  font-weight: bold;
  font-size: 14px;
}

.nu-search-result-handle {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px; /* Adjust based on your layout */
  display: inline-block;
}

.nu-search-result-subtext {
  font-size: 12px;
  color: var(--text-muted);
}

/* Thread Body: scrollable container for messages */
.thread-body {
  flex: 1; /* Takes remaining vertical space */
  overflow-y: auto; /* This is where we scroll */
  padding: 20px;
}
/* Scrollbar styling (optional) */
.thread-body::-webkit-scrollbar {
  width: 7px;
}
.thread-body::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}
.thread-body::-webkit-scrollbar-thumb {
  background: var(--msg-nuvatar);
  border-radius: 10px;
}
.thread-body::-webkit-scrollbar-thumb:hover {
  background: var(--msg-nuvatar);
  cursor: pointer;
}

/* Example message row (each message is a row) */
.message-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

/* For user vs Nuvatar messages, we can style differently */

/* Nuvatar message */
.nuvatar-message .avatar {
  background: var(--nuvatar-initials-bg);
  color: var(--accent-blue);
}

/* If Nuvatar has an initial or small circle */
.nuvatar-message .avatar-initials {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--nuvatar-initials-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
  font-weight: bold;
  color: var(--accent-blue);
  cursor: pointer;
  font-size: 13px;
}

/* The message bubble for Nuvatar */
.nuvatar-message .message-bubble {
  background: var(--msg-nuvatar);
  color: var(--text-color);
  padding: 10px 20px 0 20px;
  border-radius: 15px;
  max-width: 70%;
  font-size: 13px;
  margin-right: 5px;
}

/* User message in blue (or accent color) */
.user-message .avatar-initials {
  background: var(--accent-blue);
}

.user-message .message-bubble {
  background: var(--accent-blue);
  color: #fff;
  padding: 15px;
  border-radius: 15px;
  max-width: 70%;
  margin-left: auto; /* If you want user messages aligned to the right */
  font-size: 13px;
}

/* Optionally align user messages to the right, Nuvatar messages to the left: */
.user-message {
  justify-content: flex-end;
}
.nuvatar-message {
  justify-content: flex-start;
}

/* Bottom bar container for message actions */
.nuvatar-message-bottom-bar-container {
  background: rgba(0, 0, 0, 0.1); 
  border-radius: 15px 15px 0 0;
  padding: 0px 20px;
  box-sizing: border-box;
  margin-top: 20px;
}

.nuvatar-message-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Pin on left, other icons on right */
  padding: 6px;
}

.nuvatar-message-left-items,
.nuvatar-message-right-items {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nuvatar-message-left-items {
  gap: 20px;
}

/* Thread input area */
.thread-input-container {
  background: transparent; /* or var(--card-bg), if you want a bar-like background */
  padding: 20px;
  border-top: 1px solid var(--card-bar);
  /* Not scrollable, so no overflow here */
  flex-shrink: 0; /* Prevents it from shrinking */
}

/* Thread input area at the bottom */
.thread-input {
    display: flex;
    align-items: center;
    padding: 5px;
    background: var(--msg-nuvatar);
    border-radius: 30px;
    border: 2px solid var(--card-bar);
    width: 100%; /* Take full width of the container */
    /*max-width: 800px;*/
}

/* Thread input (textarea) */
#user-input {
  background: var(--msg-nuvatar);
  color: var(--text-color);
  flex-grow: 1;
  resize: none;
  border: none;
  padding: 10px;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  min-height: 18px; /* Single row initially */
  line-height: 1.5;
  max-height: 300px; /* 10 rows max */
  overflow-y: auto;
  transition: height 0.1s ease-in-out; /* Smooth height transition */
}

/* Scrollbar styling (optional) */
#user-input::-webkit-scrollbar {
width: 10px;
}
#user-input::-webkit-scrollbar-track {
background: transparent;
border-radius: 10px;
}
#user-input::-webkit-scrollbar-thumb {
background: var(--card-bg);
border-radius: 10px;
}
#user-input::-webkit-scrollbar-thumb:hover {
background: var(--card-bg);
cursor: pointer;
}

/* Send button */
#send-button {
    font-size: 13px;
    background-color: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 20px; /* Pill-shaped button */
    padding: 10px 20px;
    margin-left: 10px;
    cursor: pointer;
    margin-right: 6px;
    /*position: relative;
    right: 10px;*/
}
#send-button:hover {
    background-color: var(--accent-blue-hover);
}

.nuvatar-message .thinking-message-bubble {
  background: var(--msg-nuvatar);
  color: var(--text-color);
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 70%;
  font-size: 13px;
  margin-right: 5px;
}

/* Flashlight Effect for "Thinking..." */
.flashlight-text {
  font-size: 13px;
  color: var(--text-muted) !important;
  text-align: center;
  position: relative;
  display: inline-block;
  overflow: hidden;
}

/* Glowing flashlight animation */
.flashlight-text::after {
  content: "Thinking...";
  position: absolute;
  left: 0;
  /*top: 0;*/
  width: 100%;
  height: 100%;
  background: linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 30%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0.2) 70%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  color: rgba(255, 255, 255, 0.1); /* Keep text visible */
  animation: flashlight 5s infinite ease-in-out;
}

/* Flashlight Animation */
@keyframes flashlight {
  0% {
    background-position: -150% 0;
  }
  50% {
    background-position: 150% 0;
  }
  100% {
    background-position: -150% 0;
  }
}

/*###################
 CONTENT MODAL STYLES  
 ####################*/
.content-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  background-color: var(--modal-bg-rgb);
  transition: opacity 0.3s ease-in-out;
}

.content-modal.hidden {
  display: none;
}

h2.modal-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-color);
}

.content-modal-content {
  padding: 25px;
  margin: 0 auto;
}

.content-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0px 0px 25px;
}

/* Graph Modal Content */
.content-modal .modal-content {
  background-color: var(--bg-color);
  width: 90%;
  max-width: 800px;
  /*min-height: 500px;*/
  border-radius: 15px;
  overflow: hidden;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  /*padding-bottom: 20px;*/
}

/* Graph Container */
.content-modal #nuvatarGraph {
  width: 100%;
  height: 500px;
}

/* General input + textarea styling */
.input-field,
.textarea-field {
  padding: 5px 10px;
  width: 600px; /* Ensure input stays within the parent container */
  outline: none;
  transition: border-color 0.3s ease-in-out;
  border: 2px solid var(--card-bar);
  color: var(--text-color);
  background-color: var(--bg-color);
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
}

/* Focus style for both */
.input-field:hover,
.input-field:focus,
.textarea-field:hover,
.textarea-field:focus {
  border-color: var(--accent-blue);
  box-shadow: 0px 0px 5px rgba(0, 123, 255, 0.3);
}

/* Textarea-specific enhancements */
.textarea-field {
  height: 200px;
  border-radius: 10px;
  resize: vertical;
  outline: none;
  padding: 10px;
}

/* Optional: spacing between rows */
.general-details-row + .general-details-row {
  margin-top: 16px;
}

/* Scrollbar styling (optional) */
.textarea-field::-webkit-scrollbar {
  width: 5px;
}
.textarea-field::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}
.textarea-field::-webkit-scrollbar-thumb {
  background: var(--card-bg);
  border-radius: 10px;
}
.textarea-field::-webkit-scrollbar-thumb:hover {
  background: var(--card-bar);
}

/* Placeholder text styling */
.textarea-field::placeholder {
  color: var(--text-muted); 
}

#item_visibility {
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 13px;
  color: var(--text-color); /* Text color */
  background-color: var(--bg-color); 
  border: 2px solid var(--card-bar);
}
#item_visibility:hover,
#item_visibility:focus {
  border-color: var(--accent-blue);
  box-shadow: 0px 0px 5px rgba(0, 123, 255, 0.3);
}

.modal-guidance {
  display: block;  /* Forces it to break into a new line */
  width: 100%;  /* Ensures full width so it doesn’t stay inline */
  font-size: 13px;  
  color: var(--text-muted);  
  margin-bottom: 10px; /* Space before the input field */
}

.input-guidance {
  display: block;  /* Forces it to break into a new line */
  width: 100%;  /* Ensures full width so it doesn’t stay inline */
  font-size: 12px;  
  color: var(--text-muted);  
  margin-top: 2px;  /* Adds a small gap between label and guidance */
  margin-bottom: 4px; /* Space before the input field */
}

.content-modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted); 
  padding-right: 25px;
}
/* Hover effect for Close Button */
.content-modal-close-btn:hover {
  color: var(--red); /* Slight red tint for close action */
}

#knowledge-summary,
#knowledge-categories,
#knowledge-subcategories {
  max-width: 500px;
}
/*###################
 AUTH MODAL STYLES  
 ####################*/
.auth-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(155, 155, 155, 0.8); /*var(--modal-bg-rgb);*/
  z-index: 5;
}

.auth-modal.hidden {
  display: none;
}

.auth-modal p {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.4;
}

.auth-modal p.thicker {
  font-weight: 600;
}

.auth-modal .tagline {
  font-weight: 400;
  font-size: 11px;
  margin-top: 0px;
  color: var(--text-muted);
}

.auth-modal-content {
  display: flex;
  width: 80%;
  max-width: 1000px;
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
}

.auth-modal-left {
  flex: 1;
  margin: 25px 0px 25px 25px;
  border-right: 1px solid var(--card-bar);
  padding-right: 25px;
}

.auth-modal-left h1 {
  font-size: 20px;
  font-weight: 600;
}

.auth-modal-left ul {
  list-style-position: outside;
  margin: 5px;
  padding-left: 18px;
}

.auth-modal-left .nuchat-pill {
  background: var(--accent-chat);
  padding: 1px 12px 3px 12px;
  border-radius: 15px;
  color: #333;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.feature-container {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Space between features */
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 8px; /* Space between icon and title */
  padding-top: 5px;
}

.feature-icon {
  height: 12px;
}

.f1 {
  list-style-image: url(/static/img/icons/chip.png);
}

.f2 {
  list-style-image: url(/static/img/icons/memory.png);
}

.f3 {
  list-style-image: url(/static/img/icons/profile.png);
}

.f4 {
  list-style-image: url(/static/img/icons/handle.png);
}

.feature-description {
  font-size: 13px;
  color: var(--text-muted); 
}

.footer-links {
  margin-top: 25px;
}

.auth-modal-left .footer-links a {
  margin-right: 15px;
  font-size: 12px;
  color:var(--text-muted);
}

.auth-modal-logo {
  height: 35px;
}

#auth-modal-content-container {
  max-height: 390px; /* Adjust as needed */
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-color: var(--msg-nuvatar) var(--card-bg);
  scrollbar-width: thin;
}

.auth-form.hidden {
  display: none;
}

.auth-modal-right {
  flex: 1;
  padding: 20px;
  /*display: flex;*/
  flex-direction: column;
  align-items: center; /* Ensures horizontal centering of all children */
  justify-content: center; /* Ensures vertical centering */
  gap: 15px; /* Adds spacing between child elements */
  text-align: center; /* Centers text inside child elements */
}

.auth-modal-right input,
.auth-modal-right button {
  width: 80%; /* Set elements to 80% width of the container */
  max-width: 400px; /* Optional: Prevent overly wide elements */
  padding: 13px;
  border-radius: 30px;
  border: 1px solid var(--card-bar);
  box-sizing: border-box;
  font-size: 13px;
  margin-bottom: 15px;
  color: var(--text-color);
  background: var(--bg-color);
}

.auth-modal-right button {
  background-color: var(--accent-blue);
  color: white;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.auth-modal-right button:hover {
    background-color: #0056b3;
}

.auth-modal-right-guest {
  background-color: var(--bg-color) !important;
}

.auth-modal-right-guest:hover {
  background-color: #0056b3 !important;
}

.auth-modal-right h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 0px;
}

.auth-modal-right .footer {
  margin-right: 15px;
  font-size: 12px;
  color:var(--text-muted);
  /*margin-top: 100px;*/
}

/* Close Button Styling */
.auth-modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    text-decoration: none;
}

.auth-modal-close-btn:hover {
    color: #888; 
}

.google-signup-button {
    display: flex;
    align-items: center; 
    justify-content: center; 
    margin-left: auto; 
    margin-right: auto;
}

.google-signup-button img {
    width: 20px;
    height: 20px;
    margin-right: 10px; /* Add spacing between the image and text */
}

/* Divider styling */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    font-size: 13px;
    color: var(--card-bar);
    /*width: 80%;*/
    margin-left: auto; 
    margin-right: auto;
}

.divider .line {
    flex: 1;
    height: 1px;
    background-color: var(--card-bar);
    margin: 0 10px;
}

.divider .or {
    font-weight: bold;
    color: #6c757d;
}

.input-error {
  border: 2px solid red !important;
  /*box-shadow: 0 0 5px red !important;*/
}

/* Small screen optimization */
@media screen and (max-width: 1280px) {
  .auth-modal-content {
    flex-direction: column; /* Stack content vertically */
    width: 90%; /* Ensure modal is visible properly */
    max-width: 400px; /* Prevent modal from stretching too much */
  }

  .auth-modal-left {
    display: none; /* Hide the left side on small screens */
  }

  .auth-modal-right {
    /*width: 100%;  Make right section full width */
    padding: 30px; /* Adjust padding for better spacing */
  }

  .auth-modal-right input,
  .auth-modal-right button {
    width: 100%; /* Ensure form elements take full width */
  }

  .auth-modal-right h2 {
    font-size: 18px; /* Adjust heading size */
  }

  .auth-modal-right .footer {
    font-size: 12px; /* Reduce font size for better readability */
  }

  .auth-modal-close-btn {
    top: 5px; /* Adjust close button position */
    right: 5px;
    font-size: 20px; /* Make close button slightly smaller */
  }
}



/* Nuvatar Message formatting */
.formatted-nuvatar-response pre, 
.formatted-nuvatar-response-card pre {
  background: var(--card-bg);
  color: var(--text-color);
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
  font-size: 13px;
  scrollbar-color: var(--msg-nuvatar) var(--card-bg);
  scrollbar-width: thin;
}

.formatted-nuvatar-response p {
  margin: 8px;
}

.formatted-nuvatar-response-card p {
  margin: 0px;
}

.formatted-nuvatar-response li {
  margin-top: 5px;
}

.formatted-nuvatar-response a {
  font-size: 13px;
  color: var(--accent-blue);
  cursor: pointer;
}

.formatted-nuvatar-response a:hover {
  color: var(--accent-chat);
}

.formatted-nuvatar-response code {
  font-family: monospace;
  /* etc. */
}

.formatted-code-block {
  white-space: pre-wrap; /* Preserve newlines but allow wrapping */
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 2px 5px 0 5px;
  border-radius: 5px;
  font-family: monospace;
  margin-top: 3px;
}

/* Action Buttons */
.form-button {
  background-color: var(--accent-blue);
  color: #ffffff;
  padding: 10px 15px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease-in-out;
}

/* Style for the Submit Button */
.submit-button {
  background-color: var(--accent-blue);
  color: white;
  width: 100%;
}

/* Hover & Active States for Submit Button */
.form-button:hover {
  background-color: var(--accent-blue-hover);
  transform: scale(1.03);
}

.form-button:active {
  background-color: #003f7f;
  transform: scale(0.98);
}

/* Button container styling */
.button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0;
  width: 100%;
}

/* Warning button (yellow) */
.warning-button {
  background-color: var(--yellow);
  color: #000; /* Black text */
  width: 100%;
}

.warning-button:hover {
  background-color: #ffd54f; /* Darker yellow on hover */
}

/* Danger button (red) */
.danger-button {
  background-color: var(--red);
  color: #fff; /* White text */
  width: 100%;
}

.danger-button:hover {
  background-color: #d32f2f; /* Darker red on hover */
}

.success-button {
  background-color: #4caf50;
  color: #fff; /* White text */
  width: 100%;
}

.success-button:hover {
  background-color: #45a049; /* Darker green */
}

/* Button description styling */
.button-description {
  font-size: 11px;
  color: var(--text-color); 
  text-align: center;
  margin-top: 3px;
  max-width: 300px;
}

/* Specific styling for danger button text */
.danger-button + .button-description {
  color: var(--red); /* Match the button's red tone */
}

/* Specific styling for warning button text */
.warning-button + .button-description {
  color: var(--text-color);
}

.success-button + .button-description {
  color: var(--text-color);
}