html,
body {
  font-family: "Public Sans", "Noto Sans Thai";
  margin: 0;
  padding: 0;
}

.aiologo {
  height: 24px !important;
}
@media (min-width: 769px) {
  .aiologo {
    height: 30px !important;
  }
}

#chat-topbar {
  box-shadow: 0 0.125rem 0.375rem 0 rgba(34, 48, 62, 0.08);
  border-radius: 0.375rem;
  padding: 0 1.5rem;
  height: auto !important;
}

#chat-box,
#chat-admin {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

#chat-admin {
  height: 100vh !important;
}

#chat-history {
  flex-grow: 1;
  overflow-y: auto;
  box-sizing: border-box;
}
#chat-history::-webkit-scrollbar {
  -webkit-appearance: none;
}
#chat-history::-webkit-scrollbar:vertical {
  width: 11px;
}
#chat-history::-webkit-scrollbar:horizontal {
  height: 11px;
}
#chat-history::-webkit-scrollbar-thumb {
  border-radius: 8px;
  border: 2px solid white;
  background-color: rgba(0, 0, 0, 0.5);
}

@media (min-width: 769px) {
  #chat-history {
    max-height: 500px;
  }
}
@media (max-width: 769px) {
  #chat-box {
    height: 100%;
  }
  .chat-admin {
    max-height: 100vh !important;
  }
}
#chat-form {
  flex-shrink: 0; /* Prevent shrinking */
  background: #fff; /* Ensure a solid background */
}
.chat-admin-form {
  margin-bottom: 10px;
}

.pinned-message {
  position: sticky; /* ติดอยู่ด้านบน */
  top: 0;
  z-index: 10;
  background-color: #fffae6; /* สีพื้นหลังให้โดดเด่น */
  border-bottom: 1px solid #f0c674;
  padding: 10px;
}

.embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.popup {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 40px;
  width: 300px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background-color: #fff !important;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.chat-actions-dropdown {
  position: static !important;
}

.chat-actions-dropdown .dropdown-menu {
  font-size: 0.75rem;
  min-width: 120px;
}

.chat-actions-dropdown .dropdown-item {
  padding: 0.25rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-actions-dropdown .dropdown-item i {
  width: 16px;
  text-align: center;
}

.message-input-group {
  position: relative;
}

.message-dropdown .dropdown-menu {
  bottom: 100%;
  top: auto;
  margin-bottom: 5px;
}
