:root {
    --antimanual_primary_color: #0066cc;
    --antimanual_chat_bg_color: #f1f1f1;
    --antimanual_white_color: #ffffff;
    --antimanual_dark_text: #212529;
    --antimanual_muted_text: #6c757d;
    --antimanual_separator_color: #dee2e6;
    --antimanual_light_color: #f8f9fa;
    --antimanual_input_border: #86B7FE;
    --antimanual_input_outline: #C2DBFE;
    --black_25: #f9f9f9;
    --black_50: #f2f2f2;
    --black_75: #eeeeee;
    --black_100: #d6d9dc;
    --black_150: #c8ccd0;
    --black_200: #bbc0c4;
    --black_300: #9fa6ad;
    --black_350: #9199a1;
    --black_400: #848d95;
    --black_500: #6a737c;
    --black_600: #535a60;
    --black_700: #3c4146;
    --black_750: #2f3337;
    --black_800: #242729;
    --black_900: #0c0d0e;
    --bs-white: #ffffff;
    --bs_sm: 0 1px 2px rgb(0 0 0 / 5%), 0 1px 4px rgb(0 0 0 / 5%), 0 2px 8px rgb(0 0 0 / 5%);
    --bs_md: 0 1px 3px rgb(0 0 0 / 6%), 0 2px 6px rgb(0 0 0 / 6%), 0 3px 8px rgb(0 0 0 / 9%);
    --bs_lg: 0 1px 4px rgb(0 0 0 / 9%), 0 3px 8px rgb(0 0 0 / 9%), 0 4px 13px rgb(0 0 0 / 13%);
}

.bs-sm {
    box-shadow: var(--bs_sm) !important;
}

.bs-md {
    box-shadow: var(--bs_md) !important;
}

.bs-lg {
    box-shadow: var(--bs_lg) !important;
}

/** Hover Classes **/
.h\:bs-md:hover {
    box-shadow: var(--bs_md) !important;
}

.h\:bs-lg:hover {
    box-shadow: var(--bs_md) !important;
}

body.body_dark, body.dark, body.is-dark, body.dark-mode {
    --bs-white: #1d2027;
    --black_900: #f1f1f1;
    --black_800: #e9e9e9;
    --black_700: #e1e1e1;
    --black_600: #bebebe;
    --black_500: #b9b9b9;
    --black_400: #a2a2a2;
    --black_200: #757474;
    --black_150: rgba(255, 255, 255, 0.3);
    --black_75: #535353;
    --black_50: #3b3b3b;
    --black_25: #2e2d2d;
}

.atml-msg-html {
    h2 {
        font-size: 1.25em;
        margin: 0.8em 0 0.5em;
        font-weight: 600;
        border-bottom: 2px solid var(--black_75);
        padding-bottom: 0.5em;
    }

    h3 {
        font-size: 1.125em;
        margin: 0.6em 0 0.4em;
        font-weight: 500;
        color: var(--black_700);
    }

    p {
        margin: 0.8em 0;
    }

    pre {
        background: var(--black_50);
        padding: 0.8em 1em;
        border-radius: 6px;
        font-family: "Fira Code", monospace;
        font-size: 0.9em;
        overflow-x: auto;
    }

    strong {
        font-weight: 600;
        color: var(--black_900);
    }

    em {
        font-style: italic;
        color: var(--black_600);
    }

    a {
        color: var(--antimanual_primary_color);
        text-decoration: none;
        transition: color 0.2s ease, border-color 0.2s ease;
        text-underline-offset: 4px;

        &:hover {
            color: var(--antimanual_primary_color);
            text-decoration: underline;
        }
    }

    img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        margin: 0.8em 0;
        display: block;
    }

    ul, ol {
        margin: 0 0 1em 2em;
        padding: 0;
    }

    li {
        margin: 0.2em 0;
        line-height: 1.6;
        color: var(--black_800);

        ul, ol {
            margin-top: 0.2em;
        }
    }

    ul {
        list-style-type: disc;
    }

    ol {
        list-style-type: decimal;
    }
}

.components-text-control__input,
.components-input-control__backdrop,
.components-toggle-group-control {
    border: 1px solid var(--black_100) !important;
}

/* ================================================
   COLOR UTILITIES
   ================================================ */

.antimanual-bg-primary,
.antimanual-bg-primary:hover,
.antimanual-bg-primary:focus,
.antimanual-bg-primary-foreground {
  background-color: var(--antimanual_primary_color) !important;
}

