/* app/assets/stylesheets/llm_chat.css */

@font-face {
  font-family: 'Proxima Nova SCOSF Condensed Regular';
  src: url("/fonts/PROXIMA-NOVA-SCOSF-CONDENSED-REGULAR.OTF") format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Proxima Nova SCOSF Condensed Bold';
  src: url("/fonts/PROXIMA-NOVA-SCOSF-CONDENSED-BOLD.OTF") format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Proxima Nova Condensed Bold';
  src: url("/fonts/PROXIMA-NOVA-CONDENSED-BOLD.OTF") format('opentype');
}

@font-face {
  font-family: 'Proxima Nova SCOSF Condensed Light';
  src: url("/fonts/PROXIMA-NOVA-SCOSF-CONDENSED-LIGHT.OTF") format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Bebas Neue Bold';
  src: url("/fonts/BEBASNEUE-BOLD.OTF") format('opentype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Bebas Neue Regular';
  src: url("/fonts/BEBASNEUE-REGULAR.OTF") format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Proxima Nova Condensed Regular';
  src: url("/fonts/PROXIMA-NOVA-CONDENSED-REGULAR.OTF") format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Rocko Ultra FLF Bold';
  src: url("/fonts/ROCKOULTRAFLF-BOLD.TTF") format('truetype');
  font-weight: normal;
  font-style: normal;
}

html, body {
  height: 100%;
  margin: 0;
  font-weight: 100 !important;
}

/* Apply the flex layout to your main app container instead of the whole body */
.llm-app-container {
  display: flex;
  flex-direction: row; 
  min-height: 100vh;
}

.llm-main {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px;
  background: #f6f6f9;
}

.llm-chat-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 20px;
  background: #f6f6f9;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 10;
}



.llm-chat-header .logo {
  max-width: 200px;
  height: auto;
}

.llm-chat-header .heading-group {
  justify-self: center;
  text-align: center;
}


.llm-chat-header h1 {
  font-family: 'Bebas Neue Bold';
  color: #1c1c1c;
  font-size: 2.5em;
  margin: 0;
}

.llm-chat-header h3 {
  font-family: 'Proxima Nova SCOSF Condensed Light';
  color: #1c1c1c;
  font-size: 1.2em;
  margin-top: 4px;
  margin-bottom: 0;
}


.llm-chat-container {
  font-family: 'Proxima Nova Condensed Regular';
  max-width: 800px;
  margin: 40px auto 50px;
  margin-bottom: 50px;
  background: #f6f6f9;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  padding: 30px 30px 0; /* Top, right/left, bottom */
  color: #1c1c1c;
  position: relative;
}



.llm-message-row {
  display: flex;
  margin-bottom: 9px;
  margin-top: 9px
}

.llm-message {
  font-family: 'Proxima Nova Condensed Regular';
  padding: 12px 18px;
  max-width: 70%;
  font-size: 1.05em;
  word-break: break-word;
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(40,40,70,0.04);
  position: relative;
  line-height: 1.4;
}

.llm-message.llm-user {
  margin-left: auto;
  background: #9c481a;
  color: #fff;
  border-radius: 18px 18px 4px 18px;
}

.llm-message.llm-bot {
  margin-right: auto;
  background: #ffffff;
  color: #1c1c1c;
  border-radius: 18px 18px 18px 4px;
}

/* make bot bubble the positioning context */
.llm-message.llm-bot { position: relative; }

/* button sits in the top-right corner of the bubble */
.usage-in-bubble {
  position: absolute;
  top: 6px;
  right: 10px;
}

/* small button */
.llm-message.llm-bot .usage-toggle {
  font-size: 11px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.85;
  border: none;
  background: none;
}

.llm-message.llm-bot .usage-toggle:hover {
  text-decoration: underline;
}

/* dropdown panel (reuses your styles) */
.llm-message.llm-bot .usage-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 20;
  background: #813910;
  border-radius: 5px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.1);
  opacity: 0.9;
}

.llm-message.llm-bot .usage-menu-inner {
  padding: 5px 6px;
  font-size: 12px;       /* small text */
  line-height: 1.2;
  color: #fff;
}

.hidden { display: none; }

.llm-form-row {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 0 16px;
  z-index: 100;
}

.llm-form-row .llm-form-inner {
  width: 100%;
  background: #f1f1f1;
  border-radius: 20px;
  padding: 6px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

textarea.llm-input {
  font-family: 'Proxima Nova Condensed Regular';
  flex: 1;
  padding: 10px 14px;
  border: none;
  outline: none;
  font-size: 1em;
  border-radius: 40px;
  resize: none;
  background: transparent;
  color: #1c1c1c;
}

button.llm-send {
  font-family: 'Proxima Nova SCOSF Condensed Regular';
  background: #9c481a;
  color: #fff;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  margin-left: 6px;
  margin-right: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s;
  flex-shrink: 0;
}

button.llm-send:hover {
  background: #7e3813;
}

button.llm-send svg {
  display: block;
}

.llm-dots {
  width: 28px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: start;
}

.llm-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  background: #aaa;
  border-radius: 50%;
  opacity: 0.6;
  animation: llm-dot-blink 1.2s infinite;
}
.llm-dots span:nth-child(2) { animation-delay: 0.2s }
.llm-dots span:nth-child(3) { animation-delay: 0.4s }

@keyframes llm-dot-blink {
  0%, 80%, 100% { opacity: 0.4; }
  40% { opacity: 1; }
}

