/* Giptaş yardımcı bot — sağ altta açılır sohbet balonu */
.gbot-launcher {
  position: fixed;
  bottom: 92px;
  right: 24px;
  z-index: 9998;
  width: 56px;
  height: 56px;
  background: #00204a;
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gbot-launcher:hover,
.gbot-launcher:focus {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
  outline: none;
}

.gbot-launcher svg {
  width: 28px;
  height: 28px;
}

.gbot-launcher .gbot-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #e63946;
  color: #fff;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.gbot-launcher.gbot-open .gbot-icon-chat {
  display: none;
}
.gbot-launcher .gbot-icon-close {
  display: none;
}
.gbot-launcher.gbot-open .gbot-icon-close {
  display: block;
}

/* Sohbet penceresi */
.gbot-window {
  position: fixed;
  bottom: 160px;
  right: 24px;
  z-index: 9998;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 200px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: "Work Sans", system-ui, -apple-system, sans-serif;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gbot-window.gbot-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.gbot-header {
  background: #00204a;
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gbot-header .gbot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gbot-header .gbot-avatar svg {
  width: 20px;
  height: 20px;
}

.gbot-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.gbot-header p {
  margin: 2px 0 0;
  font-size: 12px;
  opacity: 0.8;
}

.gbot-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle;
}

.gbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f5f7fa;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gbot-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
}

.gbot-msg.gbot-bot {
  align-self: flex-start;
  background: #fff;
  color: #1f2937;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.gbot-msg.gbot-user {
  align-self: flex-end;
  background: #00204a;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.gbot-msg a {
  color: inherit;
  text-decoration: underline;
}

/* İlan kartı */
.gbot-card {
  align-self: flex-start;
  width: 85%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gbot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  color: inherit;
}
.gbot-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}
.gbot-card-body {
  padding: 9px 11px 11px;
}
.gbot-card-price {
  color: #00204a;
  font-weight: 700;
  font-size: 14px;
}
.gbot-card-title {
  font-size: 13px;
  font-weight: 600;
  margin: 2px 0;
  color: #1f2937;
}
.gbot-card-meta {
  font-size: 11.5px;
  color: #6b7280;
}
.gbot-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 6px;
  margin-bottom: 4px;
}
.gbot-tag.satilik {
  background: #e0f2fe;
  color: #0369a1;
}
.gbot-tag.kiralik {
  background: #dcfce7;
  color: #15803d;
}

/* Hızlı yanıt çipleri */
.gbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 16px 10px;
  background: #f5f7fa;
}
.gbot-chip {
  background: #fff;
  border: 1px solid #d6dee8;
  color: #00204a;
  border-radius: 16px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  font-family: inherit;
}
.gbot-chip:hover {
  background: #00204a;
  color: #fff;
}

/* Giriş alanı */
.gbot-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #eaeef3;
  background: #fff;
}
.gbot-input input {
  flex: 1;
  border: 1px solid #d6dee8;
  border-radius: 22px;
  padding: 10px 15px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.gbot-input input:focus {
  border-color: #00204a;
}
.gbot-input button {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: #00204a;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.gbot-input button:hover {
  background: #001b3f;
}
.gbot-input button svg {
  width: 18px;
  height: 18px;
}

/* Yazıyor göstergesi */
.gbot-typing {
  align-self: flex-start;
  background: #fff;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  padding: 12px 14px;
  display: flex;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.gbot-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa6b5;
  animation: gbot-bounce 1.2s infinite;
}
.gbot-typing span:nth-child(2) {
  animation-delay: 0.2s;
}
.gbot-typing span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes gbot-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@media (max-width: 575.98px) {
  .gbot-launcher {
    bottom: 78px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
  .gbot-window {
    right: 12px;
    left: 12px;
    bottom: 140px;
    width: auto;
    max-width: none;
    height: 70vh;
  }
}
