/* shared botkit ui styles */
* {
    box-sizing: border-box;
  }
  

@font-face {
  font-family: 'Futura Condensed Bold';
  src: url('/webfonts/2947D0_0_0.woff') format('woff'),
       url('/webfonts/2947D0_0_0.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}
  body,
  html {
    margin: 0;
    padding: 0;
    font-size: 18px;
    background-color: #FFF;
    font-family: "helvetica", sans-serif;
  }

  body {
    padding-bottom: 143px;
  }


  .sidepanel {
    width: 310px;
    max-width: 90vw;
    position: fixed;
    left:0;
    top:0;
    border-right: 1px solid #CCC;
    height: 100vh;  /* 100% of the viewport height */
    box-sizing: border-box;
    padding: 0px;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
  }

  .sidepanel-header, .sidepanel-footer {
      flex-shrink: 0;  /* Ensure they don't shrink */
      padding: 10px;   /* Add some padding for visual appearance */
      background-color: #e5e5e5;  /* Optional: Light background color */
      border-bottom: 1px solid #d1d1d1;  /* Optional: Border at the bottom */
  }
  
  .sidepanel-footer {
      border-top: 1px solid #d1d1d1;  /* Optional: Border at the top */
      border-bottom: none;  /* Remove border bottom */
  }

  .new-chat-btn {
      display: block;
      width: 100%;
      padding: 10px;
      border: none;
      background-color: #a795ef;
      color: white;
      cursor: pointer;
      padding: 8px 23px;  /* Adjusting for border width */
      border-radius: 50px;
      text-align: center;
      /*margin-bottom: 10px;*/
  }

  .new-chat-btn:hover {
      background-color: #8e6edf;
  }

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

  .chat-list-wrapper {
    flex-grow: 1; 
    max-height: calc(100vh - 70px);  /* Adjust this value based on your design */
    overflow-y: auto;
  }

  .chat-item {
      display: flex;
      align-items: center;
      padding: 10px 10px;
      cursor: pointer;
      height:82px;
      max-height: 82px;
      overflow: hidden;
      border-bottom: 1px solid #e0e0e0;
      position: relative; /* To position the delete button relative to the chat item */
  }

  .new-message {
    font-weight: bold;
    background-color: #eef;
  }

  .active-chat {
    background-color: #e0e0e0; /* A light gray color */
  }
  
  .delete-chat-btn {
    background: #fff;
    border: none;
    border-radius: 20px;
    width:30px;
    height:30px;
    padding-top: 2px;
    cursor: pointer;
    position: absolute;
    right: 10px; /* Adjust as needed */
    top: 50%;
    transform: translateY(-50%);
    display: none; /* Hide by default */
  }

  .chat-item.active-chat .delete-chat-btn {
      display: block; /* Show the button when the chat is active */
  }

  .chat-image {
    width: 100%;          /* Fixed width */
    height: 100%; /* Ensuring height is 64px */
    max-width: 50px;    /* Maximum height to ensure it doesn't become too tall */
    max-height: 64px;    /* Maximum height to ensure it doesn't become too tall */
    margin-right: 10px;   /* Some space between the image and the name */
    border-radius: 5px;   /* Optional: makes the image edges rounded */
    object-fit: cover;    /* Ensure that the image covers the dimensions */
    background-color: #FFF; /* White background */
    padding:2px;
  }

  /* Make a object fit so the image is not exeeding 50 * 64px */
  .chat-image {
    object-fit: cover;
  }

  .chat-item-ad {
    background-color: white;
    position: absolute;
    z-index: 99;
  }

  /* if chatimage is ad make contain */
  .chat-item-ad .chat-image {
    object-fit: contain;
  }

  .chat-item .fa-amazon {
    color: #ff9900;
    margin-right: 5px;
  }




  .wrapper {
      margin-left: 310px; /* width of sidepanel + some margin */
  }

  /* If you want to clear floats after the sidepanel and wrapper */
  /*.wrapper:after, .sidepanel:after {
      content: "";
      display: table;
      clear: both;
  }*/

  
  .box {
    border: 2px solid #CCC;
    padding: 1rem calc(1rem - 2px);
    margin-bottom: 1rem;
  }
  .box:after {
    content: "";
    display: table;
    clear: both;
  }
  .box h1,
  .box h2,
  .box h3 {
    margin-top: 0;
  }
  
  footer {
    text-align: center;
  }
  
  .hero {
    text-align: center;
    padding: 2rem;
  }
  .hero h1 {
    font-size: 4rem;
    margin: 0;
  }
  
  a {
    color: #a795ef;
  }
  
  .copyurl {
    width: 100%;
    font-size: 1.25rem;
  }
  
  div.input label {
    font-weight: bold;
    font-size: smaller;
  }
  
  .addon {
    display: flex;
    border: 1px solid #999;
    border-radius: 6px;
    padding: 5px;
    background: #F0F0F0;
  }
  .addon input,
  .addon textarea {
    flex-grow: 1;
    border: 0;
    background: transparent;
  }
  .addon button {
    flex-grow: 0;
    background: transparent;
    border: 1px solid #999;
    border-radius: 6px;
    font-weight: bold;
  }
  .addon button.textarea {
    align-self: flex-start;
    padding: 0.5rem;
  }
  .addon button:hover {
    background: #FFF;
    color: #a795ef;
  }
  
  div.hr {
    border: 1px dashed #ccc;
    width: 10%;
    margin: 4rem auto;
    height: 1px;
  }
  
  a.button {
    border: 2px solid #a795ef;
    font-weight: normal;
    margin: 0;
    border-radius: 16px;
    display: inline-block;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    background-color: #a795ef;
    color: white;
  }
  a.button:hover {
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
  }
  a.button-buy {
    border: 2px solid #54e59c;
    background-color: #0b9b53;
    color: white;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
  }
  
  /* chat client */
  #message_window {
    background: #FFFFFF;
    border-left: 0; /*no border left, because chat list has border right*/
    border-right: 1px solid #CCC;
    /*height: 500px;
    width: 320px;*/
    width: 100%;
    /*margin: 2rem auto;*/
    display: flex;
    flex-direction: column;
    font-family: "helvetica", sans-serif;
  }
  #message_window .disconnected {
    background: #FFFFCC;
    padding: 0.25rem;
  }
  #message_window.connected .disconnected {
    display: none;
  }
  #message_window .offline {
    display: none;
  }
  #message_window.offline .disconnected {
    display: none;
  }
  #message_window.offline .offline {
    background: #FF0000;
    color: #FFF;
    padding: 0.25rem;
    display: block;
  }
  #message_window .powered_by {
    flex-shrink: 0;
    text-align: center;
    border-bottom: 1px solid #CCC;
    font-size: 12px;
    padding: 0.25rem;
    color: #000;
    z-index: 11;
    /*gradient from left to right #f015ff,#c9fa33,  #44d2e1 */
    background: linear-gradient(to right, #f015ff, #c9fa33, #44d2e1);
  }
  #message_window .powered_by a {
    text-decoration: none;
    color: #fff;
  }
  #message_window .powered_by img {
    position: relative;
    top: 2px;
  }
  .header-logo {
    color: black !important;;
    font-family: 'Futura Condensed Bold', sans-serif;
  }
  #message_window section {
    flex-grow: 1;
    flex-direction: column-reverse;
    display: flex;
    overflow-y: auto;
  }
  #message_window section div div {
    margin: 0.25rem;
    clear: both;
  }
  #message_window footer {
    border-top: 1px solid #CCC;
    padding: 0.25rem;
  }
  #message_window footer textarea {
    flex-grow: 1;
    font-size: 1.25rem;
    outline: none;
    border: none;
    min-width: 100px;
    font-family: "helvetica", sans-serif;
    border-radius: 10px;
  }
  #message_window footer textarea.big-input {
    /* Adjust these values as needed */
    height: auto;
    max-height: 105px; /* Maximum height for the expanded input */
    overflow-y: auto; /* Allow vertical scrolling */
}
  #stopInpaintingText {
    flex-grow: 1;
    font-size: 1.25rem;
    outline: none;
    border: none;
    min-width: 100px;
    color: #a795ef;
    text-align: left;
  }
  #stopFreezeText {
    flex-grow: 1;
    font-size: 1.25rem;
    outline: none;
    border: none;
    min-width: 100px;
    color: #47c4ed;
    text-align: left;
  }
  #message_window footer button,
  #message_window footer .button {
    background-color: #a795ef;
    color: white;
    border: none;
    padding: 4px 10px;  /* Adjusting for border width */
    border-radius: 19px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
  }
  #message_window footer .button-stop {
    background-color: #c9113f;
  }
  #message_window footer select.button {
    width: 30px;
    height: auto;
  }
  #message_window footer button + button,
  #message_window footer button + .button,
  #message_window footer .button + .button,
  #message_window footer .button + button {
    margin-left:4px;
  }
  #message_window footer button#chat_unlock {
    background-color: #4caf87;
  }
  #message_window footer button:disabled,
  #message_window footer select:disabled {
    background-color: #ddd!important;
    color: #888!important;
    cursor: not-allowed!important;
  }
  #message_window form {
    display: flex;
    margin: 0;
    padding: 0.25rem;
  }

  /* guidance select styling BEGIN */
  #guidanceLevelSelector {
    border-radius:50%;
    background: #a795ef;
    color:#fff;
    border:none;
    padding: 0;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
  }
  #message_window footer select.digits2 {
    padding: 4px 5px;
  }

  /* guidance select styling END */

  #message_window #message_template {
    display: none;
  }
  #message_window .message {
    font-size: 0.9em;
    padding: 0.5rem;
    background: #F0F0F0;
    color: #333;
    border-radius: 5px;
    width: auto;
    display: inline-block;
    max-width: 75%;
  }
  #message_window .message.button {
    display:block;
    background:none;
    padding-top: 0;
  }
  /*#message_window .message 87% on mobile */
  @media screen and (max-width: 768px) {
    #message_window .message {
      max-width: 87%;
    }
  }
  /* make powered by fixed on desktop */
  @media screen and (min-width: 768px) {
    #message_window .powered_by {
      position: fixed;
      top: 0;
      width: calc(100% - 310px);
    }
    body {
      padding-top:40px;
    }
  }
  #message_window .file_attachment {
    background: #F0F0F0;
    color: #333;
    margin: 0!important;
    border-radius: 5px;
    display: block;
    max-width: 100%;
  }
  #message_window .file_attachment img {
    max-width: 100%;
    max-height: 300px;
    display: block;
    border-radius: 5px;
  }
  #message_window .message.outgoing .file_attachment {
    background: #5d5d5d;
    color: white;
    max-width: 99px;
  }
  #message_window .file_attachment .recreate-button {
    background-color: #a795ef;
    color: white;
    border:none;
    border-radius: 50px;
    margin-right:3px;
    padding: 5px 8px;
    display: block;
    font-size: 20px;
    height: 36px;
    width: 36px;
    cursor: pointer;
    position: absolute;
    margin-top: -46px;
    margin-left: 10px;
  }
  #message_window .button_message {
    margin: 1rem 0;
    border-radius: 4px;
    border-color: #a795ef;
    border-style: solid;
    color: #a795ef;
    border-width: 1px;
    padding: 0.25rem 1rem;
    text-decoration: none;
    text-align: center;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25);
    display: block;
  }
  #message_window .thumbnail {
    height: 40px;
    display: block;
    margin: 0 auto 4px auto;
    border-radius: 5px;
  }
  #message_window .message p {
    margin-top: 0;
    margin-bottom: 0.5rem;
  }
  #message_window .message p:last-child {
    margin-bottom: 0;
  }
  #message_window .message.outgoing {
    float: right;
    background: #5d5d5d;
    color: white;
  }
  #message_window #message_replies {
    text-align: center;
    /* overflow-x: auto;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
    Lets it scroll lazy */
  }
  #message_window #message_replies ul {
    list-style-type: none;
    margin: 0px auto;
    padding: 0;
  }
  #message_window #message_replies ul li {
    display: inline-block;
    margin: 0.25rem 0.5rem;
    margin-left: 0;
  }
  #message_window #message_replies a {
    text-decoration: none;
    display: block;
    border: 1px solid #a795ef;
    color: #a795ef;
    border-radius: 16px;
    padding: 0.25rem 1rem;
    font-size: 15px;
    cursor: pointer;
  }
  #message_window #message_replies a:hover {
    background: #a795ef;
    color: #FFF;
  }

  #new_message_input {
    position: fixed;
    bottom: 11px;
    left: 11px;
    width: calc(100% - 352px);
    z-index: 1002; /* Ensure it's above other content but below modal */
    background: #FFF; /* Assuming you want a white background, modify if needed */
    padding: 0.25rem; /* Retain some padding from the original style */
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.1); /* A subtle shadow for depth */
    margin-left: 320px;
    border-radius: 25px;
    border:2px solid #CCC;
  }

  #inpaintingPreviewImage {
    height:30px;
    border-radius: 5px;
    margin-right: 10px;
    border: 2px solid #7e62ee;
  }

  #freezePreviewImage {
    height:30px;
    border-radius: 5px;
    margin-right: 10px;
    border: 2px solid #52c8ff;
  }

  #uploadImagePreview {
    height:30px;
    border-radius: 5px;
    margin-right: 10px;
    border: 2px solid #f5a133;
  }

  #uploadImagePreview canvas {
    /* Ensure the canvas fits within the bounding box */
    max-width: 100%;
    max-height: 100%;
  }

  #uploadImageContainer {
    display: flex;
    align-items: center;
  }

  #message_window footer #uploadImageButton {
    background: none;
    color: #7e62ee;
    font-size: 1em;
  }

  #message_window footer #uploadImageButton:disabled {
    color: #bbb;
    cursor: not-allowed;
  }

  /* chat input bar on mobile */
  @media screen and (max-width: 768px) {
    /* buttons floating in mobile all from right position absolute */
    #new_message_input {
      border-radius: 19px;
      bottom: 7px;
    }
    /* absolute */
    #message_window footer form > button,
    #message_window footer form > select.button {
      position: absolute;
      right: 5px;
      bottom: 5px;
      height: 26px;
    }
    /* ... but not for upload button#uploadImageButton */
    #message_window footer #uploadImageButton,
    #message_window footer #guidanceSelectHandler button {
      position: relative;
      right: auto;
      bottom:auto;  
      margin-bottom: 26px;
    }
    #message_window footer #guidanceLevelSelector {
      right: auto;
      left: 45px;
    }
    #message_window footer button#chat_lock,
    #message_window footer button#chat_unlock {
      right: auto;
      left: 5px;
    }
    #message_window footer textarea {
      margin-bottom: 26px;
      font-size: 1.1rem;
    }
    #freezePreviewContainer,
    #inpaintingPreviewContainer {
      margin-bottom: 26px;
    }
    body {
      padding-bottom: 163px;
    }
    #message_window footer #scrollDownButton {
      width: 26px;
      height: 26px;
      box-shadow: none;
    }
  }

  /** EDIT PROMPT */
  #message_window .edit-prompt-button,
  #message_window .edit-style-button {
    background-color: #a795ef;
    color: white;
    border: none;
    border-radius: 50px;
    margin-right: 3px;
    padding: 2px 7px;
    display: block;
    font-size: 15px;
    height: 28px;
    width: 28px;
    cursor: pointer;
    position: relative;
    margin-top: -26px;
    margin-left: calc(100% + 14px);
  }


  /* helper for scroll down obove the newmessage input centered round circle in the purple like color */
  #scrollDownButton {
    position: absolute;
    margin-top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #a795ef;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1003; /* Ensure it's above the input */
    /* some chaddow like the input bar */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5);
  }

  /* TODO: remove soon
  WRONG FOR RELATIVE check the width of sidebar and add it to the scrolldownbutton left side so it stays in the middle 
  @media screen and (min-width: 768px) {
    #scrollDownButton {
      left: calc(50% + 155px);
    }
  } */
  
  /* typing indicator CSS based on code by Joseph Fusco -> https://codepen.io/fusco/pen/XbpaYv */
  .typing-indicator {
    display: table;
    margin: 0 auto;
    position: relative;
  }
  .typing-indicator span {
    height: 5px;
    width: 5px;
    float: left;
    margin: 0 1px;
    background-color: #333;
    display: block;
    border-radius: 50%;
    opacity: 0.4;
  }
  .typing-indicator span:nth-of-type(1) {
    animation: 1s blink infinite 0.3333s;
  }
  .typing-indicator span:nth-of-type(2) {
    animation: 1s blink infinite 0.6666s;
  }
  .typing-indicator span:nth-of-type(3) {
    animation: 1s blink infinite 0.9999s;
  }
  
  @keyframes blink {
    50% {
      opacity: 1;
    }
  }
  /* special styles for homepage */
  #home {
    position: relative;
    max-width: 650px;
    margin: auto;
  }
  #home:after {
    content: "";
    display: table;
    clear: both;
  }
  
  #homepage_bot {
    width: 400px;
    height: 450px;
    float: left;
    border: 5px solid #333;
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
  }
  #homepage_bot iframe {
    border: 0;
    height: 100%;
    width: 100%;
  }
  
  #welcome {
    margin-left: 440px;
  }
  
  @keyframes blink {
    0% { opacity: .2; }
    50% { opacity: 1; }
    100% { opacity: .2; }
  }
  
  .typing-indicator {
    display: inline-block;
    vertical-align: middle;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #333;
    animation: blink 1s infinite;
  }
  
  .typing-indicator + .typing-indicator {
    margin-left: 5px;
  }
  
  .typing-indicator:nth-child(2) {
    animation-delay: 0.2s;
  }
  
  .typing-indicator:nth-child(3) {
    animation-delay: 0.4s;
  }
  
  /* Modal Background Overlay */
#modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none; /* Hide by default */
  z-index: 10000; /* To ensure it appears on top of other elements */
}

/* Account Creation Modal Styles */
#createAccountModal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #FFF;
  padding: 20px;
  border-radius: 8px;
  width: 300px; /* Width of the modal */
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
  z-index: 1001; /* Higher than the overlay to ensure it's on top */
}

#createAccountModal h3 {
  margin-top: 0;
  color: #333;
  font-size: 24px;
}

#createAccountModal label {
  display: block;
  margin-bottom: 5px;
  color: #555;
}

#createAccountModal input[type="text"], #createAccountModal input[type="email"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #CCC;
  border-radius: 4px;
  font-size: 16px;
}

#createAccountModal input[type="checkbox"] {
  margin-right: 5px;
}

#createAccountModal button[type="submit"] {
  background-color: #a795ef;
  color: #FFF;
  padding: 10px 15px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
}

#createAccountModal button[type="submit"]:hover {
  background-color: #8e6edf;
}

.modal, .image-modal {
  display: none; 
  position: fixed; 
  z-index: 1001; 
  left: 50%; 
  top: 50%; 
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
  width: auto;
  height:85vh;
}

/* make sure inner content is scroable */
.modal {
  overflow-y: auto;
}
#imageModal {
  text-align: center;
}

