/* 出色伙伴 - 腾讯云 ADP 智能助手 */
.adp-chatbot-root {
  --adp-yellow: #ebb532;
  --adp-purple: #a50082;
  --adp-panel-w: 680px;
  --adp-panel-min: 360px;
  --adp-panel-max: 960px;
  --adp-z: 10050;
  font-family: inherit;
}

.adp-chatbot-fab {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: var(--adp-z);
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: var(--adp-yellow);
  color: #fff;
  box-shadow: 0 8px 24px rgba(235, 181, 50, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.adp-chatbot-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 28px rgba(235, 181, 50, 0.55);
  background: #e0a820;
}

.adp-chatbot-fab:focus {
  outline: 2px solid var(--adp-purple);
  outline-offset: 3px;
}

.adp-chatbot-fab svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.adp-chatbot-fab.is-open {
  background: #333;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.adp-chatbot-fab .adp-icon-close {
  display: none;
}

.adp-chatbot-fab.is-open .adp-icon-chat {
  display: none;
}

.adp-chatbot-fab.is-open .adp-icon-close {
  display: block;
}

.adp-chatbot-mask {
  position: fixed;
  inset: 0;
  z-index: calc(var(--adp-z) - 1);
  background: rgba(2, 30, 7, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.adp-chatbot-mask.is-open {
  opacity: 1;
  visibility: visible;
}

.adp-chatbot-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: var(--adp-z);
  width: var(--adp-panel-w);
  max-width: 96vw;
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 32px rgba(2, 30, 7, 0.14);
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.adp-chatbot-panel.is-open {
  transform: translateX(0);
}

.adp-chatbot-panel.is-resizing {
  transition: none;
  user-select: none;
}

.adp-chatbot-resize {
  position: absolute;
  top: 0;
  left: -3px;
  z-index: 3;
  width: 10px;
  height: 100%;
  cursor: ew-resize;
  touch-action: none;
  background: transparent;
}

.adp-chatbot-resize::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 3px;
  height: 48px;
  margin-top: -24px;
  border-radius: 2px;
  background: rgba(165, 0, 130, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.adp-chatbot-panel:hover .adp-chatbot-resize::before,
.adp-chatbot-panel.is-resizing .adp-chatbot-resize::before,
.adp-chatbot-resize:hover::before,
.adp-chatbot-resize:focus-visible::before {
  opacity: 1;
}

.adp-chatbot-panel.is-resizing .adp-chatbot-resize::before,
.adp-chatbot-resize:hover::before {
  background: var(--adp-purple);
}

.adp-chatbot-resize:focus-visible {
  outline: none;
}

.adp-chatbot-header {
  flex: 0 0 auto;
  min-height: 56px;
  padding: 10px 16px 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #ebb532 0%, #f0c45a 55%, #a50082 160%);
  color: #fff;
}

.adp-chatbot-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.adp-chatbot-header p {
  margin: 2px 0 0;
  font-size: 12px;
  opacity: 0.92;
  font-weight: 400;
}

.adp-chatbot-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.adp-chatbot-expand,
.adp-chatbot-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.adp-chatbot-expand:hover,
.adp-chatbot-close:hover {
  background: rgba(255, 255, 255, 0.32);
}

.adp-chatbot-expand svg,
.adp-chatbot-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.adp-chatbot-body {
  flex: 1 1 auto;
  position: relative;
  min-height: 0;
  background: #f7f7f7;
}

.adp-chatbot-body iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.adp-chatbot-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 14px;
  background: #fff;
  z-index: 1;
  transition: opacity 0.25s ease;
}

.adp-chatbot-loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.adp-chatbot-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: #fff;
  text-align: center;
}

.adp-chatbot-fallback.is-visible {
  display: flex;
}

.adp-chatbot-fallback-tip {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

.adp-chatbot-fallback-link {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 24px;
  background: var(--adp-yellow);
  color: #fff !important;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 6px 16px rgba(235, 181, 50, 0.35);
}

.adp-chatbot-fallback-link:hover {
  background: #e0a820;
}

@media (max-width: 768px) {
  .adp-chatbot-root {
    --adp-panel-w: 100vw;
  }

  .adp-chatbot-panel {
    max-width: 100vw;
  }

  .adp-chatbot-resize,
  .adp-chatbot-expand {
    display: none;
  }

  .adp-chatbot-fab {
    right: 16px;
    bottom: 20px;
    width: 52px;
    height: 52px;
  }
}

body.adp-chatbot-open {
  overflow: hidden;
}

body.adp-chatbot-resizing {
  cursor: ew-resize !important;
  user-select: none !important;
}

body.adp-chatbot-resizing iframe {
  pointer-events: none;
}
