:root {
  --yc-floating-right: 30px;
  --yc-floating-bottom: 30px;
  --yc-floating-size: 46px;
  --yc-chatbot-gap: 12px;
}
.back-to-top {
  right: var(--yc-floating-right);
  bottom: var(--yc-floating-bottom);
  z-index: 1150;
}

.yc-chatbot {
  position: fixed;
  right: var(--yc-floating-right);
  bottom: calc(var(--yc-floating-bottom) + var(--yc-floating-size) + var(--yc-chatbot-gap));
  z-index: 1200;
}

.yc-chatbot__launcher {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(140deg, #2f548b, #5583c3);
  color: #fff;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(18, 15, 45, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.yc-chatbot__launcher:hover,
.yc-chatbot__launcher:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(18, 15, 45, 0.32);
  outline: none;
}

.yc-chatbot__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(360px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 130px));
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(18, 15, 45, 0.08);
  box-shadow: 0 18px 50px rgba(14, 20, 36, 0.24);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
  pointer-events: none;
}

.yc-chatbot__panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.yc-chatbot__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #2f548b;
  color: #fff;
}

.yc-chatbot__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.yc-chatbot__close {
  border: 0;
  background: transparent;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.yc-chatbot__close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.yc-chatbot__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px;
  gap: 12px;
}

.yc-chatbot__welcome {
  margin: 0;
  color: #2f548b;
  font-weight: 600;
}

.yc-chatbot__controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.yc-chatbot__utility-btn {
  border: 1px solid rgba(47, 84, 139, 0.25);
  background: #fff;
  color: #2f548b;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.yc-chatbot__utility-btn:hover {
  background: #f2f7ff;
}

.yc-chatbot__content {
  overflow-y: auto;
  min-height: 0;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.yc-chatbot__topic-btn,
.yc-chatbot__question-btn {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(47, 84, 139, 0.16);
  background: #fff;
  color: #1f2f4a;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.yc-chatbot__topic-btn:hover,
.yc-chatbot__question-btn:hover {
  background: #f2f7ff;
  border-color: rgba(47, 84, 139, 0.35);
}

.yc-chatbot__answer {
  border: 1px solid rgba(47, 84, 139, 0.14);
  background: #f9fbff;
  border-radius: 12px;
  padding: 12px;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.55;
}

.yc-chatbot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.yc-chatbot__answer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 7px 12px;
  background: #5583c3;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.yc-chatbot__answer-link:hover {
  color: #fff;
  background: #2f548b;
  text-decoration: none;
}

@media (max-width: 767.98px) {
  :root {
    --yc-floating-right: 16px;
    --yc-floating-bottom: 16px;
  }

  .yc-chatbot__launcher {
    width: 46px;
    height: 46px;
    font-size: 1.05rem;
  }

  .yc-chatbot__panel {
    right: -2px;
    width: min(360px, calc(100vw - 20px));
    height: min(470px, calc(100vh - 96px));
    border-radius: 14px;
  }
}
