.tof-chatbot {
  --tof-chatbot-bottom: 96px;
  --tof-chatbot-right: 24px;
  --tof-chatbot-toggle-size: 64px;
  --tof-chatbot-safe-top: 136px;
  position: fixed;
  right: var(--tof-chatbot-right);
  bottom: var(--tof-chatbot-bottom);
  z-index: 920;
  font-family: inherit;
}

body.admin-bar .tof-chatbot {
  --tof-chatbot-safe-top: 168px;
}

.tof-chatbot__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tof-chatbot-toggle-size);
  height: var(--tof-chatbot-toggle-size);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  background: linear-gradient(135deg, #004DAA, #0070E8);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(0, 61, 148, 0.24);
  cursor: pointer;
}

.tof-chatbot__toggle:hover {
  transform: translateY(-1px);
}

.tof-chatbot__panel {
  position: fixed;
  right: var(--tof-chatbot-right);
  bottom: calc(var(--tof-chatbot-bottom) + var(--tof-chatbot-toggle-size) + 14px);
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100svh - var(--tof-chatbot-safe-top) - var(--tof-chatbot-bottom) - var(--tof-chatbot-toggle-size) - 32px);
  overflow-y: auto;
  border: 1px solid #BFD7F2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(0, 36, 86, 0.22);
}

.tof-chatbot__panel[hidden] {
  display: none;
}

.tof-chatbot__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 16px;
  background: linear-gradient(135deg, #00265A, #0068D9);
  color: #fff;
}

.tof-chatbot__header span {
  display: block;
  color: #CFE8FF;
  font-size: 12px;
  font-weight: 900;
}

.tof-chatbot__header h2 {
  margin: 4px 0 0;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.tof-chatbot__close {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.tof-chatbot__close::before,
.tof-chatbot__close::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 17px;
  width: 14px;
  height: 2px;
  background: #fff;
}

.tof-chatbot__close::before {
  transform: rotate(45deg);
}

.tof-chatbot__close::after {
  transform: rotate(-45deg);
}

.tof-chatbot__body {
  padding: 18px;
}

.tof-chatbot__body p {
  margin: 0 0 14px;
  color: #213857;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.7;
}

.tof-chatbot__choices {
  display: grid;
  gap: 9px;
}

.tof-chatbot__choices a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #D5E6F8;
  border-radius: 6px;
  background: #F8FCFF;
  color: #00265A;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
}

.tof-chatbot__choices a::after {
  content: "›";
  margin-left: 12px;
  color: #0068D9;
  font-size: 18px;
  line-height: 1;
}

.tof-chatbot__choices a:hover {
  border-color: #7EBBFF;
  background: #EEF7FF;
}

@media (max-width: 767px) {
  .tof-chatbot {
    --tof-chatbot-bottom: 82px;
    --tof-chatbot-right: 16px;
    --tof-chatbot-toggle-size: 58px;
    --tof-chatbot-safe-top: 116px;
  }

  .tof-chatbot__toggle {
    font-size: 13px;
  }

  .tof-chatbot__panel {
    width: min(360px, calc(100vw - 28px));
    max-height: calc(100svh - var(--tof-chatbot-safe-top) - var(--tof-chatbot-bottom) - var(--tof-chatbot-toggle-size) - 24px);
  }

  body.admin-bar .tof-chatbot {
    --tof-chatbot-safe-top: 162px;
  }
}