.antimanual-text-primary-foreground {
  color: var(--antimanual_white_color);
}

/* ================================================
   RESET & BASE STYLES
   ================================================ */

img.antimanual_icons {
  width: 16px;
}

/* ================================================
   EAZYDOCS INTEGRATION
   ================================================ */

.assistant-content[tab-content="antimanual_merge_eazydocs"] {
  #antimanual-chatbox {
    display: block !important;
    position: unset;
    margin: 0;
    height: 100%;
    width: 100%;
  }

  &.active {
    margin: -100px -11px 0 -15px;

    #antimanual-chatbox-inner-wrapper {
      height: 93%;
      position: absolute;
      bottom: 0;
      top: 40px;
    }

    #antimanual-chatbox-header {
      background-color: var(--ezd_brand_color);
      padding: 20px 15px 15px;

      &.atml-empty {
        padding: 8px;

        #atml-chat-reset {
          position: absolute;
          right: 15px;
          top: 0;
          transform: translateY(-100%);
        }
      }
    }
  }

  #antimanual-chatbox-header-text {
    text-align: left;
  }
}

/* ================================================
   CHATBOX CONTAINER
   ================================================ */

#antimanual-chatbox {
  width: min(400px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 108px));
  margin: 16px 16px 92px 16px;
  position: fixed;
  right: 0;
  bottom: 0;
  background-color: var(--antimanual_white_color);
  border-radius: var(--antimanual_border_radius, 8px);
  box-shadow:
    rgba(0, 0, 0, 0.05) 0 0 0 1px,
    rgba(0, 0, 0, 0.15) 0 5px 30px 0,
    rgba(0, 0, 0, 0.05) 0 3px 3px 0;
  overflow: hidden;
  z-index: 9999;
  display: none;
  flex-direction: column;

  &.iframe-wrapper {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
  }

  /* Focus States for Accessibility */
  button:focus-visible {
    outline: 2px solid var(--antimanual_primary_color, #2563eb);
    outline-offset: 2px;
  }
}

/* ================================================
   INNER WRAPPER
   ================================================ */

#antimanual-chatbox-inner-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background-color: var(--antimanual_chat_bg_color);
}

/* ================================================
   HEADER
   ================================================ */

#antimanual-chatbox-header {
  justify-self: start;
  background-color: var(--antimanual_primary_color);
  color: var(--antimanual_white_color);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#antimanual-chatbox-header-text {
  color: var(--antimanual_header_text_color, var(--antimanual_white_color));

  strong {
    font-size: 18px;
    font-weight: 500;
  }

  p {
    font-size: 13px;
    margin: 0;
    opacity: .8;
    line-height: 1.5;
  }
}

#atml-chat-reset {
  border: none;
  outline: none;
  background: transparent;
  color: var(--antimanual_white_color);
  padding: 0;
  cursor: pointer;

  .antimanual-icon.ea-sync {
    width: 14px;
  }

  &:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }
}

/* ================================================
   OFFLINE BANNER
   ================================================ */

.antimanual-offline-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 16px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(253, 211, 77, 0.5);

  &.show {
    display: flex;
    animation: antimanual-offline-slide-down 0.3s ease-out;
  }

  svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
    flex-shrink: 0;
  }

  span {
    line-height: 1;
  }

  /* Pulsing status dot */
  &::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d97706;
    flex-shrink: 0;
    animation: antimanual-offline-pulse 2s ease-in-out infinite;
  }
}

