@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700&display=swap');

.bc-chatbot,
.bc-chatbot * {
  box-sizing: border-box;
}

.bc-chatbot {
  --bc-brand: #00b45a;
  --bc-brand-dark: #008f49;
  --bc-blue: #109fd6;
  --bc-ink: #17202a;
  --bc-muted: #64748b;
  --bc-line: #d8e2e0;
  --bc-soft: #f6f8fb;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  font-family: 'Nunito', sans-serif;
}

.bc-chatbot__toggle {
  width: 66px;
  height: 66px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #599b47;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bcPulse 2.5s infinite ease-in-out;
}

.bc-chatbot__toggle-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes bcPulse {
  0% { transform: scale(1); box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22); }
  50% { transform: scale(1.05); box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35); }
  100% { transform: scale(1); box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22); }
}

.bc-chatbot__panel {
  display: none;
  width: min(380px, calc(100vw - 28px));
  height: min(640px, calc(100vh - 105px));
  overflow: hidden;
  border: 1px solid var(--bc-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.24);
}

.bc-chatbot--open .bc-chatbot__panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.bc-chatbot--open .bc-chatbot__toggle {
  display: none;
}

.bc-chatbot__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--bc-brand), var(--bc-blue));
}

.bc-chatbot__title {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.bc-chatbot__status {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.88;
}

.bc-chatbot__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.bc-chatbot__messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
  background: var(--bc-soft);
}

.bc-chatbot__message {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.bc-chatbot__message--bot {
  align-self: flex-start;
  border: 1px solid var(--bc-line);
  color: var(--bc-ink);
  background: #fff;
  border-bottom-left-radius: 6px;
}

.bc-chatbot__message--user {
  align-self: flex-end;
  color: #fff;
  background: var(--bc-blue);
  border-bottom-right-radius: 6px;
}

.bc-chatbot__message--system {
  align-self: center;
  max-width: 100%;
  padding: 2px 0;
  color: var(--bc-muted);
  background: transparent;
  font-size: 12px;
  text-align: center;
}

.bc-chatbot__message--typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 52px;
  min-height: 38px;
}

.bc-chatbot__typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bc-muted);
  animation: bcTyping 1s infinite ease-in-out;
}

.bc-chatbot__typing-dot:nth-child(2) {
  animation-delay: 0.14s;
}

.bc-chatbot__typing-dot:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes bcTyping {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.bc-chatbot__footer {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--bc-line);
  background: #fff;
}

.bc-chatbot__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--bc-line);
  border-radius: 20px;
  padding: 8px;
  background: #f8fafc;
}

.bc-chatbot__actions:empty {
  display: none;
}

.bc-chatbot__actions--menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--bc-line);
  border-radius: 20px;
  padding: 10px;
  background: #f8fafc;
}

.bc-chatbot__action,
.bc-chatbot__send,
.bc-chatbot__finish {
  min-height: 36px;
  border-radius: 24px !important;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}

.bc-chatbot__action {
  width: 100%;
  border: 1px solid var(--bc-blue);
  color: var(--bc-blue);
  background: #fff;
  padding: 9px 11px;
  text-align: left;
}

.bc-chatbot__actions--menu .bc-chatbot__action {
  width: 100%;
  min-height: 46px;
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--bc-brand), var(--bc-blue));
  box-shadow: 0 8px 18px rgba(16, 159, 214, 0.18);
  font-weight: 700;
  line-height: 1.25;
  padding: 10px 12px;
  text-align: center;
}

.bc-chatbot__action:hover {
  color: #fff;
  background: var(--bc-blue);
}

.bc-chatbot__actions--menu .bc-chatbot__action:hover,
.bc-chatbot__actions--menu .bc-chatbot__action:focus {
  background: linear-gradient(135deg, var(--bc-brand-dark), #087fb0);
  outline: none;
}

.bc-chatbot__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.bc-chatbot__form--hidden {
  display: none;
}

.bc-chatbot__form--textarea {
  grid-template-columns: 1fr;
}

.bc-chatbot__input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 24px !important;
  padding: 9px 14px;
  color: var(--bc-ink);
  font: inherit;
  font-size: 14px;
}