#imageModal .modal-content,
.modal .modal-content {
  display: block;
  margin: auto;
  max-width: 100%;
  max-height: calc(80vh - 150px);
}

.close-image-modal,
.modal .close-modal  {
  position: absolute;
  top: -6px;
  right: 5px;
  color: #333;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

#imageGridContainer {
  position: relative;
  display: inline-block; /* Ermöglicht das Umschließen des Bildes */
}

#gridOverlay {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

#gridOverlay div {
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0); /* Transparent zu Beginn */
  pointer-events: auto; /* Ermöglicht das Klicken auf die Zellen */
}


.modalHelp {
  margin-top: 10px;
}



.modalActions {
  padding: 10px;
  text-align: center; /* Centers the buttons within the modal */
  margin-top: 10px; /* Adds space above the action bar */
}

.modalActions .actionButton {
  background-color: #a795ef; /* Purple, consistent with your theme */
  color: white;
  border: none;
  border-radius: 25px;
  padding: 8px 16px; /* Adequate padding for button text */
  margin: 5px; /* Space between buttons */
  cursor: pointer; /* Cursor indicates an actionable button */
  font-size: 0.9em; /* Legible font size */
  transition: background-color 0.3s; /* Smooth transition for hover effect */
}

.modalActions .actionButton:hover {
  background-color: #8e6edf; /* A lighter purple on hover */
}