.llm-bot[data-animate="true"] {
    animation: llm-fade-in 0.4s ease-out;
  }
  
  @keyframes llm-fade-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  

  .llm-app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
  }
  
  .llm-sidebar {
    width: 250px;
    background: #f1f1f1;
    border-right: 1px solid #ccc;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    transition: transform 0.3s ease, width 0.3s ease, padding 0.3s ease;
    z-index: 1000;
  }
  
  .llm-sidebar h2 {
    font-family: 'Bebas Neue Bold';
    font-size: 1.8em;
    margin-bottom: 16px;
    color: #1c1c1c;
  }
  
  .llm-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .llm-sidebar li {
    margin-bottom: 12px;
  }
  


  .logo {
    width: 500px
    height: auto;
  }

  .heading-welcome {
    font-family: 'Bebas Neue Bold';
    text-align: center;
    font-size: 3em;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #1c1c1c;
  }

  
  .llm-message .markdown-bold {
    font-family: 'Proxima Nova Condensed Bold';
  }
  
  .llm-message .markdown-header {
    font-family: 'Proxima Nova SCOSF Condensed Bold';
  }

  .llm-message br{
    line-height: 1.4;
    margin: 0;
  }

  /* === Markdown Styling for bot messages === */
.llm-message.llm-bot h1,
.llm-message.llm-bot h2,
.llm-message.llm-bot h3 {
  font-family: 'Proxima Nova SCOSF Condensed Bold';
  margin: 10px 0 6px;
  color: #1c1c1c;
}

.llm-message.llm-bot h1 {
  font-size: 1.6em;
}

.llm-message.llm-bot h2 {
  font-size: 1.4em;
}

.llm-message.llm-bot h3 {
  font-size: 1.2em;
}

.llm-message.llm-bot p {
  margin: 6px 0;
  line-height: 1.5;
}

.llm-message.llm-bot ul,
.llm-message.llm-bot ol {
  padding-left: 20px;
  margin: 8px 0;
}

.llm-message.llm-bot li {
  margin-bottom: 4px;
}

.llm-message.llm-bot a {
  color: #9c481a;
  text-decoration: underline;
}

.llm-message.llm-bot code {
  background: #f0f0f0;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
}

.conversation-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.conversation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 6px;
  background: #fff;
  transition: background 0.2s;
  position: relative; /* 👈 Important for absolute positioning inside */
}

.conversation-item.active {
  background: #fee4cd;              /* soft highlight */
}

.conversation-item:hover {
  background: #ddd;
}



.conversation-title {
  font-family: 'Proxima Nova Condensed Regular';
  color: #1c1c1c;
  text-decoration: none;
  flex-grow: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.conversation-title .markdown-bold{
  font-family: 'Proxima Nova Condensed Bold';
}

.inline-delete-form {
  margin: 0;
}

.delete-btn {
  background: transparent;
  border: none;
  font-size: 1em;
  font-weight: bold;
  color: #9c481a;
  cursor: pointer;
  padding: 4px 8px;
}

.delete-btn:hover {
  color: #813910;
  transform: scale(1.25); /* enlarge on hover */
}

.new-chat-btn {
  display: block;
  width: 80%;
  padding: 10px 10px;
  margin-top: 24px;
  font-family: 'Proxima Nova SCOSF Condensed Bold';
  font-size: 1em;
  background: #9c481a;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-left: 20px;
}

.new-chat-btn:hover {
  background: #7e3813;
  transform: scale(1.03);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.llm-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #f6f6f9, #ffffff);
  z-index: -1;
}

.logo-container {
  display: flex;
  justify-content: center;
}


.llm-chat-header .logo-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}



.logo-container img.logo {
  max-width: 200px;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}


.llm-agent-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  justify-self: end;
  margin-right: 24px;
}


.agent-label {
  font-family: 'Proxima Nova Condensed Regular';
  font-size: 1.5em;
  color: #000;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease;
}


.switch-icon {
  width: 30px;
  height: 30px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.agent-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.agent-link:hover {
  transform: scale(1.05);
}

.agent-label:hover {
  text-decoration: underline;
  color: #813910;
}

.agent-link:hover .switch-icon {
  transition-delay: 0.08s; /* delay showing tooltip */
  transform: rotate(180deg);
}

.agent-action-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.logout-form {
  margin: 0;
}

.logout-button {
  background: transparent;
  color: #000;
  font-family: 'Proxima Nova Condensed Regular';
  font-size: 1.5em;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  transition: color 0.1s ease, text-decoration 0.1s ease;
}

.logout-button:hover {
  color: #813910;
  text-decoration: underline;
}

.tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: -28px;
  right: 0;
  background-color: #333;
  color: #fff;
  font-size: 0.7em;
  padding: 4px 8px;
  border-radius: 4px;
  transition: opacity 0.2s ease;
  z-index: 1000;
  background-opacity: 0.6;
  font-family: 'Proxima Nova Condensed Regular';

}

.agent-link:hover .tooltip {
  visibility: visible;
  opacity: 1;
  background-opacity: 0.6;
}

.conversation-item .tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: -32px;
  left: 0;
  background-color: #333;
  color: #fff;
  font-size: 0.75em;
  padding: 6px 10px; /* Increased padding for better readability */
  border-radius: 4px;
  transition: opacity 0.2s ease;
  z-index: 1000;
  font-family: 'Proxima Nova Condensed Regular';
  max-width: 300px; /* Limits width to prevent overly wide tooltips */
  white-space: nowrap; /* Prevents wrapping */
  overflow: hidden; /* Hides overflow */
  text-overflow: ellipsis; /* Displays ellipsis for overflowed text */
}

.conversation-item .tooltip .markdown-bold{
  font-family: 'Proxima Nova Condensed Bold';
}

.conversation-item:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.llm-welcome-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100vh;
  align-items: flex-start; /* ⬅️ align top */
  padding: 0px 80px;
  background: #f6f6f9;
  font-family: 'Proxima Nova Condensed Regular';
  position: relative;
  max-height: 100vh;
  overflow-y: auto;
}

