/* ========================================
   一道标识 — 智能客服浮窗样式
   ======================================== */

.ido-chat-widget,
.ido-chat-widget * {
  box-sizing: border-box;
}

.ido-chat-widget {
  --ido-chat-primary: #C41230;
  --ido-chat-primary-dark: #8B1A2B;
  --ido-chat-text: #2B2B2B;
  --ido-chat-muted: #777777;
  --ido-chat-border: #E5E5E5;
  --ido-chat-bg: #FAFAFA;
  position: relative;
  z-index: 1200;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.ido-chat-launcher {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 68px;
  height: 68px;
  border: 3px solid #1A1A1A;
  outline: 1px solid rgba(200, 164, 92, .62);
  outline-offset: 1px;
  border-radius: 50%;
  padding: 0;
  color: #fff;
  background: linear-gradient(145deg, #C41230, #8B1A2B);
  box-shadow: 0 10px 26px rgba(26, 26, 26, .22), inset 0 1px 0 rgba(255,255,255,.3);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.ido-chat-launcher:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(26, 26, 26, .28), inset 0 1px 0 rgba(255,255,255,.3);
}

.ido-chat-launcher:active {
  cursor: grabbing;
}

.ido-chat-prompt {
  position: fixed;
  z-index: 1201;
  max-width: min(238px, calc(100vw - 88px));
  padding: 10px 17px;
  border: 1px solid rgba(200, 164, 92, .55);
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #C41230, #8B1A2B);
  box-shadow: 0 12px 28px rgba(139, 26, 43, .22);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
}

.ido-chat-prompt::after {
  position: absolute;
  right: 31px;
  bottom: -10px;
  width: 0;
  height: 0;
  border-top: 11px solid #8B1A2B;
  border-right: 11px solid transparent;
  border-left: 11px solid transparent;
  content: '';
}

.ido-chat-prompt:hover {
  box-shadow: 0 15px 32px rgba(139, 26, 43, .3);
  transform: translateY(-2px);
}

.ido-chat-prompt.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(.96);
}

.ido-chat-prompt.is-below::after {
  top: -10px;
  right: 31px;
  bottom: auto;
  border-top: 0;
  border-right: 11px solid transparent;
  border-bottom: 11px solid #C41230;
  border-left: 11px solid transparent;
}

.ido-chat-launcher-icon {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.ido-chat-launcher-icon svg {
  width: 38px;
  height: 38px;
}

.ido-chat-launcher-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid #fff;
  border-radius: 50%;
  color: #23364d;
  background: #C8A45C;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.ido-chat-panel {
  position: fixed;
  right: 28px;
  bottom: 28px;
  display: flex;
  width: min(486px, calc(100vw - 32px));
  height: min(630px, calc(100vh - 32px));
  flex-direction: column;
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(26, 26, 26, .2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease;
}

.ido-chat-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ido-chat-header {
  display: flex;
  min-height: 134px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 27px 26px 23px;
  color: #fff;
  background: linear-gradient(135deg, #C41230, #8B1A2B);
}

.ido-chat-eyebrow {
  margin-bottom: 10px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}

.ido-chat-header h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .5px;
}

.ido-chat-header p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.92);
  font-size: 14px;
}

.ido-chat-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 35px;
  font-weight: 300;
  line-height: 27px;
  cursor: pointer;
}

.ido-chat-stats {
  display: flex;
  min-height: 55px;
  align-items: center;
  gap: 13px;
  padding: 0 20px;
  border-bottom: 1px solid var(--ido-chat-border);
  color: #777777;
  background: #FDF2F4;
  font-size: 14px;
}

.ido-chat-stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.ido-chat-stat b {
  color: var(--ido-chat-text);
  font-size: 17px;
}

.ido-chat-stat i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #1eb98d;
  box-shadow: 0 0 0 5px rgba(30,185,141,.13);
}

.ido-chat-stat-divider {
  width: 1px;
  height: 21px;
  background: #E5E5E5;
}

.ido-chat-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 21px 20px 12px;
  background: #fff;
}

.ido-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ido-chat-message {
  max-width: 88%;
  padding: 13px 15px;
  border: 1px solid var(--ido-chat-border);
  border-radius: 16px;
  color: var(--ido-chat-text);
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.ido-chat-message-bot {
  align-self: flex-start;
  border-top-left-radius: 6px;
  background: #fff;
}

.ido-chat-message-user {
  align-self: flex-end;
  border-color: #F0D5DB;
  border-top-right-radius: 6px;
  color: #fff;
  background: var(--ido-chat-primary);
}

.ido-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ido-chat-quick-button {
  padding: 9px 15px;
  border: 1px solid #E6BBC4;
  border-radius: 999px;
  color: #8B1A2B;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.ido-chat-quick-button:hover {
  border-color: var(--ido-chat-primary);
  color: #fff;
  background: var(--ido-chat-primary);
}

.ido-chat-form-card {
  margin-top: 17px;
  padding: 15px 16px;
  border: 1px solid #E2BAC3;
  border-radius: 14px;
  background: #FDF2F4;
  color: var(--ido-chat-text);
}

.ido-chat-form-card[hidden] {
  display: none;
}

.ido-chat-form-card strong {
  font-size: 15px;
}

.ido-chat-form-card p {
  margin: 6px 0 11px;
  color: #777777;
  font-size: 13px;
  line-height: 1.6;
}

.ido-chat-form-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ido-chat-primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.ido-chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 12px 17px;
  border-top: 1px solid var(--ido-chat-border);
  background: #fff;
}

.ido-chat-input input {
  min-width: 0;
  flex: 1;
  padding: 10px 0;
  border: 0;
  outline: 0;
  color: var(--ido-chat-text);
  font: inherit;
  font-size: 15px;
}

.ido-chat-input input::placeholder {
  color: #A8A8A8;
}

.ido-chat-input button {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  place-items: center;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--ido-chat-primary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.ido-chat-input button:hover {
  background: var(--ido-chat-primary-dark);
}

.ido-chat-footnote {
  padding: 0 12px 13px;
  color: #999999;
  background: #fff;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 600px) {
  .ido-chat-launcher {
    right: 16px;
    bottom: 16px;
    width: 60px;
    height: 60px;
  }

  .ido-chat-launcher-icon svg {
    width: 33px;
    height: 33px;
  }

  .ido-chat-prompt {
    max-width: calc(100vw - 86px);
    padding: 9px 14px;
    font-size: 14px;
  }


  .ido-chat-panel {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    height: min(650px, calc(100vh - 20px));
    border-radius: 22px;
  }

  .ido-chat-header {
    min-height: 123px;
    padding: 23px 20px 19px;
  }

  .ido-chat-header h2 {
    font-size: 22px;
  }

  .ido-chat-content {
    padding-right: 15px;
    padding-left: 15px;
  }
}
