/*
 * Mystic Hands — customer-service floating widget.
 * Self-contained plain CSS (no Tailwind build needed). Matches the theme's
 * deep-purple + gold palette. Rendered by inc/customer-service.php.
 */
.mh-cs {
  position: fixed;
  bottom: 20px;
  z-index: 45;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Arial, sans-serif;
}
.mh-cs--br { right: 20px; }
.mh-cs--bl { left: 20px; }

/* ---- floating action button ---- */
.mh-cs-fab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(243, 220, 160, 0.7);
  background: linear-gradient(160deg, #e8cd8f 0%, #cfa75f 70%, #b9965a 100%);
  color: #180e26;
  cursor: pointer;
  box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.55), 0 0 22px -4px rgba(243, 220, 160, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: mh-cs-pulse 2.8s ease-in-out infinite;
}
.mh-cs-fab:hover { transform: translateY(-2px) scale(1.04); }
.mh-cs-fab svg { width: 26px; height: 26px; }
.mh-cs-fab-x { position: absolute; opacity: 0; transform: rotate(-90deg) scale(0.6); transition: opacity 0.2s ease, transform 0.2s ease; }
.mh-cs-fab-chat { transition: opacity 0.2s ease, transform 0.2s ease; }
.mh-cs[data-open="true"] .mh-cs-fab { animation: none; }
.mh-cs[data-open="true"] .mh-cs-fab-chat { opacity: 0; transform: rotate(90deg) scale(0.6); }
.mh-cs[data-open="true"] .mh-cs-fab-x { opacity: 1; transform: rotate(0) scale(1); }

@keyframes mh-cs-pulse {
  0%, 100% { box-shadow: 0 10px 30px -6px rgba(0,0,0,0.55), 0 0 0 0 rgba(207,167,95,0.45); }
  50%      { box-shadow: 0 10px 30px -6px rgba(0,0,0,0.55), 0 0 0 12px rgba(207,167,95,0); }
}

/* ---- panel ---- */
.mh-cs-panel {
  position: absolute;
  bottom: 72px;
  width: 300px;
  max-width: calc(100vw - 40px);
  border-radius: 18px;
  border: 1px solid rgba(207, 167, 95, 0.28);
  background: linear-gradient(180deg, #1c1130 0%, #160d24 100%);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transform-origin: bottom right;
  animation: mh-cs-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.mh-cs--br .mh-cs-panel { right: 0; transform-origin: bottom right; }
.mh-cs--bl .mh-cs-panel { left: 0; transform-origin: bottom left; }
@keyframes mh-cs-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mh-cs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 14px;
  background: radial-gradient(120% 100% at 0% 0%, rgba(124, 91, 171, 0.35), transparent 60%);
  border-bottom: 1px solid rgba(207, 167, 95, 0.16);
}
.mh-cs-title { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: #f4ead7; }
.mh-cs-greet { margin: 5px 0 0; font-size: 12px; line-height: 1.5; color: #c8b6dd; }
.mh-cs-x {
  flex-shrink: 0;
  display: flex;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #c8b6dd;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.mh-cs-x:hover { color: #e8cd8f; background: rgba(255, 255, 255, 0.08); }
.mh-cs-x svg { width: 16px; height: 16px; }

.mh-cs-list { list-style: none; margin: 0; padding: 8px; }
.mh-cs-list li { margin: 0; }
.mh-cs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #f4ead7;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.mh-cs-row:hover { background: rgba(207, 167, 95, 0.1); }
.mh-cs-ic {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(207, 167, 95, 0.3);
  color: #e8cd8f;
  background: rgba(207, 167, 95, 0.06);
}
.mh-cs-ic svg { width: 19px; height: 19px; }
.mh-cs-lb { flex: 1; display: flex; flex-direction: column; line-height: 1.3; word-break: break-word; }
.mh-cs-lb small { color: #9785ac; font-size: 11px; margin-top: 1px; }
.mh-cs-caret { color: rgba(207, 167, 95, 0.6); font-size: 16px; flex-shrink: 0; }
.mh-cs-row[aria-expanded="true"] .mh-cs-caret { transform: rotate(45deg); }

.mh-cs-wechat { padding: 6px 10px 14px; text-align: center; }
.mh-cs-wechat img { width: 150px; max-width: 100%; border-radius: 10px; border: 1px solid rgba(207, 167, 95, 0.25); }
.mh-cs-wechat p { margin: 8px 0 0; font-size: 12px; color: #c8b6dd; }
.mh-cs-wechat strong { color: #e8cd8f; }

@media (prefers-reduced-motion: reduce) {
  .mh-cs-fab, .mh-cs-panel, .mh-cs-fab-chat, .mh-cs-fab-x { animation: none !important; transition: none !important; }
}