.llm-agent-select {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.select-title {
  font-family: 'Bebas Neue Bold';
  font-size: 4em;
  color: #222;
  margin-bottom: 48px;
}



.agent-entry {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  transition: color 0.2s ease, text-decoration 0.2s ease, transform 0.2s ease, translateY 0.2s ease, font-weight 0.2s ease;

}

.agent-entry .text-link {
  font-size: 3em;
  margin-bottom: 32px;
  text-decoration: none;
  color: #1c1c1c;
  background: none;
  border: none;
  padding: 0;
  font-family: 'Bebas Neue Regular';
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease, font-family 0.2s ease;
}


.agent-entry:hover .text-link {
  color: #9c481a;
  font-family: 'Bebas Neue Bold';
  transform: scale(1.1) translateX(40px);
}


.logout-btn {
  font-size: 2.5em;
  color: #813910;
  font-family: 'Proxima Nova Condensed Regular';
  background: transparent; /* Remove default button background */
  border: transparent;
  padding: 0;
  margin-top: 12px;
  transition: text-decoration 0.2s ease, transform 0.2s ease;
}

.logout-btn:hover {
  text-decoration: underline;
  transform: scale(1.05);
}

.llm-login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #f6f6f9;
  text-align: center;
}

.background-mouse {
  position: absolute;
  top: -20%;
  left: -10%;
  z-index: 0;
  opacity: 0.1;
  pointer-events: none;
}

.bg-mouse-img {
  width: 1600px;
  max-width: none;
}

.llm-agent-select{
  z-index: 1;
  position: relative;
}

.llm-welcome-centerpiece {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%); /* change from -40% to -50% */
  text-align: center;
  z-index: 1;
  max-width: 480px;
  min-height: 240px;
}

.centerpiece-static .logo-container .logo {
  max-width: 400px;
  margin-bottom: 20px;
}


.llm-login-container {
  position: relative;
  height: 100vh;
  background: #f6f6f9;
  overflow: hidden;
}

.login-logo-corner {
  position: absolute;
  top: 32px;
  left: 40px;
  z-index: 2;
}

.logo-corner {
  width: 300px;
  height: auto;
}

.login-panel-centered{
  z-index: 2;
}

.heading-login {
  font-family: 'Bebas Neue Bold';
  font-size: 3.8em;
  color: #1c1c1c;
  margin-bottom: 10px;
}

.subheading-login {
  font-family: 'Proxima Nova SCOSF Condensed Light';
  font-size: 1.6em;
  color: #1c1c1c;
  margin-bottom: 30px;
}

.btn-login-google {
  display: inline-block;
  font-family: 'Proxima Nova SCOSF Condensed Bold';
  font-size: 1.5em;
  padding: 14px 28px;
  background: #9c481a;
  color: white;
  text-decoration: none;
  border-radius: 40px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 1;
}

.btn-login-google:hover {
  background: #813910;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#agent-heading, #agent-subheading {
  transition: opacity 0.3s ease;
  opacity: 1;
}

#agent-subheading {
  max-width: 100%;
  line-height: 1.4;
  padding: 0 10px;
  word-break: break-word;
}
.heading-sub-wrapper {
  width: 100%;
  min-height: 5em; /* enough for ~2 lines of text */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
}

.heading-sub-wrapper {
  transition: min-height 0.3s ease;
}

.heading-sub {
  margin: 0;
  font-family: 'Proxima Nova SCOSF Condensed Light';
  font-size: 1.6em;
  color: #1c1c1c;
  line-height: 1.4;
  word-break: break-word;
  transition: opacity 0.3s ease;
}

.centerpiece-static {
  flex-shrink: 0;
}

.markdown-header, th {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0); /* forces GPU to re-rasterize cleanly */
}

/* Consider disabling for static text */
.llm-bot[data-animate="true"] {
  animation: none;
}




.llm-mic-button {
  background: none;
  font-size: 18px;
  border: none;
  border-radius: 6px;
  padding: 8px 6px;
  margin-left: 8px;
  cursor: pointer;
  transition: background 0.2s;
  margin-right: -2px
}
.llm-mic-button:hover {
  background: #e0e0e0;
}

.mic-icon {
  width: 25px;
  height: 25px;
  vertical-align: middle;
}

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

.sidebar-toggle {
  display: block; /* Always visible */
  position: fixed;
  top: 20px;
  left: 20px;
  font-size: 2em;
  background: none;
  border: none;
  z-index: 1001; /* Above sidebar */
  color: #9c481a;
  cursor: pointer;
}

#header-toggle-placeholder {
  display: none;
}

body.sidebar-hidden #header-toggle-placeholder .sidebar-toggle {
  position: static;
  font-size: 3em;
  color: #9c481a;
  margin-top: -15px;
  margin-right: 10px;
  display: flex; /* or block, as fits your header layout */
  align-items: center;
}

body.sidebar-hidden #header-toggle-placeholder { 
  display: flex;
  align-items: center;
}


/* Default visible state: place button in sidebar header */
.sidebar-header .sidebar-toggle {
  position: static;
  font-size: 2em;
  color: #9c481a;
}

.header-extra-toggle {
  background: none;
  border: none;
  font-size: 2em;
  cursor: pointer;
  display: none;
  justify-self: end;
}

#header-toggle-spacer {
  display: none;

}

#llm-chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0; /* Required for flex scrolling in Chrome/Safari */
  max-height: 100%; /* Prevent overflow if you wish */
  /* Optionally: */
  padding-bottom: 16px; /* So last message isn't hidden by form */
}



body.sidebar-hidden .llm-sidebar {
  transform: translateX(-100%);
  width: 0px;
  padding: 0px;
}



.lang-select {
  font-family: 'Proxima Nova Condensed Regular', Arial, sans-serif;
  font-size: 1em;
  padding: 8px 8px 8px 14px;
  border: none;
  border-radius: 16px;
  background: #f7f7f7;
  color: #9c481a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  margin-right: 6px;
  outline: none;
  cursor: pointer;
  transition: border 0.2s, box-shadow 0.2s;
  position: relative;
  min-width: 100px;
  font-weight: bold;
}

/* Add a custom arrow using a background SVG */
.lang-select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%239c481a' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 10px;
}

.lang-select option {
  font-family: 'Proxima Nova Condensed Regular', Arial, sans-serif;
  color: #1c1c1c;
  font-size: 1em;
}

