/* Basic fonts */
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

/* Floating chat button */
.chat-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #0a3d82, #022c61);
  color: #fff;
  font-size: 22px;
  width: 60px;
  height: 60px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1100;
  box-shadow: 0 8px 24px rgba(16, 64, 48, 0.18);
  transition: transform .12s ease, box-shadow .12s ease;
}

.chat-button-ring {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.chat-button:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 30px rgba(16, 64, 48, 0.22);
}

/* Chat window (hidden by default) */
.chat-window {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 380px;
  max-height: 620px;
  background: #f5f7fb;
  border-radius: 26px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1100;
  border: 1px solid rgba(2, 48, 100, 0.08);
  box-shadow: 0 26px 60px rgba(11, 22, 27, .18);
  transition: transform .22s ease, opacity .22s ease;
}

/* Header */
.chat-header {
  background: linear-gradient(135deg, #0b3b78, #072f60);
  color: #fff;
  padding: 16px 16px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar-wrap {
  position: relative;
}

.chat-header-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-header-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
}

.chat-header-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.chat-header-status-dot,
.support-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f8c14d;
  box-shadow: 0 0 0 3px rgba(248, 193, 77, 0.18);
}

.support-status-dot {
  position: absolute;
  right: -2px;
  bottom: -1px;
}

.chat-header-status.is-online .chat-header-status-dot,
.support-status-dot.is-online {
  background: #28c76f;
  box-shadow: 0 0 0 3px rgba(40, 199, 111, 0.18);
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header-btn {
  min-width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}

.chat-header-btn-danger {
  border-color: rgba(255, 105, 135, 0.38);
  color: #ffd5df;
}

.chat-helper-banner {
  margin: 14px 14px 0;
  background: linear-gradient(180deg, #fff8e4, #fff1bf);
  color: #7a5a00;
  border: 1px solid rgba(240, 194, 71, 0.42);
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
}

.chatSend {
      background: linear-gradient(135deg, #0a3d82, #022c61);
      color: white;
      width: 56px;
      min-width: 56px;
      height: 52px;
      border: none;
      cursor: pointer;
      border-radius: 16px;
    }

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
}

/* Message area #f2f2f4 */ 
.chat-messages {
  flex: 1;
  overflow-y: auto;
  background:
    radial-gradient(circle at top left, rgba(10, 61, 130, 0.06), transparent 28%),
    linear-gradient(180deg, #f8faff, #f2f5fb);
  padding-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-messages-inbox {
  flex: 1;
  overflow-y: auto;
  background: #F7F6FB;  
  padding-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}

/* Bubble base */
.chat-bubble {
  width: fit-content;
  max-width: 78%;
  min-width: 96px;
  padding: 14px 16px 12px;
  border-radius: 20px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  opacity: 0;
  transform: translateY(6px);
  transition: all .16s ease;
}

.chat-bubble-text {
  float: none;
}

/* Self (you) bubble */
.chat-messages > .chat-bubble.self {
  align-self: flex-end !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  background: linear-gradient(135deg, #e2fff1, #eff9f5);
  color: #153326;
  border-bottom-right-radius: 8px;
}

/* imagePreview */
.imagePreview {
   align-self: flex-end;
  background: linear-gradient(125deg, #d8e7ef, #f2f2f4);
  /* background: linear-gradient(135deg, #c7dde7d4, #f2f2f4); */
  /* background: #c4e7bcd4; */
  /* color: #F7F6FB; */
  /* border-bottom-right-radius: 6px;  */
  /* position: relative; */
  width: 150px;
  height: 150px;
  
}
.imagePreview img {
  width: 150px;
  height: 150px;
  object-fit: cover;
}
/* #A6B6ED, #7790E4, #4C6EDC, #284DC8, #1F3D9E */

/* Other bubble */
.chat-messages > .chat-bubble.other {
  align-self: flex-start !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  background: #ffffff;
  color: #162033;
  border-bottom-left-radius: 8px;
}

/* after insert, show animation */
.chat-bubble.show {
  opacity: 1;
  transform: translateY(0);
}

/* Timestamp */
.timestamp {
  display: block;
  font-size: 12px;
  opacity: .65;
  margin-top: 8px;
  text-align: right;
}

/* Input area */
.chat-input {
  background: #ffffff;
  padding: 14px !important;
  gap: 10px;
  align-items: center;
}

.chat-composer-hint {
  padding: 10px 16px 0;
  font-size: 12px;
  color: #5d6b82;
}

.chat-input input.form-control {
  height: 52px;
  border-radius: 16px;
  padding: 12px 16px;
  border: 1px solid #d8dfeb;
  box-shadow: none;
  background: #fbfcff;
}

.chat-upload-btn {
  width: 48px;
  min-width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid #d8dfeb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Typing indicator - three bouncing dots */
.typing-indicator {
  background: transparent;
  display: flex;
  align-items: center;
  padding-top: 0 !important;
}

.typing-dots {
  display: inline-flex;
  gap: 6px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: #9e9e9e;
  border-radius: 50%;
  display: inline-block;
  transform: translateY(0);
  animation: bounce 1s infinite;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.12s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes bounce {
  0% {
    transform: translateY(0);
    opacity: .6;
  }

  35% {
    transform: translateY(-6px);
    opacity: 1;
  }

  70% {
    transform: translateY(0);
    opacity: .8;
  }

  100% {
    transform: translateY(0);
    opacity: .6;
  }
}

/* Scrollbar (thin & subtle) */
.chat-messages::-webkit-scrollbar {
  width: 7px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 999px;
}

@media (max-width: 576px) {
  .chat-window {
    right: 12px;
    left: 12px;
    bottom: 80px;
    width: auto;
    max-height: 72vh;
  }
}


/* left left left side*/
/* Bubble base */
.chat-bubble-left {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 18px;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.25;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(6px);
  transition: all .16s ease;
}


 .my-button-style {
      background-color: #128C7E;
      color: white;
      padding: 10px 20px;
      border: none;
      cursor: pointer;
    }


.file-upload-container {
  font-family: sans-serif;
  margin-bottom: 20px;
}

.file-input-label {
  display: inline-block;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.file-input-label:hover {
  background-color: #0056b3;
}

.image-previews-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  /* border: 2px dashed #ccc; */
  /* padding: 15px; */
  /* min-height: 100px; */
  align-items: center;
  justify-content: center;
  color: #888;
  font-family: sans-serif;
}

/* .image-previews-container:empty:before {
  /* content: "No images selected"; */
/* } */ 

.image-preview {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.delete-button {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: rgba(13, 13, 13, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.delete-button:hover {
  background-color: rgb(9, 9, 9);
}    