textarea.bc-chatbot__input {
  min-height: 96px;
  resize: vertical;
  border-radius: 16px !important;
}

.bc-chatbot__send {
  border: 1px solid var(--bc-brand);
  color: #fff;
  background: var(--bc-brand);
  padding: 8px 13px;
}

.bc-chatbot__finish {
  width: 100%;
  border: 1px solid #cbd5e1;
  color: var(--bc-ink);
  background: #fff;
}

.bc-chatbot__contact-form {
  align-self: stretch;
  display: grid;
  gap: 12px;
  border: 1px solid var(--bc-line);
  border-radius: 20px;
  padding: 16px;
  background: #fff;
}

.bc-chatbot__confirmation {
  align-self: stretch;
  display: grid;
  gap: 10px;
  border: 1px solid var(--bc-line);
  border-radius: 20px;
  padding: 16px;
  color: var(--bc-ink);
  background: #fff;
}

.bc-chatbot__confirmation-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bc-chatbot__confirmation-list li {
  border: 1px solid #eef2f7;
  border-radius: 16px;
  padding: 8px 12px;
  color: var(--bc-ink);
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.35;
}

.bc-chatbot__confirmation-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.bc-chatbot__form-title {
  margin: 0;
  color: var(--bc-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.bc-chatbot__field {
  display: grid;
  gap: 5px;
  margin: 0;
}

.bc-chatbot__field span {
  color: var(--bc-muted);
  font-size: 12px;
  font-weight: 700;
}

.bc-chatbot__field input[readonly] {
  color: var(--bc-muted);
  background: #f8fafc;
}

.bc-chatbot__city-picker {
  position: relative;
}

.bc-chatbot__city-list {
  display: none;
  width: 100%;
  max-height: 190px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  margin-top: 6px;
  background: #fff;
}

.bc-chatbot__contact-form--city-open .bc-chatbot__city-list {
  display: grid;
}

.bc-chatbot__city-option {
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  color: var(--bc-ink);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  text-align: left;
}

.bc-chatbot__city-option:hover,
.bc-chatbot__city-option:focus {
  color: #fff;
  background: var(--bc-blue);
  outline: none;
}

.bc-chatbot__city-empty {
  color: var(--bc-muted);
  font-size: 13px;
  padding: 10px;
}

.bc-chatbot__consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 12px 14px;
  color: var(--bc-ink);
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
}

.bc-chatbot__consent input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--bc-brand);
}

.bc-chatbot__consent span {
  color: var(--bc-ink);
  font-weight: 600;
}

.bc-chatbot__contact-submit {
  width: 100%;
}

.bc-chatbot__contact-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

@media (max-width: 520px) {
  .bc-chatbot {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .bc-chatbot__panel {
    width: 100%;
    height: calc(100vh - 90px);
  }

  .bc-chatbot__toggle {
    display: block;
    margin-left: auto;
  }

  .bc-chatbot__actions--menu {
    grid-template-columns: 1fr;
  }
}

/* Yeni Eklenen Stiller */
.bc-chatbot__header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bc-chatbot__header-logo {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
}

.bc-chatbot__bot-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  align-self: flex-start;
  max-width: 88%;
}

.bc-chatbot__bot-logo {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--bc-line);
  background: #fff;
  padding: 2px;
  margin-bottom: 2px;
}

.bc-chatbot__bot-wrapper .bc-chatbot__message--bot {
  max-width: 100%;
  align-self: stretch;
}

.bc-chatbot__error-msg {
  color: #dc2626;
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
  animation: bcFadeIn 0.3s ease;
}

.bc-chatbot__input.has-error {
  border-color: #dc2626;
}

@keyframes bcFadeIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.bc-chatbot__user-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  align-self: flex-end;
  max-width: 88%;
}

.bc-chatbot__user-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bc-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.bc-chatbot__user-wrapper .bc-chatbot__message--user {
  max-width: 100%;
  align-self: stretch;
}