.header-extra {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  background: #f6f6f9;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.10);
  position: absolute;
  right: 22px;
  top: 70px; /* below header; adjust as needed */
  min-width: 200px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.header-extra.visible {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.notification-bell {
  margin-right: 15px;
  display: inline-block;
  position: relative; /* Required to position .bell-dot inside bell */
}

.bell-dot {
  position: absolute;
  top: 2px;
  left: 3.5px;
  width: 10px;
  height: 10px;
  background-color: #db0000;
  border-radius: 50%;
}

.bell-icon {
  width: 30px;
  height: auto;
  cursor: pointer;
}

.notification-bell-wrapper {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2000; /* Above background and text */
  display: flex;
  flex-direction: column; /* stack vertically */
  align-items: flex-end; /* align icons to the right */

}

.notification-bell-large .bell-icon-large {
  width: 50px; /* bigger bell */
  height: 50px;
  margin: 20px 20px 0 0; /* adjust margin for larger bell */
}

.bell-dot-large {
  position: absolute;
  top: 20px;
  left: 5px;
  width: 18px;
  height: 18px;
  background-color: #db0000;
  border-radius: 50%;
}

/* Ensure tooltip is hidden by default */
.notification-bell .tooltip,
.notification-bell-wrapper .tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  background-color: #333;
  color: #fff;
  font-size: 0.7em;
  padding: 4px 8px 3px 8px;
  border-radius: 4px;
  transition: opacity 0.2s ease;
  bottom: 0;
  right: 28px;
  white-space: nowrap;
  z-index: 1000;
}



/* Show tooltip on hover */
.notification-bell:hover .tooltip {
  visibility: visible;
  opacity: 0.8;
  font-size: 1.2em;
  right: 70px;
  bottom: 18px;
}

.profile-dropdown-wrapper {
  display: inline-block;
  position: relative;
  margin-right: 15px;
}

.profile-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.profile-icon {
  width: 50px;
  height: 50px;
  cursor: pointer;
  margin: 20px 20px 0 0;
}

.profile-dropdown {
  position: absolute;
  top: 80px; /* below the profile icon */
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  font-size: 0.95rem;
  color: #333;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
  text-align: center;
}



.profile-dropdown.hidden {
  display: none;
}

.profile-dropdown p {
  margin: 0;
  color: #444;
  word-break: break-word;
}

.profile-dropdown .logout-form {
  margin: 0;
  padding: 0;
  display: block;
  border-top: 1px solid #eee;
  padding-top: 6px;
}

.profile-dropdown .logout-form .dropdown-logout {
  background: none;
  border: none;
  color: #c00;
  text-decoration: none;
  cursor: pointer;
  padding: 4px 0;
  display: inline-block;
  width: 100%;
  text-align: center;
  font-size: 1em;
}

.dropdown-logout:hover {
  text-decoration: underline !important;
}


.agent-action-group .notification-bell .tooltip{
  right: 30px;
  bottom: 5px;
  font-size: 1em;
}

.settings-icon {
  display: inline-block;
  position: relative;
  margin-right: 15px;
}

.settings-icon-img {
  width: 50px;
  height: 50px;
  cursor: pointer;
  margin: 20px 20px 0 0;
}

.settings-icon:hover .tooltip {
  visibility: visible;
  opacity: 0.8;
  font-size: 1.2em;
  right: 70px;
  bottom: 18px;
}

.notifications-container {
  font-family: 'Proxima Nova SCOSF Condensed Bold';
  margin: 40px;
  background: #f6f6f9; /* matches chat container background */
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  padding: 30px;
  color: #1c1c1c;
}

.notification-list {
  font-family: 'Proxima Nova Condensed Regular';
  list-style: none;
  padding: 0;
  margin: 0;
}

.notification-list .title {
  font-family: 'Proxima Nova SCOSF Condensed Bold';
  font-size: 1.6em;
  color: #813910;
}

.notification-list .markdown-bold {
  font-family: 'Proxima Nova Condensed Bold';
}

.notification-item {
  padding: 16px;
  border-bottom: 1px solid #ddd;
  font-size: 1.05em;
  line-height: 1.4;
  transition: background 0.2s ease;
}

.notification-item:last-child {
  border-bottom: none; /* remove border for last item */
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  font-family: 'Proxima Nova Condensed Regular';
  font-size: 1.2em;
  color: #9c481a; /* matches button/link accent color */
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #813910; /* darker shade on hover */
}



@media (min-width: 769px) {
  .header-extra,
  .header-extra-toggle {
    display: none !important;
  }

  body.sidebar-hidden .llm-chat-header {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    padding: 20px 0;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .llm-main {
    padding: 0;
  }

  .llm-chat-container {
    position: absolute; 
    bottom: 0; 
    left: 0; 
    right: 0;
    display: flex;
    flex-direction: column;
    margin: 10px;
    max-width: 1020px;
    padding: 15px 15px 0;
    max-height: calc(82vh - 40px); 
    overflow-y: auto;
    overscroll-behavior: contain;      /* prevents body bounce on iOS */
  }

  .llm-form-row {
    padding: 0px;
  }

  textarea.llm-input {
    font-size: 1em;
    border-radius: 40px;
  }

  .lang-select {
    padding: 6px 32px 6px 10px !important;
    background-size: 16px 10px !important;
    min-width: 40px !important;
    overflow: hidden;
    white-space: nowrap;
    overflow: hidden;
    white-space: nowrap;
    margin: 0;
    }

  button.llm-send {
    width: 35px;
    height: 35px;
    margin-left: 0 !important;
  }

  .mic-icon {
    width: 30px;
    height: 30px;
  }

  button.llm-send svg {
    width: 18px;
    height: 18px;
  }

  .logo {
    min-width: 0 !important;
    max-width: 30vw !important;
    width: auto !important;
    height: auto !important;
    margin: auto !important;
    display: block !important;
  }

  .header-extra {
    position: fixed;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    background: #f6f6f9;
    z-index: 2000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    padding: 0;
    pointer-events: auto;
    transition: opacity 0.2s;
  }
  .header-extra.visible {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }
  .header-extra .agent-action-group {
    gap: 36px;
    width: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-top: -200px;
  }

  .header-extra .logout-button {
    font-size: 2em;
    padding: 28px 0;
    width: 90vw;
    text-align: center;
    justify-content: center;
    border-radius: 18px;
  }

  .header-extra .notification-bell {
    margin: 0;
    margin-top: 20px;
    margin-bottom: -20px;
  }

  .header-extra .notification-bell .bell-icon{
    width: 36px;
    height: auto;
  }

  .header-extra .bell-dot{
    width: 12px;
    height: 12px;
    top: 2px;
    left: 4px;
  }

  .header-extra .agent-link {
    font-size: 1.5em;
    padding: 28px 0;
    width: 90vw;
    text-align: center;
    justify-content: center;
    border-radius: 18px;
    margin-top: -50px;
  }
  .header-extra .agent-label {
    justify-content: center;
  }
  .header-extra-close {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 50px;
    margin-bottom: 0;
    font-size: 3em;
    background: none;
    border: none;
    color: #9c481a;
    z-index: 2100;
    cursor: pointer;
    line-height: 1;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .switch-icon{
    width: 40px;
    height: 40px;
  }
  
  .llm-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 88vw;
    height: 100%;
    background: #f1f1f1;
    z-index: 1000;
    transform: translateX(0);
    transition: transform 0.3s ease, width 0.3s ease, padding 0.3s ease;
    min-width: 0;
    max-width: 100vw;
    font-size: 0.8em;
    padding: 32px 32px 32px 32px;
  }


  .llm-sidebar h2 {
    font-size: 3em;
    margin: 30px 10px 30px 0;
    padding: 8px 0 0;
    }

  .conversation-item {
    padding: 10px 10px;
    font-size: 1em;
    border-radius: 10px;
  }
  .llm-sidebar li {
    margin-bottom: 12px;
  }
  .conversation-title {
    font-size: 1.4em;
  }
  .new-chat-btn {
    width: 100%;
    font-size: 2em;
    padding: 10px 0;
    margin-left: 0;
    margin-top: 20px;
    border-radius: 14px;
  }
  .delete-btn {
    font-size: 1.5em;
    padding: 8px 12px;
  }

  .heading-group,
  .llm-agent-controls {
    display: none !important;
  }

  .sidebar-toggle {
    display: flex;
    align-self: center;
    margin: auto !important;
    font-size: 32px !important;
  }

  body:not(.sidebar-hidden) .sidebar-toggle {
    font-size: 4em !important;
  }

  .llm-chat-header {
    min-height: 80px;
    height: calc(18vh - 60px);
    grid-template-columns: 1fr auto 1fr;
    border-bottom: 2px solid #ddd;
    width: 100vw;
    padding: 20px 0;
    margin: 0 auto;
  }

  .header-extra-toggle {
    display: block !important;
    justify-self: end;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    align-self: center;
    margin: auto !important;
  }

  body.sidebar-hidden .sidebar-toggle {
    display: flex;
  }

  body:not(.sidebar-hidden) #header-toggle-spacer {
    align-items: center;
    position: static;
    font-size: 32px;
    color: #9c481a;
    display: flex;
    margin: auto !important;
  }
  body.sidebar-hidden #header-toggle-spacer {
    display: none;
  }

  #header-toggle-placeholder { 
    display: flex;
    align-items: center;
  }

  .logo-corner{
    width: 80%;
    height: auto;
  }

  .login-panel-centered{
    margin: 100px 50px 50px;
  }

  .btn-login-google{
    padding: 15px 25px;
    border-radius: 30px;
    margin-top: 20px;
  }

}

