/* Khung placeholder giữa màn hình */
.chat-placeholder-container {
  position: absolute;
  top: 38%; 
  left: 50%;
  transform: translate(-50%, -50%); 
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 600px; 
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  user-select: none;
  pointer-events: none; 
  z-index: 2; 

  transition: all 0.3s ease;
}

/* Thêm quầng sáng tỏa từ trung tâm */
.chat-placeholder-container::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1000px;
  height: 350px;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary-color, #0c826f) 0%, transparent) 0%, transparent 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

.placeholder-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;    
  background-color: rgba(255, 255, 255, 0.9); 
  border: 1px solid color-mix(in srgb, var(--primary-color, #0c826f) 15%, transparent);    
  margin-bottom: 25px;
}

/* Định dạng SVG Icon Avatar */
.placeholder-avatar svg {  
  color: #32465a;
  margin-bottom: 0px;
  width: 30px; 
  height: auto;
}

.placeholder-title {
  font-size: 22px;
  font-weight: 400;
  color: #32465a;
  margin: 0 0 15px 0;
}

.placeholder-title .text {  
  font-family: 'Fira Code', 'Roboto Mono', 'Consolas', monospace;
  letter-spacing: -0.8px;
  color: var(--primary-color, #0c826f); 
}

/* Khung bọc chứa hiệu ứng xoay (Thẻ Pill) */
.placeholder-subtitle {
  position: relative !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 60px; 
  border: 1px solid color-mix(in srgb, var(--primary-color, #0c826f) 0%, transparent);
  background-color: rgba(255, 255, 255, 0.0);  
  box-sizing: border-box;
  overflow: hidden !important;

  /* Tối ưu render font nét căng */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.placeholder-subtitle .rotating-text {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  
  /* Bật tăng tốc phần cứng chống mờ */
  backface-visibility: hidden;
  will-change: transform, opacity;

  animation: rotateText 15s infinite;

  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--primary-color, #0c826f) 15%, transparent);
  background-color: rgba(255, 255, 255, 0.4);
  padding: 10px 1px 10px 1px;
}

/* Khung chứa Icon SVG */
.placeholder-subtitle .rotating-text .icon-box {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--primary-color, #0c826f) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Định dạng icon SVG nằm bên trong khung icon-box */
.placeholder-subtitle .rotating-text .icon-box svg {    
  width: 18px;
  height: 18px;
  color: var(--primary-color, #0c826f);
}

/* Tăng độ đậm và tương phản màu chữ */
.placeholder-subtitle .text-group {
  display: flex !important;
  flex-direction: column !important;
  text-align: left;
  line-height: 1.6;
}

.placeholder-subtitle .text-group span:nth-child(1) {
  font-size: 15px;
  font-weight: 500;
  color: #32465a;
}

.placeholder-subtitle .text-group span:nth-child(2) {
  font-size: 13.5px;
  font-weight: 400;
  color: #4a5568;
}

/* Delay thời gian hiển thị cho từng mục */
.placeholder-subtitle .rotating-text:nth-child(1) { animation-delay: 0s; }
.placeholder-subtitle .rotating-text:nth-child(2) { animation-delay: 5s; }
.placeholder-subtitle .rotating-text:nth-child(3) { animation-delay: 10s; }

/* Keyframes chuyển động xoay chữ */
@keyframes rotateText {
  0% { 
    opacity: 0; 
    transform: translateY(8px); 
  }
  4% { 
    opacity: 1; 
    transform: translateY(0); 
  }
  29% { 
    opacity: 1; 
    transform: translateY(0); 
  }
  33.33% { 
    opacity: 0; 
    transform: translateY(-8px); 
  }
  100% { 
    opacity: 0; 
  }
}

.chat-placeholder-container.hidden {
  display: none !important;
}

/* RESPONSIVE DI ĐỘNG */
@media screen and (max-width: 735px) {
  .placeholder-avatar {   
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
  }

  .placeholder-avatar svg {    
    width: 28px;  
  }

  .placeholder-title {
    font-size: 19px;    
  }

  .placeholder-subtitle {   
    width: 290px;
    height: 50px;
  }
}