/* Chatbot widget */
.nt-chat-root {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1040;
  font-family: var(--font-body, inherit);
}

.nt-chat-toggle {
  width: auto;
  min-height: 3.35rem;
  height: auto;
  border: 0;
  border-radius: 999px;
  background: var(--color-navy, #1e1b4b);
  color: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem 0.55rem 1.05rem;
  font-size: 1.35rem;
  position: relative;
  max-width: min(20rem, calc(100vw - 2rem));
  transition: transform 180ms ease, box-shadow 180ms ease, padding 180ms ease;
}

.nt-chat-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.34);
}

.nt-chat-toggle-label {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  letter-spacing: 0.01em;
}

.nt-chat-toggle-label-short {
  display: none;
}

.nt-chat-toggle-ico {
  flex-shrink: 0;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: var(--color-orange, #ea580c);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

/* Açıkken sadece ikon */
.nt-chat-root.is-open .nt-chat-toggle {
  padding: 0;
  width: 3.35rem;
  height: 3.35rem;
}

.nt-chat-root.is-open .nt-chat-toggle-label {
  display: none;
}

/* Dikkat çekici nabız (kapalıyken) */
.nt-chat-root:not(.is-open) .nt-chat-toggle::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid rgba(234, 88, 12, 0.55);
  animation: nt-chat-pulse 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes nt-chat-pulse {
  0% { opacity: 0.85; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .nt-chat-root:not(.is-open) .nt-chat-toggle::before {
    animation: none;
  }
}

.nt-chat-panel {
  position: absolute;
  right: 0;
  bottom: 4.1rem;
  width: min(360px, calc(100vw - 1.5rem));
  height: min(480px, calc(100vh - 8rem));
  background: #fff;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nt-chat-panel[hidden] {
  display: none !important;
}

.nt-chat-head {
  padding: 0.9rem 1rem;
  background: var(--color-navy, #1e1b4b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nt-chat-head strong {
  display: block;
  font-size: 0.95rem;
}

.nt-chat-head span {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
}

.nt-chat-head-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.nt-chat-end {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  line-height: 1.2;
  opacity: 0.9;
}

.nt-chat-end:hover {
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
}

.nt-chat-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
}

.nt-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nt-chat-bubble {
  max-width: 88%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.85rem;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.nt-chat-bubble.is-bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--color-border, #e5e7eb);
  color: var(--color-navy, #1e1b4b);
}

.nt-chat-bubble .nt-chat-link {
  color: var(--color-orange, #ea580c);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nt-chat-bubble .nt-chat-link:hover {
  color: var(--color-navy, #1e1b4b);
}

.nt-chat-bubble.is-user {
  align-self: flex-end;
  background: var(--color-orange, #ea580c);
  color: #fff;
}

.nt-chat-bubble.is-meta {
  align-self: center;
  background: transparent;
  color: #64748b;
  font-size: 0.8rem;
  padding: 0.2rem;
}

.nt-chat-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem;
  border-top: 1px solid var(--color-border, #e5e7eb);
  background: #fff;
}

.nt-chat-form input[type="text"] {
  flex: 1;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
}

.nt-chat-form button[type="submit"] {
  border: 0;
  border-radius: 999px;
  background: var(--color-navy, #1e1b4b);
  color: #fff;
  padding: 0 0.95rem;
  font-weight: 600;
}

.nt-chat-form button:disabled {
  opacity: 0.6;
}

@media (max-width: 575.98px) {
  .nt-chat-root {
    right: 0.85rem;
    bottom: 1.1rem;
  }

  .nt-chat-toggle-label-full {
    display: none;
  }

  .nt-chat-toggle-label-short {
    display: inline;
  }

  .nt-chat-toggle {
    max-width: min(15.5rem, calc(100vw - 5.5rem));
    padding-left: 0.9rem;
  }
}