@media (max-width: 768px) {

  .notification-bell-wrapper {
    position: absolute;
    top: 15px;
    right: 10px;
    z-index: 2000; /* Above background and text */
  }

  .notification-bell-wrapper .tooltip {
    display: none !important;
    opacity: 0;
  }
  
  .notification-bell-large .bell-icon-large {
    width: 30px; /* bigger bell */
    height: 30px;
    margin: 10px 0 0 0; /* adjust margin for larger bell */
  }
  
  .bell-dot-large {
    position: absolute;
    top: 10px;
    left: 2px;
    width: 12px;
    height: 12px;
    background-color: red;
    border-radius: 50%;
  }

  .settings-icon {
    display: inline-block;
    position: relative;
    margin-right: 15px;
  }
  
  .settings-icon-img {
    width: 30px;
    height: 30px;
    cursor: pointer;
    margin: 10px 0 0 0;
  }

  .profile-icon {
    width: 30px;
    height: 30px;
    cursor: pointer;
    margin: 10px 0 0 0; 
  }

  .profile-dropdown{
    top: auto;

  }

  .profile-dropdown p {
    font-size: 1em;
  }
  
  .settings-icon:hover .tooltip {
    visibility: visible;
    opacity: 0.8;
    font-size: 1.2em;
    right: 70px;
    bottom: 18px;
  }

  .llm-welcome-container {
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    justify-content: flex-start;
    gap: 40px;
    overflow-y: auto;
  }

  .llm-agent-select {
    align-items: center;
    text-align: center;
  }

  .select-title {
    font-size: 3em;
    margin-bottom: 25px;
    margin-top: 10px; 
  }

  .agent-entry .text-link {
    font-size: 2em;
    margin-bottom: 15px;
    white-space: normal;
    text-align: center;
  }

  .logout-form {
    font-size: 1.2em;
    margin-bottom: 10px;
    font-family: "Proxima Nova Condensed Bold";
  }

  .agent-entry {
    flex-direction: column;
  }

  .agent-entry.selected .text-link {
    color: #9c481a;
    border-radius: 16px;
  }

  .llm-welcome-centerpiece {
    position: static;
    transform: none;
    margin-top: 0;
    max-width: 100%;
    padding: 0 20px;
  }

  .centerpiece-static .logo-container .logo {
    max-width: 150px !important;
    margin: -10px auto 0px !important;
  }

  .heading-welcome {
    font-size: 2em;
    margin-top: 20px;
    margin-bottom: 15px;
  }

  .heading-sub {
    font-size: 1.2em;
  }

  #agent-subheading {
    max-width: 100%;
    line-height: 1;
    padding: 0 10px;
    word-break: break-word;
  }

  .logout-btn {
    font-size: 1.8em;
    margin-top: 0;
  }

  html, body {
    height: 100%;
    overflow-y: auto;
  }

  .agent-entry:hover .text-link {
    color: #9c481a;
    font-family: 'Bebas Neue Bold';
    transform: scale(1.1);
  }

  .background-mouse{
    top: 10%;
    right: -30%;
    left: auto;
  }
  .bg-mouse-img {
    width: 1000px;
    max-width: none;
  }
  .llm-mic-button {
    margin-left: 0 !important;
    padding: 8px 0 8px 6px;
  }

  .notifications-container{
    margin: 5px;
    padding: 20px;
  }

  .llm-agent-select {
    align-items: center;
  }
}