.modalActions .actionButton:disabled {
  background-color: #ccc; /* Grey out when disabled */
  cursor: default; /* Default cursor on disabled state */
}


/* CSS for the burger menu button */
.burger-menu-button {
  display: none; /* Hide the button by default on larger screens */
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); /* A subtle shadow for depth */
  border: 2px solid #CCC;
}

.sidepanel-opened .burger-menu-button {
  background-color: #a795ef;
  color:white;
  border: none;
  box-shadow: none;
}

.burger-menu-button .close {
  display: none;
}

.sidepanel-opened .burger-menu-button .open {
  display: none;
}

.sidepanel-opened .burger-menu-button .close {
  display: block;
}

.sidepanel-wrapper {
  width:100vw;
  height: 100vh;
  position: fixed;
  top:0;
  left:0;
  z-index: 9997;
  background-color: #110f19f1;
  display: none;
}

.sidepanel-opened .sidepanel-wrapper {
  display: block;
}

/* Media query to show/hide sidepanel and burger menu button */
@media screen and (max-width: 768px) {
  
  #sidepanel {
    position: fixed;
    display:none;
    top: 0;
    left: 0;
    height: 100%; /* Full height of the viewport */
    z-index: 9998; /* Ensure it's above other content including the floating input footer */
    overflow-y: auto; /* Allow for vertical scrolling if the content exceeds the screen height */
  }

  /* Making sure the chat list wrapper takes up the remaining space in the sidepanel and is scrollable */
  .chat-list-wrapper {
    overflow-y: auto;
    max-height: calc(100% - 2 * 50px); /* Assuming each of your sidepanel-header and sidepanel-footer has a height of 40px, adjust if needed */
  }

  .sidepanel-header {
    padding-left: 60px;
  }

  .wrapper,
  #message_window,
  #message_list_window {
    margin-left: 0; /* Remove the margin on smaller screens */
    display: block; /* Reset flex display */
    position: static; /* Reset position */
    width: 100%; /* Ensure it occupies full width */
  }

  /* Show the burger menu button */
  .burger-menu-button {
    display: block;
    position: fixed;
    top: 6px;
    left: 9px;
    z-index: 9999; /* Ensure the button is above other content */
    background-color: #ffffff;
    text-align: center;
    padding-top:-4px;
    border-radius: 50%;
    height: 40px;
    width: 40px;
  }

  /* When the button is clicked, show the sidepanel */
  .burger-menu-button.active + .sidepanel {
    display: block;
  }

  #new_message_input {
    margin-left: 0px;
    width: calc( 100% - 22px );
  }

  .image-modal,
  .modal {
    width: 90vw;
    height:auto;
    max-height: 95vh;
  }

}

