.scot-chat[v-cloak] {
  display: none !important;
}

.scot-chat {
  box-sizing: border-box;
  z-index: 10;
  bottom: 20px;
  font-size: 14px;
  line-height: 1.2;
}
.scot-chat.scot-chat-no-ai .message-actions,
.scot-chat.scot-chat-no-ai .thread-status {
  display: none !important;
}
.scot-chat *, .scot-chat *::before, .scot-chat *::after {
  box-sizing: border-box;
}
.scot-chat.positionFixed {
  position: fixed;
}
.scot-chat.positionFixed .scot-chat__messages {
  position: absolute;
}
.scot-chat.positionFixed.position-right {
  right: 20px;
}
.scot-chat.positionFixed.position-right .scot-chat__messages {
  right: 0;
}
.scot-chat.positionFixed.position-left {
  left: 20px;
}
.scot-chat.positionFixed.position-left .scot-chat__messages {
  left: 0;
}
.scot-chat.positionFixed.position-left .scot-chat__messages:before {
  left: 12px;
}
.scot-chat.positionInitial .scot-chat__messages::before {
  display: none !important;
}
.scot-chat.positionInitial .scot-chat__messages__messages {
  height: 300px;
}
.scot-chat img {
  max-width: 100%;
  height: auto;
}
.scot-chat__trigger {
  cursor: pointer;
  position: relative;
}
.scot-chat__trigger .message-counter {
  position: absolute;
  top: 0;
  right: 0;
}
.scot-chat__trigger-label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  padding: 8px 11px;
  border-radius: 999px;
  background: #ffffff;
  color: #11151c;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  opacity: 0;
  animation: karuzoChatHint 6s ease-in-out infinite;
  pointer-events: none;
}
.scot-chat__trigger.is-open .scot-chat__trigger-label {
  display: none;
}
.scot-chat .message-counter {
  width: 20px;
  height: 20px;
  display: inline-block;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  background: red;
  color: #fff;
  text-align: center;
  line-height: 20px;
  vertical-align: middle;
}
.scot-chat__messages {
  bottom: calc(100% + 15px);
  width: var(--scot-widget-width, 300px);
  max-width: calc(100vw - 40px);
  background: var(--scot-message-bg, #f1f6fb);
  color: var(--scot-message-color);
  border-radius: 6px;
  padding: 10px;
  filter: drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.2));
  opacity: 0;
  visibility: hidden;
  z-index: -1;
}
.scot-chat__messages a {
  color: var(--scot-message-color);
}
.scot-chat__messages.open {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
.scot-chat__messages:before {
  content: "";
  position: absolute;
  display: block;
  width: 0;
  height: 0;
  border-top: 10px solid var(--scot-message-bg, #f1f6fb);
  border-left: 12px solid transparent;
  top: 100%;
  right: 12px;
}
.scot-chat__messages__header {
  padding: 8px 30px 8px 10px;
  background: var(--scot-header-bg, #fff);
  width: 100%;
  border-radius: 6px;
  box-shadow: 1px 0 5px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
}
.scot-chat__messages__header .user-name {
  max-width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  color: var(--scot-header-color);
}
.scot-chat__messages__header .user-name .name {
  margin-bottom: 4px;
}
.scot-chat__messages__header .user-name .thread-status {
  opacity: 0.8;
  font-size: 11px;
}
.scot-chat__messages__header .user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  -o-object-fit: cover;
  object-fit: cover;
  margin-right: 8px;
}
.scot-chat__messages__header .message-counter {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}
.scot-chat__messages__messages {
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0;
  min-height: 200px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scot-chat__messages__messages .scroll-down-icon {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
  bottom: 60px;
  right: 10px;
  background: var(--scot-support-message-bg, #fff);
  z-index: 2;
}
.scot-chat__messages__messages .scroll-down-icon:before, .scot-chat__messages__messages .scroll-down-icon:after {
  content: "";
  position: absolute;
  display: block;
  width: 12px;
  height: 1px;
  background: #8b8b8b;
  transform: rotate(45deg);
  top: 16px;
  left: 6px;
}
.scot-chat__messages__messages .scroll-down-icon:after {
  transform: rotate(-45deg);
  top: 16px;
  left: 14px;
}
.scot-chat__messages__messages .scroll-down-icon .message-counter {
  top: -5px;
  right: -5px;
  position: absolute;
  width: 16px;
  height: 16px;
  line-height: 16px;
}
.scot-chat__messages__messages::-webkit-scrollbar {
  display: none;
}
.scot-chat__messages__messages p {
  margin: 0;
  color: #fff;
  text-transform: lowercase;
}
.scot-chat__messages__messages .single-message {
  position: relative;
  background: var(--scot-customer-message-bg, #fff);
  border-radius: 10px;
  padding: 5px 10px 5px 10px;
  min-width: 30%;
  max-width: 80%;
  align-self: flex-end;
}
.scot-chat__messages__messages .single-message.admin-message {
  align-self: flex-start;
}

.scot-chat__messages__messages .single-message.agent, .scot-chat__messages__messages .single-message.bot {
  align-self: flex-start;
  background: var(--scot-support-message-bg, #fff);
}
.scot-chat__messages__messages .single-message.admin-message {
  background: var(--scot-support-message-bg, #fff);
}
.scot-chat__messages__messages .single-message.system {
  align-self: center;
  background: #000;
  color: #fff;
  font-size: 11px;
}
.scot-chat__messages__messages .single-message.system > *:not(.message) {
  display: none !important;
}
.scot-chat__messages__messages .single-message.system .message {
  margin-bottom: 0;
}
.scot-chat__messages__messages .single-message .message-actions > * {
  display: none;
}
.scot-chat__messages__messages .single-message.bot:last-of-type .message-actions > *, .scot-chat__messages__messages .single-message.agent:last-of-type .message-actions > * {
  display: inline-block;
  margin: 8px 0;
  padding: 6px 12px;
  background: #6f42c1;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.scot-chat__messages__messages .single-message .message-sender {
  margin: 0 0 5px 0;
  font-weight: 500;
  color: #ffffff;
}
.scot-chat__messages__messages .single-message .message-sender.agent {
  color: #28A745;
}
.scot-chat__messages__messages .single-message .message-sender.bot {
  color: #6F42C1;
}
.scot-chat__messages__messages .single-message .message-sender.system {
  color: #6C757D;
}
.scot-chat__messages__messages .single-message .message {
  margin-bottom: 2px;
  overflow-wrap: break-word;
  text-transform: initial;
}
.scot-chat__messages__messages .single-message .message img {
  cursor: pointer;
}
.scot-chat__messages__messages .single-message.skeleton {
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  background-size: 200% 100%;
  animation: 1.5s shine linear infinite;
  width: 80%;
  min-height: 60px;
}
.scot-chat__messages__messages .single-message .message-date {
  font-size: 10px;
  opacity: 0.7;
  text-align: right;
  margin-left: auto;
}
.scot-chat__messages__messages .single-message .message-date img {
  width: 12px;
  opacity: 0.7;
  animation: rotate 1s infinite;
  vert-align: top;
}
.scot-chat__messages__input {
  max-height: 40%;
  position: relative;
}
.scot-chat__messages__input .working-hours {
  margin: 0 -10px;
  padding: 10px;
  font-size: 10px;
  opacity: 0.5;
  line-height: 1.3;
  border-top: 1px solid var(--scot-message-color);
}
.scot-chat__messages__input .working-hours p {
  margin: 0;
}
.scot-chat__messages__input textarea {
  width: 100%;
  padding: 50px;
  border-radius: 0;
  border: none;
  box-shadow: none;
  outline: none;
  background: var(--scot-input-field-bg, #fff);
  color: var(--scot-input-field-color, #1e1e1e);
  margin: 0;
}
.scot-chat__messages__input .textarea-wrapper {
  display: grid;
  overflow-y: auto;
  max-height: 200px;
  border-radius: 6px;
  box-shadow: 1px 0 5px rgba(0, 0, 0, 0.1);
}
.scot-chat__messages__input .textarea-wrapper:after {
  content: attr(data-replicated-value) " ";
  white-space: pre-wrap;
  visibility: hidden;
}
.scot-chat__messages__input .textarea-wrapper textarea {
  resize: none;
  overflow: hidden;
  margin: 0;
}
.scot-chat__messages__input .textarea-wrapper textarea, .scot-chat__messages__input .textarea-wrapper:after {
  padding: 10px 35px 10px 15px;
  font: inherit;
  grid-area: 1/1/2/2;
  width: 100%;
  overflow: hidden;
}
.scot-chat__messages__input .file-picker {
  position: absolute;
  left: 10px;
  bottom: 10px;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.5);
  transition: 0.3s;
  display: flex;
}
.scot-chat__messages__input .file-picker:hover {
  color: rgba(0, 0, 0, 0.8);
}
.scot-chat__messages__input .file-picker svg {
  width: 16px;
}
.scot-chat__messages__input .file-picker input[type=file] {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  opacity: 0;
  width: 16px;
  height: 18px;
}
.scot-chat__messages__input .send-button {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 2;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.5);
  transition: 0.3s;
  display: flex;
}
.scot-chat__messages__input .send-button:hover {
  color: rgba(0, 0, 0, 0.8);
}
.scot-chat__messages__input .send-button svg {
  width: 22px;
}
.scot-chat__messages__file_popup {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: 50;
}
.scot-chat .popup-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11111;
}
.scot-chat .popup-image img {
  max-width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
}
.scot-chat .popup-image .popup-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background: rgba(0, 0, 0, 0.5);
}
.scot-chat .popup-image .close-popup {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  cursor: pointer;
  width: 30px;
  height: 30px;
}
.scot-chat .popup-image .close-popup div {
  width: 20px;
  height: 2px;
  transform: rotate(45deg);
  background: #fff;
  position: absolute;
  top: 15px;
  left: 5px;
}
.scot-chat .popup-image .close-popup div:last-child {
  transform: rotate(-45deg);
}

body.admin-bar .scot-chat .popup-image .close-popup {
  top: 40px;
}

@keyframes rotate {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes shine {
  to {
    background-position-x: -200%;
  }
}



/* ================================
   KARUZO ONLINE CHAT STYLE
   ================================ */

.scot-chat {
  --scot-widget-width: 330px;

  --scot-message-bg: #05080d;
  --scot-message-color: #ffffff;

  --scot-header-bg: #ff1f0c;
  --scot-header-color: #ffffff;

  --scot-customer-message-bg: #ff1f0c;
  --scot-support-message-bg: #171d25;

  --scot-input-field-bg: #ffffff;
  --scot-input-field-color: #11151c;

  z-index: 99999 !important;
  bottom: 24px !important;
  font-family: inherit;
}

/* Position */
.scot-chat.positionFixed.position-right {
  right: 24px !important;
}

.scot-chat.positionFixed.position-left {
  left: 24px !important;
}

/* ================================
   CHAT WINDOW
   ================================ */

.scot-chat__messages {
  width: var(--scot-widget-width, 330px);
  max-width: calc(100vw - 32px);
  padding: 10px;
  border-radius: 18px;
  background:
          radial-gradient(circle at 90% 0%, rgba(255, 31, 12, 0.18), transparent 36%),
          linear-gradient(180deg, #090d14 0%, #05080d 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
          0 20px 60px rgba(0, 0, 0, 0.55),
          0 0 0 1px rgba(255, 31, 12, 0.08),
          0 0 35px rgba(255, 31, 12, 0.12);
  filter: none;
  overflow: visible;
  transform: translateY(10px) scale(0.98);
  transition:
          opacity 0.25s ease,
          visibility 0.25s ease,
          transform 0.25s ease;
}

.scot-chat__messages.open {
  transform: translateY(0) scale(1);
}

.scot-chat__messages:before {
  border-top-color: #05080d;
  right: 18px;
}

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

.scot-chat__messages__header {
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 13px;
  background:
          linear-gradient(135deg, #ff2a14 0%, #ff1a08 48%, #c91207 100%);
  box-shadow:
          0 10px 25px rgba(255, 31, 12, 0.25),
          inset 0 1px 0 rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.scot-chat__messages__header .user-avatar {
  width: 34px;
  height: 34px;
  margin-right: 9px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.scot-chat__messages__header .user-name {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: #ffffff;
}

.scot-chat__messages__header .user-name .thread-status {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  opacity: 0.85;
  text-transform: none;
}

.scot-chat__messages__header .user-name:after {
  content: "Online";
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  vertical-align: middle;
}

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

.scot-chat__messages__messages {
  min-height: 230px;
  max-height: 52vh;
  padding: 13px 4px 12px;
  gap: 11px;
}

.scot-chat__messages__messages p {
  color: inherit;
  text-transform: none;
}

/* Common bubble */
.scot-chat__messages__messages .single-message {
  position: relative;
  max-width: 78%;
  padding: 9px 12px 8px;
  border-radius: 15px;
  line-height: 1.25;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

/* Customer / user message */
.scot-chat__messages__messages .single-message:not(.agent):not(.bot):not(.admin-message):not(.system) {
  background:
          linear-gradient(135deg, #ff2a14 0%, #ff1f0c 45%, #d91708 100%);
  color: #ffffff;
  border-bottom-right-radius: 6px;
  box-shadow:
          0 10px 25px rgba(255, 31, 12, 0.23),
          inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

/* Support / bot message */
.scot-chat__messages__messages .single-message.agent,
.scot-chat__messages__messages .single-message.bot,
.scot-chat__messages__messages .single-message.admin-message {
  background:
          linear-gradient(180deg, #1b222c 0%, #151b23 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom-left-radius: 6px;
}

/* Bubble small tails */
.scot-chat__messages__messages .single-message:not(.agent):not(.bot):not(.admin-message):not(.system)::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 0;
  width: 12px;
  height: 12px;
  background: #d91708;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.scot-chat__messages__messages .single-message.agent::after,
.scot-chat__messages__messages .single-message.bot::after,
.scot-chat__messages__messages .single-message.admin-message::after {
  content: "";
  position: absolute;
  left: -5px;
  bottom: 0;
  width: 12px;
  height: 12px;
  background: #151b23;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* Sender name */
.scot-chat__messages__messages .single-message .message-sender {
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.scot-chat__messages__messages .single-message .message-sender.agent,
.scot-chat__messages__messages .single-message .message-sender.bot {
  color: #ff3b2a;
}

.scot-chat__messages__messages .single-message .message-sender:not(.agent):not(.bot) {
  color: #ffffff;
}

/* Message text */
.scot-chat__messages__messages .single-message .message {
  margin-bottom: 3px;
  color: inherit;
  overflow-wrap: anywhere;
}

/* Date */
.scot-chat__messages__messages .single-message .message-date {
  margin-top: 3px;
  font-size: 9px;
  font-weight: 700;
  opacity: 0.72;
  color: rgba(255, 255, 255, 0.82);
}

/* System messages */
.scot-chat__messages__messages .single-message.system {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  font-size: 11px;
  box-shadow: none;
}

/* ================================
   INPUT
   ================================ */

.scot-chat__messages__input {
  margin-top: 2px;
}

.scot-chat__messages__input .textarea-wrapper {
  border-radius: 13px;
  background: #ffffff;
  box-shadow:
          0 8px 24px rgba(0, 0, 0, 0.25),
          inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  overflow: hidden;
}

.scot-chat__messages__input .textarea-wrapper textarea,
.scot-chat__messages__input .textarea-wrapper:after {
  min-height: 42px;
  padding: 12px 42px 11px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.scot-chat__messages__input textarea {
  background: #ffffff;
  color: #11151c;
}

.scot-chat__messages__input textarea::placeholder {
  color: rgba(17, 21, 28, 0.45);
}

.scot-chat__messages__input .send-button {
  right: 12px;
  bottom: 10px;
  color: #ff1f0c;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}

.scot-chat__messages__input .send-button:hover {
  color: #d91708;
  opacity: 1;
  transform: translateX(2px) scale(1.08);
}

.scot-chat__messages__input .send-button svg {
  width: 23px;
}

/* ================================
   OPEN CHAT BUTTON / TRIGGER
   ================================ */

.scot-chat__trigger {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
          radial-gradient(circle at 35% 25%, #ff6a54 0%, #ff1f0c 35%, #bc0f06 100%);
  box-shadow:
          0 12px 35px rgba(255, 31, 12, 0.38),
          0 8px 28px rgba(0, 0, 0, 0.38),
          inset 0 2px 0 rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.18);
  animation: karuzoChatBounce 3.2s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.scot-chat__trigger:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow:
          0 16px 42px rgba(255, 31, 12, 0.5),
          0 8px 28px rgba(0, 0, 0, 0.45),
          inset 0 2px 0 rgba(255, 255, 255, 0.28);
}

.scot-chat__trigger:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

.scot-chat__trigger img,
.scot-chat__trigger svg {
  width: 34px;
  height: 34px;
  object-fit: contain;
  position: relative;
  z-index: 2;
}

/* Pulse ring */
.scot-chat__trigger::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 31, 12, 0.45);
  animation: karuzoChatPulse 2.2s ease-out infinite;
  pointer-events: none;
}

/* Small attention label */
.scot-chat__trigger-label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  padding: 8px 11px;
  border-radius: 999px;
  background: #ffffff;
  color: #11151c;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  opacity: 0;
  animation: karuzoChatHint 6s ease-in-out infinite;
  pointer-events: none;
}

.scot-chat.position-left .scot-chat__trigger-label {
  right: auto;
  left: calc(100% + 12px);
}

/* Disable attention animation when chat is open */
.scot-chat__trigger.is-open {
  animation: none;
}

.scot-chat__trigger.is-open::before,
.scot-chat__trigger.is-open .scot-chat__trigger-label {
  display: none;
}

/* Counter */
.scot-chat .message-counter {
  background: #ffffff;
  color: #ff1f0c;
  font-weight: 900;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

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

@keyframes karuzoChatBounce {
  0%, 72%, 100% {
    transform: scale(1);
  }

  78% {
    transform: scale(1.12);
  }

  84% {
    transform: scale(0.96);
  }

  90% {
    transform: scale(1.07);
  }

  96% {
    transform: scale(1);
  }
}

@keyframes karuzoChatPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.75;
  }

  70% {
    transform: scale(1.28);
    opacity: 0;
  }

  100% {
    transform: scale(1.28);
    opacity: 0;
  }
}

@keyframes karuzoChatHint {
  0%, 58%, 100% {
    opacity: 0;
    transform: translateY(-50%) translateX(8px);
  }

  8%, 46% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* ================================
   MOBILE
   ================================ */

@media (max-width: 480px) {
  .scot-chat {
    bottom: 16px !important;
  }

  .scot-chat.positionFixed.position-right {
    right: 16px !important;
  }

  .scot-chat.positionFixed.position-left {
    left: 16px !important;
  }

  .scot-chat__messages {
    width: calc(100vw - 32px);
  }

  .scot-chat__trigger {
    width: 60px;
    height: 60px;
  }

  .scot-chat__trigger-label {
    display: none;
  }
}