/* ===== SETTINGS PAGE ===== */

.agent-overview-read-only-header {
  display: flex;
}

.read-only-banner {
  top: 12px;
  right: 16px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-family: 'Proxima Nova Condensed Bold';
  color: #333;
  opacity: 0.8;
  font-size: 1em;
  z-index: 2; 
  cursor: default; 
  position: static; 
  margin: 0 0 16px auto;
}

.read-only-banner .lock-icon {
  width: 16px;
  height: 16px;
}

.read-only-banner .tooltip {
  position: absolute;
  right: 13%;
  top: 13px;
  max-width: 220px;          /* limit width */
  white-space: normal;       /* allow text to wrap */
  word-break: break-word;    /* wrap long words if needed */
  text-align: center;
  background: #000;
  border-radius: 4px;
  font-size: 0.8em;
  padding: 4px 8px;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  height: auto;
  bottom: auto;
}

.read-only-banner:hover .tooltip{
  opacity: 0.8;
  visibility: visible;
}

.settings-header, 
.notifications-header{
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

.settings-header .back-link,
.notifications-header .back-link {
  position: absolute;
  left: 0; /* sticks to the left edge */
  text-decoration: none;
}

.settings-header h1 {
  text-align: center;
}


#agent-form-container {
  margin-top: 2rem;
  font-family: 'Proxima Nova Condensed Regular';
  color: #1c1c1c;
  background: #f6f6f9;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  padding: 24px 28px;
  margin-left: 3%;
  margin-right: 3%;
  z-index: 1; /* lower than overlay */
  max-width: 1000px;
  margin: auto;
  position: relative;
}

#agent-form-container:empty {
  display: none !important;
}

/* Headings */
#agent-form-container h2 {
  font-family: 'Bebas Neue Bold';
  font-size: 2.2em;
  margin: 8px 0 16px 0;
  color: #1c1c1c;
}

#agent-form-container h3 {
  font-family: 'Proxima Nova SCOSF Condensed Bold';
  font-size: 1.5em;
  font-weight: 100;
  margin: 20px 0 10px;
  color: #9c481a;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
}

/* Section blocks (match chat container aesthetic) */
#agent-form-container .section {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
}

/* Labels & Inputs */
#agent-form-container label {
  font-family: 'Proxima Nova Condensed Bold';
  display: block;
  margin-bottom: 4px;
  font-size: 1em;
  color: #1c1c1c;
}

.overview-line {
  display: flex;
  gap: 6px; /* space between label and value */
  margin: 4px 0;
  font-family: 'Proxima Nova Condensed Regular';
  font-size: 1rem;
  margin-bottom: 8px;
}
.overview-line .overview-header {
  font-family: 'Proxima Nova Condensed Bold';
  font-size: 1.2em;
  color: #000;
  align-self: center;
}
.overview-line .overview-value {
  color: #555;
  align-self: center;
}

.name.clickable {
  font-family: 'Proxima Nova Condensed Bold';
  font-size: 1.2em;
  color: #000;
  align-self: center;
  cursor: pointer;
  transition: color 0.2s ease;
}

.name.clickable:hover {
  color: #9c481a;
}

#agent-form-container input[type="text"],
#agent-form-container input[type="number"],
#agent-form-container textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 12px;
  font-family: 'Proxima Nova Condensed Regular';
  background: #f1f1f1;
  transition: border-color 0.2s;
}

#agent-form-container textarea {
  max-height: 400px;
  margin-top: 12px;
  padding: 16px 20px;
  line-height: 1.5;
  box-sizing: border-box;
  display: block;
  align-self: stretch;
  margin-bottom: 16px;
}

#agent-form-container input:focus,
#agent-form-container textarea:focus {
  outline: none;
  border-color: #9c481a;
  box-shadow: 0 0 0 2px rgba(156, 72, 26, 0.1);
}

/* Lists (Knowledge Bases, Functions, Guardrails) */
#agent-form-container ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#agent-form-container li {
  font-size: 1em;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

#agent-form-container li:last-child {
  border-bottom: none;
}

/* Buttons (Match Send Button Accent) */
#agent-form-container button {
  background: #9c481a;
  color: #fff;
  font-family: 'Proxima Nova SCOSF Condensed Bold';
  font-size: 1em;
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  display: inline-block;
  margin-top: 8px;
}

#agent-form-container button:hover {
  background: #7e3813;
  transform: scale(1.03);
}

/* Responsive tweaks for mobile */
@media (max-width: 768px) {
  #agent-form-container {
    padding: 12px;
    margin: 10px;
  }

  #agent-form-container h2 {
    font-size: 1.8em;
    text-align: center;
  }

  #agent-form-container h3 {
    font-size: 1.3em;
  }
}

