
    
    /* Yazıyor animasyonu */
    @keyframes typing {
      0%   { content: '…'; }
      33%  { content: '…'; }
      66%  { content: '…'; }
      100% { content: ''; }
    }
    
    .loading .bubble::after {
      display: inline-block;
      margin-left: 4px;
      width: 1em;
      content: '';
      animation: typing 1s steps(3,end) infinite;
    }

  /* === Genel Konteyner === */
  #chat-widget, #chat-toggle-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
  }
  #chat-widget {
    width: 400px;
    height: 680px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 40px;
  }
  /* Açık durumda gizlenecek buton */
  #chat-toggle-button {
    width: 65px;
    height: 65px;
    background-color: #b520d0;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    bottom: 40px !important;
  }
  #chat-toggle-button .icon {
    font-size: 25px;
    color: #fff;
  }

  /* === Başlık === */
  #chat-header {
    background-color: #b520d0;
    color: white;
    height: 100px;
    position: relative;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: grid;
    align-items: center;
    gap: 5px;
  }
  /* Pill Konuşma */
  #chat-header .header-pill {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    justify-content: center;
    width: 50%;
    margin-left: 102px;
    margin-bottom: 10px;
    align-items: center;
    display: flex;
    color: #fff;
  }
  #chat-header .header-pill .icon {
    font-size: 16px;
    margin-right: 6px;
  }
  /* Alt bilgi */
  #chat-header .info {
    display: flex;
    align-items: center;
    margin-top: auto;
    width: 100%;
    gap: 65px;
    padding: 0px 20px;
    justify-content: center;
    box-sizing: border-box;
  }
  #chat-header .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
  }
  #chat-header .avatar .icon {
    font-size: 18px;
    color: #b520d0;
  }
  #chat-header .title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0px !important;
  }
  #chat-header .close-btn {
    cursor: pointer;
    font-size: 18px;
    color: #fff;
  }

  /* === Mesaj Alanı === */
  #chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
  }
  #messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #f2f2f5;
  }
  .date-separator {
    text-align: center;
    margin: 16px 0 8px;
    font-size: 12px;
    color: #666;
  }
  .msg { display: flex; margin-bottom: 12px; }
  .msg.user { justify-content: flex-end; }
  .msg.bot { justify-content: flex-start; }
  .msg .bubble {
    max-width: 80%;
    padding: 8px 14px;
    border-radius: 10px;
    line-height: 20px;
    letter-spacing: 0.1px;
    font-size: 13px;
  }
  .msg.user .bubble {
    background: #fff;
    border: 1px solid #ccc;
  }
  .msg.bot .bubble {
    background: #b520d0;
    color: #fff;
  }

  /* === Girdi Alanı === */
  #chat-input-area {
    padding: 12px 12px;
    background: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }
  #chat-input-area input {
    flex: 1;
    border: none;
    font-size: 14px;
  }
  #chat-input-area input:focus { outline: none; }
  #chat-input-area .icon {
    margin: 0 6px;
    cursor: pointer;
    font-size: 18px;
    color: #666;
  }