/* TIER BADGES */

.user-tier-badge {
  display: block;
  float: right;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.5em;
  font-weight: bold;
  text-transform: uppercase;
  background: #a795ef;
  color: white;
  display:none;
  cursor: pointer;
}

.user-tier-1 {
  background: #a795ef;
  border: 1px solid white;
}

/* gold gradient with black color */
.user-tier-2 {
  background: #f7b500;
  color: #231f14;
  border: 1px solid rgb(56, 39, 21);
}

/* platin gradient with deep purple text color */
.user-tier-3 {
  background: #1d1d1e;
  color: #cac0f3;
  border: 1px solid rgb(63, 53, 71);
}


/* ADS */
.ads-mediumrect {
  border:1px solid #eee;
  padding:3px;
  margin:3px 3px 0 3px ;
  border-radius: 0;
  text-decoration: none;
}
.advertnotice {
  color:#bbb;
  font-size:9px;
  text-decoration: none;
  margin:0 3px 3px 3px ;
}
.amazon-ad {
  display: block;
  margin: 0 auto;
  text-align: left;
}
.amazon-ad .product {
  clear: none !important;
  float: left;
  width: 45%;
  border: 1px solid #aaa;
  border-radius: 5px;
  padding: 10px;
  display: block;
}
.amazon-ad p {
  clear: both;
}
img.amazon-product-example,
.amazon-ad img {
  float: right;
  margin: 0 0 10px 10px;
  width: 20vw;
  max-width: 100px;
  border: 5px solid white;
  border-radius: 5px;
  background-color: white;

  /* Ensure width and height do not exceed 160 pixels */
  max-width: 160px;  /* Ensuring width does not exceed 160px */
  max-height: 160px; /* Ensuring height does not exceed 160px */
}