/* ===== Agent Settings Page Header & Dropdown ===== */

.instructions-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-counter {
  font-size: 16px;
  font-weight: 400;
  color: #666;
}

.instructions-text {
  font-family: 'Proxima Nova Condensed Regular';
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 12px;
  white-space: pre-wrap;     /* preserve formatting but allow wrapping */
  word-wrap: break-word;     /* prevent long words from overflowing */
  overflow-x: auto;          /* allow horizontal scroll if absolutely needed */
  font-size: 1em;
  line-height: 1.5;
  max-height: 400px;         /* prevent giant overflow */
  overflow-y: auto;          /* scroll vertically if too tall */
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

.instructions-container {
  display: flex;
  flex-direction: column;
}

.instructions-container .instructions-edit,
    .instructions-container .instructions-actions {
      box-sizing: border-box;
    }

.settings-container {
  margin: 40px;
  font-family: 'Proxima Nova Condensed Regular';
  justify-content: center; /* Centers content horizontally */
  align-items: center; /* Centers content vertically */
}

.settings-container .back-link,
.notifications-container .back-link {
  display: inline-block;
  margin: 20px 0 20px auto;  
  margin-left: 8%;
  font-size: 1.4em;
  color: #9c481a;
  cursor: pointer;
  transition: color 0.2s ease;
}

.settings-container .back-link:hover,
.notifications-container .back-link:hover {
  color: #813910;
  text-decoration: underline;
}

h1 {
  font-family: 'Bebas Neue Bold';
  font-size: 3em;
  color: #1c1c1c;
  text-align: center;
  margin-bottom: 24px;
  margin-top: 20px;
}

/* Dropdown container */
#agent-select {
  display: block;
  margin: 0 auto 30px;
  padding: 10px 16px;
  font-family: 'Proxima Nova Condensed Regular';
  font-size: 1.2em;
  color: #9c481a;
  border: none;
  border-radius: 24px;
  background: #f7f7f7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.1s ease;
  min-width: 220px;
  text-align: center;
  position: relative;
}

/* Hover/focus */
#agent-select:hover,
#agent-select:focus {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

/* Add arrow indicator similar to .lang-select */
#agent-select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%239c481a' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 10px;
  padding-right: 32px; /* space for arrow */
}

/* Options inside select */
#agent-select option {
  font-family: 'Proxima Nova Condensed Regular';
  color: #1c1c1c;
  font-size: 1em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .settings-container .back-link, 
  .notifications-container .back-link {
    margin-left: 0;
  }
  h1 {
    font-size: 2em;
    margin-bottom: 16px;
  }

  .settings-container {
    margin: 10px;
    padding: 20px 10px 0 10px
  }

  #agent-select {
    font-size: 1em;
    padding: 8px 14px;
    min-width: 180px;
  }
}


/* ====== MODAL STYLES ====== */

.kb-modal-overlay {
  position: fixed; /* or absolute if the parent is the viewport */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center; /* Centers content horizontally */
  align-items: center; /* Centers content vertically */
  /* You might also need a background-color and a high z-index */
  background-color: rgba(0, 0, 0, 0.5); /* Example semi-transparent background */
  z-index: 9999; /* Ensure it's above other content */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-weight: 100 !important;
}

.kb-modal {
  background: #f6f6f9;
  padding: 30px 40px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  font-family: 'Proxima Nova Condensed Regular';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Adjusts the element's position based on its own size */
  /* Ensure the parent (.kb-modal-overlay.active) has position: relative, absolute, fixed, or sticky */
  transition: transform 1s ease;
}

.kb-modal h2 {
  font-family: 'Proxima Nova Condensed Bold';
  font-size: 1.8em;
  margin-bottom: 20px;
  color: #1c1c1c;
  text-align: center;
  font-weight: 100;
}
.kb-modal h3 {
  font-weight: 100;
}

.kb-modal p {
  margin: 12px 0;
  font-size: 1.1em;
  line-height: 1.4;
  color: #1c1c1c;
}

.kb-modal p strong {
  font-family: 'Proxima Nova Condensed Bold';
  color: #9c481a;
  font-weight: 100;
}

.kb-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2em;
  cursor: pointer;
  color: #9c481a;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease;
}

.kb-modal-close:hover {
  background: rgba(156, 72, 26, 0.1);
  transform: scale(1.1);
}

.kb-modal-overlay.active {
  position: fixed; /* or absolute if the parent is the viewport */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center; /* Centers content horizontally */
  align-items: center; /* Centers content vertically */
  /* You might also need a background-color and a high z-index */
  background-color: rgba(0, 0, 0, 0.5); /* Example semi-transparent background */
  z-index: 9999; /* Ensure it's above other content */
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 1;
  visibility: visible;
}

.kb-modal .modal-btn {
  font-family: 'Proxima Nova SCOSF Condensed Light';
  background: #9c481a;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.kb-modal .modal-btn:hover {
  background: #813910;
}

.kb-modal .styled-textarea {
  font-family: 'Proxima Nova Condensed Regular';
  width: 100%;
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  margin-top: 10px;
  margin-bottom: 15px;
  line-height: 1.4;
}

.kb-modal .styled-textarea:focus {
  border-color: #813910;
  outline: none;
  box-shadow: 0 0 3px rgba(0, 123, 255, 0.3);
}

.kb-modal .schema-section h3 {
  font-family: 'Proxima Nova Condensed Bold';
  color: #9c481a;
}

.kb-modal .schema-section .schema-note {
  font-family: 'Proxima Nova Condensed Regular';
  color: #000;
  font-size: 0.9em;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .kb-modal {
    padding: 20px 25px;
  }
  
  .kb-modal h2 {
    font-size: 1.6em;
    margin-bottom: 15px;
  }
  
  .kb-modal p {
    font-size: 1em;
  }

  .read-only-banner{
    margin-top: 10px;
    margin-right: 5px;
  }
}

