/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

html,
body {
  height: 100%;
  background-color: #343541;
  color: #ececf1;
}

/* APP LAYOUT_ */
.app {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background-color: #202123;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #2f3037;
}

.sidebar-header {
  padding: 12px;
}

.new-chat-btn {
  width: 100%;
  padding: 10px;
  background-color: transparent;
  border: 1px solid #4d4d4f;
  border-radius: 8px;
  color: #ececf1;
  cursor: pointer;
  font-size: 14px;
}

.new-chat-btn:hover {
  background-color: #2a2b32;
}

/* CHAT HISTORY */
.chat-history {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
}

.chat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  cursor: pointer;
  color: #ececf1;
}

.chat-item:hover {
  background-color: #2a2b32;
}

.chat-item.active {
  background-color: #343541;
}

.chat-title {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-delete-btn {
  background: transparent;
  border: none;
  color: #8e8ea0;
  cursor: pointer;
  font-size: 14px;
}

.chat-delete-btn:hover {
  color: #ececf1;
}

/* SIDEBAR FOOTER */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid #2f3037;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #5c5cff;
}

.username {
  font-size: 14px;
}

/* CHAT CONTAINER */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #343541;
}

/* HEADER */
.chat-header {
  padding: 16px;
  border-bottom: 1px solid #2f3037;
}

.chat-title-main {
  font-size: 16px;
  font-weight: 500;
}

/* MESSAGES */
.messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.message {
  display: flex;
  margin-bottom: 20px;
  gap: 12px;
}

.message.assistant .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: url("favicon.png") no-repeat center center / contain;
  flex-shrink: 0;
}

.message.user {
  justify-content: flex-end;
}

.message.user .bubble {
  background-color: #444654;
}

.message.assistant .bubble {
  background-color: #40414f;
}

.bubble {
  max-width: 70%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #ececf1;
}

/* INPUT AREA */
.chat-input-area {
  padding: 16px;
  border-top: 1px solid #2f3037;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background-color: #40414f;
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px solid #565869;
}

textarea {
  flex: 1;
  resize: none;
  background: transparent;
  border: none;
  outline: none;
  color: #ececf1;
  font-size: 15px;
  line-height: 1.4;
  max-height: 200px;
}

textarea::placeholder {
  color: #8e8ea0;
}

.send-btn {
  background-color: transparent;
  border: none;
  color: #ececf1;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.send-btn:hover {
  background-color: #2a2b32;
}
/* İkonun etrafındaki kapsayıcı */
.info-container {
  position: relative;
  display: inline-block;
  cursor: help;
  margin-left: 10px;
}

/* Bilgi İkonu */
.info-icon {
  font-size: 18px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.info-container:hover .info-icon {
  opacity: 1;
}

/* Gizli Baloncuk */
.info-bubble {
  visibility: hidden;
  width: 220px;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 8px;
  padding: 10px;
  position: absolute;
  z-index: 100;
  bottom: 125%; /* İkonun üstünde çıkması için */
  left: 50%;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
  pointer-events: none; /* Mouse baloncuğun üstüne gelince titremeyi önler */
}

/* Baloncuğun altındaki küçük ok ucu */
.info-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

/* Üstüne gelince göster */
.info-container:hover .info-bubble {
  visibility: visible;
  opacity: 1;
}
.chat-link {
  color: #007bff;
  text-decoration: underline;
  word-break: break-all; /* Uzun linklerin balonu patlatmasını önler */
}

.chat-link:hover {
  color: #0056b3;
}