img.amazon-product-example,
.amazon-ad img {
  object-fit: contain; /* Ensure aspect ratio is preserved and fits within the bounding box */
}

/**
 * Img mobile styles 40vw no float and margin auto to center
 */
@media screen and (max-width: 768px) {
  img.amazon-product-example,
  .amazon-ad img {
    float: none;
    margin: 0 auto 10px auto;
    width: 40vw;
    display: block;
  }
  .amazon-ad .product {
    float: none;
    width: 100%;
  }
}

.amazon-ad {
  /* wrap lines in text as break*/
  white-space: pre-wrap;
}

/* black bold text links not class a.image-link */
.amazon-ad a:not(.image-link) {
  font-weight: bold;
  text-decoration: none;
}

/* after links in amazon ads add a little amazon icon from font awesome in amazon color */
.amazon-ad a:not(.image-link):after {
  content: "\f270";
  font-family: FontAwesome;
  margin-left: 5px;
  color: #ff9900;
}

/* after .amazon-ad add a small grey notice AMAZON ADVERTISING WILL BE REMOVED FOR PAYED PLANS */
.amazon-ad:after {
  content: "AMAZON ADVERTISING ONLY ON FREE PLANS";
  font-size: 10px;
  color: #bbb;
  text-align: right;
  display: block;
  margin: 3px 3px 0 3px;
}

/* body.paying-customer remove all ads in messages and chat list side bar */
body.paying-customer .amazon-ad,
body.paying-customer .chat-item-ad {
  display: none;
}

/** FLEX HIDE */
.flex-hide {
  display: none!important;
}