/* === Model Configuration Block === */
.model-config-group {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 24px;
  margin: 20px 0;
  font-family: 'Proxima Nova Condensed Regular';
  color: #1c1c1c;
  border: 1px solid #e0e0e0;
}

/* Labels */
.model-config-group label {
  font-family: 'Proxima Nova Condensed Bold';
  display: block;
  margin-bottom: 6px;
  font-size: 1.05em;
  color: #1c1c1c;
}

/* Sliders row */
.model-config-group .slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.model-config-group .slider-row .min,
.model-config-group .slider-row .max {
  font-size: 0.9em;
  color: #555;
  width: 24px;
  text-align: center;
}

/* Range input (slider) */
.model-config-group input[type="range"] {
  flex: 1;
  cursor: pointer;
  accent-color: #9c481a; /* modern browsers */
}

/* Number input (manual override) */
.model-config-group .manual-input {
  width: 60px !important;
  padding: 6px !important;
  font-size: 0.95em !important;
  border: 1px solid #ccc !important;
  border-radius: 6px !important;
  background: #f9f9f9 !important;
  font-family: 'Proxima Nova Condensed Regular' !important;
  text-align: center !important;
}

/* Dropdown for retrieval method */
.model-config-group select {
  width: 100%;
  padding: 8px 12px;
  font-size: 1em;
  font-family: 'Proxima Nova Condensed Regular';
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #f9f9f9;
  color: #1c1c1c;
  margin-bottom: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.model-config-group select:focus {
  border-color: #9c481a;
  outline: none;
  box-shadow: 0 0 0 2px rgba(156, 72, 26, 0.1);
}

/* Save button */
.model-config-group .save-model-config {
  background: #9c481a;
  color: #fff;
  font-family: 'Proxima Nova SCOSF Condensed Bold';
  font-size: 1em;
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  display: inline-block;
}

.model-config-group .save-model-config:hover {
  background: #7e3813;
  transform: scale(1.03);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .model-config-group {
    padding: 16px;
    margin: 16px 0;
  }

  .model-config-group label {
    font-size: 1em;
  }

  .model-config-group .slider-row {
    gap: 6px;
    margin-bottom: 14px;
  }

  .model-config-group .manual-input {
    width: 50px;
  }
}


.config-tooltip-wrapper {
  position: relative;
  align-items: center;
  gap: 4px;
  cursor: default;
  display: inline-block !important;
  width: auto; 
}

.config-tooltip-text {
  visibility: hidden;
  opacity: 0;
  width: 280px;
  background: #813910;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 6px 4px;
  position: absolute;
  font-size: 12px;
  transition: opacity 0.2s;
  z-index: 10;
  margin-left: 8px;
}

.config-tooltip-wrapper:hover .config-tooltip-text {
  visibility: visible;
  opacity: 0.9;
}

.custom-dropdown {
  position: relative;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
}

.dropdown-selected {
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.dropdown-name {
  font-family: 'Proxima Nova Condensed Bold';
}

.dropdown-description {
  font-size: 0.85em;
  color: #333;
}

.dropdown-list {
  display: none;
  position: absolute;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  z-index: 1000;
}

.dropdown-list.show {
  display: block;
}

.dropdown-item {
  padding: 8px 10px !important;
}

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

.version-list.hidden{
  display: none;
}

.version-header{
  font-family: 'Proxima Nova Condensed Bold';
  margin-bottom: 8px;
  font-size: 1.2em;
  display: block;
}

#version-name-input, 
#version-description-input{
  margin-top: 0 !important;
  box-sizing: border-box;
}

.rollback-btn {
  margin: 0 0 0 4px;
  font-size: 0.8em !important;
  padding: 6px 12px !important;
}

.current-version {
  border-bottom: 1px solid #ddd;
  margin-bottom: 8px;
}

#version-section h3{
  margin: 20px 0 0 0;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px; /* Adjust based on space */
}

.loading-spinner::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top-color: #9c481a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.inline-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  vertical-align: middle;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}


@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toggle-key{
  background: transparent !important;
  border: none !important;
  padding: 4px !important;
  margin: 2px 0 0 6px !important;
  cursor: pointer !important;
  opacity: 0.6 !important;
  transition: opacity 0.2s ease !important;
  vertical-align: middle !important;
}

.toggle-key:hover {
  opacity: 1 !important;
}

.toggle-key img {
  width: 16px;
  height: 16px;
  display: inline-block;
  pointer-events: none;
}

/* ====== GUARDRAIL MODAL STYLES ====== */

.guardrail-modal-overlay {
  position: fixed; /* or absolute if the parent is the viewport */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center; /* Centers content horizontally */
  align-items: center; /* Centers content vertically */
  background-color: rgba(0, 0, 0, 0.5); /* Example semi-transparent background */
  z-index: 9999; /* Ensure it's above other content */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-weight: 100 !important;
}

.guardrail-modal {
  background: #f6f6f9;
  padding: 30px 40px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  font-family: 'Proxima Nova Condensed Regular';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 1s ease;
}

.guardrail-modal h2 {
  font-family: 'Proxima Nova Condensed Bold';
  font-size: 1.8em;
  margin-bottom: 20px;
  color: #1c1c1c;
  text-align: center;
  font-weight: 100;
}

.guardrail-modal h3 {
  font-weight: 100;
}

.guardrail-modal p {
  margin: 12px 0;
  font-size: 1.1em;
  line-height: 1.4;
  color: #1c1c1c;
}

.guardrail-modal p strong {
  font-family: 'Proxima Nova Condensed Bold';
  color: #9c481a;
  font-weight: 100;
}

.guardrail-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2em;
  cursor: pointer;
  color: #9c481a;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease;
}

.guardrail-modal-close:hover {
  background: rgba(156, 72, 26, 0.1);
  transform: scale(1.1);
}

.guardrail-modal-overlay.active {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 1;
  visibility: visible;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .guardrail-modal {
    padding: 20px 25px;
  }

  .config-tooltip-text{
    max-width: 180px
  }
}