@keyframes antimanual-offline-slide-down {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes antimanual-offline-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ================================================
   CHAT AREA
   ================================================ */

.antimanualchatbox {
  flex-grow: 1;
  padding: 10px;
  overflow-y: auto;

  /* Smooth Scrollbar */
  &::-webkit-scrollbar {
    width: 6px;
  }

  &::-webkit-scrollbar-track {
    background: transparent;
  }

  &::-webkit-scrollbar-thumb {
    background: var(--black_200, #d1d5db);
    border-radius: 3px;

    &:hover {
      background: var(--black_300, #9ca3af);
    }
  }
}

/* ================================================
   MESSAGES
   ================================================ */

.antimanual-msg {
  display: flex;
  align-items: start;
  margin-bottom: 5px;

  .msg-content {
    padding: 8px 12px;
    border-radius: var(--antimanual_border_radius, 8px);
    margin: 0;
    font-size: var(--antimanual_font_size, 14px);
    overflow-x: auto;

    *:first-child {
      margin-top: 0;
    }

    *:last-child {
      margin-bottom: 0;
    }
  }

  /* Bot Messages */
  &.bot {
    justify-content: start;

    &:not(.placeholder) {
      animation: antimanual-slide-in-left 0.3s ease-out;
    }

    .bot-profile-icon {
      border-radius: 50%;
      margin-right: 8px;
      width: 28px;
      height: 28px;
    }

    .antimanual-response {
      min-width: 0;
      overflow: hidden;

      .msg-content {
        color: var(--black_700);
        background-color: var(--bs-white);
        max-width: unset;
        overflow-wrap: anywhere;
        word-break: break-word;
      }
    }

    &.no-avatar .bot-profile-icon {
      display: none;
    }
  }

  /* User Messages */
  &.user {
    justify-content: flex-end;

    &:not(.placeholder) {
      animation: antimanual-slide-in-right 0.3s ease-out;
    }

    .msg-content {
      color: var(--antimanual_white_color);
      background-color: var(--antimanual_user_msg_color, var(--antimanual_primary_color));
      max-width: 100%;
    }

    .antimanual-msg-timestamp {
      display: block;
      margin-top: 4px;
      text-align: right;
      opacity: 0.7;
    }
  }

  /* Placeholder Messages (hidden by default) */
  &.placeholder {
    display: none;
  }

  /* Timestamp (hover to reveal on bot messages) */
  .antimanual-msg-timestamp {
    font-size: 11px;
    color: var(--black_400, #9ca3af);
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
  }

  &:hover .antimanual-msg-timestamp {
    opacity: 1;
  }

  /* Actions (hover to reveal) */
  &:hover .antimanual-msg-actions {
    opacity: 1;
  }
}

/* User Message Wrapper */
.antimanual-msg-user-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 85%;
}

/* ================================================
   MESSAGE FOOTER (Sources, Actions, Timestamp)
   ================================================ */

.antimanual-msg-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 2px;

  .sources {
    outline: none;
    border: none;
    background: transparent;
    color: var(--black_600, #4b5563);
    padding: 4px 10px;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;

    &:hover {
      background: var(--black_100, #e5e7eb);
      color: var(--black_800, #1f2937);
    }

    .antimanual-icon.ea-arrow-down {
      width: 10px;
      transition: ease 0.3s transform;
    }

    &.expanded .antimanual-icon.ea-arrow-down {
      transform: rotate(180deg);
    }
  }
}

/* ================================================
   REFERENCES LIST
   ================================================ */

.antimanual-response .references {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-top: 5px;
  padding: 5px 10px;
  background: var(--black_50, #f9fafb);
  border-radius: 8px;
  border: 1px solid var(--black_100, #e5e7eb);
  width: 100%;

  a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    font-size: 13px;
    color: var(--black_700, #374151);
    transition: all 0.2s ease;
    width: fit-content;

    &:hover {
      color: var(--antimanual_primary_color, #2563eb);
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .antimanual-icon {
      width: 14px;
      height: 22px;
      color: var(--black_400, #9ca3af);
      flex-shrink: 0;
    }

    .text {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 240px;
    }
  }
}

/* ================================================
   MESSAGE ACTIONS (Copy, Feedback)
   ================================================ */

.antimanual-msg-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.antimanual-msg-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: var(--black_50, #f9fafb);
  border-radius: 6px;
  color: var(--black_500, #6b7280);
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    background: var(--black_100, #e5e7eb);
    color: var(--black_700, #374151);
  }

  &.active {
    background: var(--antimanual_primary_color, #2563eb);
    color: #fff;
  }

  svg,
  .antimanual-icon {
    width: 12px;
    height: 12px;
  }
}

/* Copy Tooltip */
.antimanual-copy-tooltip {
  position: absolute;
  background: var(--black_800, #1f2937);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.2s ease;

  &.show {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Feedback Buttons */
.antimanual-feedback-btns {
  display: flex;
  gap: 4px;
}

.antimanual-feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 4px;
  color: var(--black_400, #9ca3af);
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    background: var(--black_100, #e5e7eb);
  }

  &.liked {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
  }

  &.disliked {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
  }

  svg {
    width: 12px;
    height: 12px;
  }
}

/* ================================================
   FOOTER (Suggestions + Input)
   ================================================ */

#antimanual-chatbox-footer {
  justify-self: end;
}

#suggested-questions {
  padding: 8px 16px;
  border-top: 1px solid var(--antimanual_separator_color);

  > p {
    color: var(--antimanual_muted_text);
    font-size: 14px;
    margin-bottom: 8px;
  }

  > button {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 400;
    text-align: left;
    background-color: var(--black_25);
    border: none;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 6px;
    color: var(--black_700);
    cursor: pointer;
    transition: ease 0.3s box-shadow;

    &:hover {
      box-shadow: var(--bs_sm);
    }
  }
}

#antimanual-input-container {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 15px;
  border-top: 1px solid var(--black_100);
  position: relative;
}

#antimanualinput {
  width: 100%;
  padding: 8px 12px;
  font-size: 16px;
  color: var(--black_700);
  background-color: var(--black_50);
  border: 2px solid var(--black_100);
  border-radius: 4px;
  outline: none;
  transition: ease 0.3s all;

  &:focus {
    border-color: var(--antimanual_primary_color);
    background: var(--bs-white);
  }
}

#antimanualsend {
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 400;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--antimanual_primary_color, #2563eb);
  border: 1px solid var(--antimanual_primary_color, #2563eb);
  border-radius: 4px;
  color: var(--antimanual_white_color);
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    opacity: 0.9;
    transform: scale(1.02);
  }

  &:active {
    transform: scale(0.9);
    transition-duration: 300ms;
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
  }
}

/* Character Counter */
.antimanual-char-counter {
  position: absolute;
  right: 70px;
  bottom: 20px;
  font-size: 11px;
  color: var(--black_400, #9ca3af);
  pointer-events: none;
  transition: color 0.2s ease;

  &.warning {
    color: #f59e0b;
  }

  &.limit {
    color: #ef4444;
  }
}

/* ================================================
   HELP BUTTON
   ================================================ */

button#antimanual-help-button {
  position: fixed;
  right: 25px;
  bottom: 25px;
  background-color: var(--antimanual_primary_color);
  color: var(--antimanual_white_color);
  padding: 16px;
  border-radius: 200px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.175);
  z-index: 9999;
  border: 0;
  cursor: pointer;
  transition-duration: 300ms;

  div {
    height: 20px;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  #help-icon .antimanual-icon {
    width: 18px;
  }

  #close-icon {
    display: none;

    .antimanual-icon {
      width: 14px;
    }
  }

  &:hover {
    transform: scale(1.1);
  }

  &:active {
    transform: scale(1);
  }

  &.pulse {
    animation: antimanual-pulse 2s infinite;
  }
}

button#antimanual-help-button-sm {
  display: flex;
  background: #405261;
  position: fixed;
  top: -30px;
  right: 4px;
  border: none;
  outline: none;
  border-radius: 50px;
  padding: 4px 8px;
  color: #ccc;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  transition: top 0.3s ease;
  z-index: 999;
  line-height: 0;

  .antimanual_arrow_down_icon {
    width: 12px;
  }
}

/* ================================================
   TYPING INDICATOR
   ================================================ */

.antimanual-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: #fff;
  border-radius: 12px;
  width: fit-content;

  .antimanual-typing-dot {
    width: 8px;
    height: 8px;
    background: var(--antimanual_primary_color, #2563eb);
    border-radius: 50%;
    animation: antimanual-typing-bounce 1.4s infinite ease-in-out both;

    &:nth-child(1) { animation-delay: -0.32s; }
    &:nth-child(2) { animation-delay: -0.16s; }
    &:nth-child(3) { animation-delay: 0s; }
  }
}

/* Loading Dots (legacy) */
.antimanual-loading-dots {
  display: inline-block;
  margin: 0;
}

.antimanual-dot {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  width: 12px;
  height: 12px;
  background-color: gray;
  border-radius: 50%;
  opacity: 0;
  animation: antimanual-dot-blink 1s infinite ease-in-out;

  &:nth-child(1) { animation-delay: 0s; }
  &:nth-child(2) { animation-delay: 0.33s; }
  &:nth-child(3) { animation-delay: 0.66s; }
}

/* ================================================
   LEAD COLLECTION FORM
   ================================================ */

.antimanual-lead-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: #fff;
  border-radius: 8px;
  margin-top: 20px;
  border: 1px solid var(--black_100);

  .lead-prompt {
    font-size: 14px;
    color: var(--black_700);
    margin: 0;
    line-height: 1.5;
    text-align: center;
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  input {
    padding: 12px 14px;
    border: 1px solid var(--black_100);
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;

    &:focus {
      border-color: var(--antimanual_primary_color);
    }
  }

  .lead-submit-btn {
    padding: 12px 16px;
    background: var(--antimanual_primary_color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 8px;

    &:hover {
      opacity: 0.9;
    }

    &:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }
  }
}

.antimanual-chatbox-blurred {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

/* ================================================
   ERROR STATE
   ================================================ */

.antimanual-error-msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.antimanual-error-text {
  color: var(--black_600, #4b5563);
}

.antimanual-retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--black_200, #d1d5db);
  background: #fff;
  border-radius: 6px;
  color: var(--black_700, #374151);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: fit-content;

  &:hover {
    border-color: var(--antimanual_primary_color, #2563eb);
    background-color: var(--antimanual_primary_color, #2563eb);
    color: #fff;
  }

  svg {
    width: 14px;
    height: 14px;
  }
}

/* ================================================
   TOAST NOTIFICATIONS
   ================================================ */

.antimanual-toast {
  position: fixed;
  bottom: 120px;
  right: 30px;
  padding: 12px 20px;
  background: #1f2937;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;

  &.show {
    opacity: 1;
    transform: translateY(0);
  }
}

.antimanual-toast-success { background: #10b981; }
.antimanual-toast-error { background: #ef4444; }
.antimanual-toast-info { background: #3b82f6; }

/* ================================================
   ANIMATIONS
   ================================================ */

@keyframes antimanual-slide-in-left {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes antimanual-slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes antimanual-dot-blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes antimanual-typing-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

@keyframes antimanual-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* ================================================
   DESKTOP POSITION: BOTTOM LEFT
   ================================================ */

@media screen and (min-width: 769px) {
  body.antimanual-desktop-bottom-left {
    button#antimanual-help-button {
      left: 25px;
      right: auto;
    }

    #antimanual-chatbox {
      left: 16px;
      right: auto;
    }
  }
}

/* ================================================
   TABLET (max-width: 768px)
   ================================================ */

@media screen and (max-width: 768px) {
  body.antimanual-mobile-hidden {
    button#antimanual-help-button,
    button#antimanual-help-button-sm,
    #antimanual-chatbox {
      display: none !important;
    }
  }

  body.antimanual-mobile-bottom-left {
    button#antimanual-help-button {
      left: 25px;
      right: auto;
    }

    #antimanual-chatbox {
      left: 16px;
      right: auto;
    }
  }

  body.antimanual-mobile-bottom-center {
    button#antimanual-help-button {
      left: 50%;
      right: auto;
      transform: translateX(-50%);
    }

    #antimanual-chatbox {
      left: 50%;
      right: auto;
      transform: translateX(-50%);
    }
  }
}

/* ================================================
   MOBILE (max-width: 480px)
   ================================================ */

@media screen and (max-width: 480px) {
  #antimanual-chatbox {
    width: 100%;
    height: calc(100% - 30px);
    margin: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;

    #antimanual-chatbox-header {
      padding: 16px;
    }

    #antimanual-chatbox-header-text {
      strong { font-size: 16px; }
      p { font-size: 12px; }
    }

    #suggested-questions > button {
      font-size: 13px;
      padding: 10px 14px;
    }

    #antimanual-input-container {
      padding: 12px;
    }

    #antimanualinput {
      font-size: 14px;
    }
  }

  body.antimanual_chatbox_expanded {
    button#antimanual-help-button {
      display: none;
    }

    button#antimanual-help-button-sm {
      top: 4px;
    }
  }

  body.admin-bar.antimanual_chatbox_expanded button#antimanual-help-button-sm {
    top: 50px;
  }

  body.antimanual-mobile-bottom-left #antimanual-chatbox,
  body.antimanual-mobile-bottom-center #antimanual-chatbox {
    left: 0;
    transform: none;
  }

  .antimanual-msg-actions,
  .antimanual-msg-timestamp {
    opacity: 1;
  }

  .antimanual-char-counter {
    right: 60px;
    bottom: 16px;
  }

  .antimanual-toast {
    left: 16px;
    right: 16px;
    bottom: 80px;
  }
}