.main-container {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: row;
  overflow: hidden;
}
.contact-list {
  width: 100%;
  max-width: 280px;
  background-color: #f0f0f0;
  border-left: 1px solid #ccc;
  padding: 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.contact-list #lastIdMessage {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.contact-list h5 {
  margin-bottom: 15px;
}
.contact-item {
  padding: 10px;
  border-radius: 5px;
  background-color: #fff;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.contact-item:hover {
  background-color: #e2f0d9;
}
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.chat-header {
  background: linear-gradient(90deg, #010310 0%, #121a30 100%);
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-header .bot-name {
  font-weight: bold;
}
.chat-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  background-image: url('https://chatcenter.tutorialesatualcance.com/views/assets/files/6812890bcf30915.png');
  background-size: auto;
  background-repeat: repeat;
}
.msg {
  position: relative;
  max-width: 75%;
  padding: 10px;
  border-radius: 10px;
  line-height: 1.4;
}
.msg.user {
  align-self: flex-start;
  background-color: #D9FDD3;
}

.msg.user span {
  position: inherit;
  bottom:0;
  right:0;
}
.msg.bot {
  align-self: flex-end;
  background-color: #fff;
}
.msg.bot.msg-undelivered {
  background-color: #fff5f5;
  border: 1px solid #f5c2c7;
  box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.08);
}
.chat-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid #ddd;
  background-color: #fff;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.chat-footer-tools {
  gap: 4px;
}
.chat-footer input {
  flex: 1;
  min-width: 120px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
}

.chat-footer button.attach {
  border: 1px solid #bbb;
  background-color: #eee;
  border-radius: 50%;
  color: #333;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-footer button.send {
  background-color: #075e54;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.chat-emoji-panel {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 100%;
  margin-bottom: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  z-index: 20;
}

.chat-emoji-item {
  border: none;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1.2;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
}

.chat-emoji-item:hover {
  background: #f0f0f0;
}

.msg video,
.msg audio {
  max-width: 100%;
}

.chat-recording-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 100%;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff5f5;
  border: 1px solid #f5c2c7;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  z-index: 21;
}

.chat-recording-bar.d-none {
  display: none !important;
}

.chat-recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dc3545;
  flex-shrink: 0;
  animation: chat-rec-pulse 1s ease-in-out infinite;
}

@keyframes chat-rec-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.chat-recording-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 36px;
}

.chat-recording-label {
  flex: 1;
  font-size: 0.9rem;
  color: #842029;
}

.chat-recording-cancel,
.chat-recording-send {
  border: none;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-recording-cancel {
  color: #6c757d;
}

.chat-recording-cancel:hover {
  background: rgba(0, 0, 0, 0.06);
}

.chat-recording-send {
  background: #075e54;
  color: #fff;
}

.chat-recording-send:hover {
  background: #064a42;
}

.chat-footer button.attach.is-recording {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.chat-footer button.attach.is-recording:hover {
  background: #bb2d3b;
}
@media (min-width: 992px) {
  /*.chat-container {
    display:flex;
  }*/
  .contact-list {
    max-width:250px;
  }
}
@media (max-width: 768px) {
  .chat-body {
    padding: 10px;
  }
  .msg {
    max-width: 85%;
  }
}

.offcanvas-end{
  width: 85% !important;
}