/* L2 shared: public-page contact drawer + floating support bot. Do not put cover look here. */

html .contact-bot-launcher,
html .contact-bot-launcher:hover,
html .contact-bot-launcher:focus,
html .contact-bot-launcher:active,
html .contact-bot-launcher:disabled:hover {
  --bot-size: 140px;
  --bot-height: 148px;
  position: fixed;
  right: 24px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px) + var(--mm3d-fixed-bottom-lift, 0px));
  z-index: 105;
  display: block;
  box-sizing: border-box;
  width: max-content;
  height: calc(var(--bot-height) + 40px);
  max-width: calc(100vw - 16px);
  line-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-image: none;
  color: inherit;
  box-shadow: none;
  cursor: grab;
  overflow: visible;
  appearance: none;
  -webkit-appearance: none;
  touch-action: none;
  user-select: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.contact-bot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-bot-stage {
  position: relative;
  display: block;
  width: var(--bot-size);
  height: var(--bot-height);
  flex: 0 0 var(--bot-height);
  overflow: visible;
  transform-origin: 50% 70%;
  transition: transform 0.18s ease;
}

.contact-bot-glow {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 0;
  width: 86%;
  height: 72%;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(80, 186, 255, 0.34) 0%, rgba(48, 140, 230, 0.12) 48%, transparent 76%);
  filter: blur(12px);
  transform: translate(-50%, -50%);
  animation: contact-bot-breathe 4.6s ease-in-out infinite;
}

.contact-bot-motion {
  position: relative;
  z-index: 1;
  display: block;
  width: var(--bot-size);
  height: var(--bot-height);
  animation: contact-bot-float 4.6s ease-in-out infinite;
}

.contact-bot-motion img {
  display: block;
  width: var(--bot-size);
  max-width: var(--bot-size);
  height: var(--bot-height);
  max-height: var(--bot-height);
  object-fit: contain;
  pointer-events: none;
}

.contact-bot-label {
  z-index: 1;
  margin-top: 7px;
  padding: 5px 14px;
  border: 1px solid rgba(126, 196, 255, 0.58);
  border-radius: 999px;
  background: #0a2445;
  color: #fff;
  box-shadow: 0 6px 14px rgba(8, 22, 42, 0.26);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  white-space: nowrap;
  width: max-content;
  max-width: none;
}

html .contact-bot-launcher.is-custom-pos {
  right: auto;
  bottom: auto;
}

html .contact-bot-launcher.is-dragging {
  cursor: grabbing;
}

html .contact-bot-launcher.is-dragging .contact-bot-motion,
html .contact-bot-launcher.is-dragging .contact-bot-glow {
  animation-play-state: paused;
}

html .contact-bot-launcher:hover .contact-bot-stage,
html .contact-bot-launcher:focus-visible .contact-bot-stage,
html .contact-bot-launcher.is-hover-preview .contact-bot-stage {
  transform: scale(1.03);
}

html .contact-bot-launcher:hover .contact-bot-glow,
html .contact-bot-launcher:focus-visible .contact-bot-glow,
html .contact-bot-launcher.is-hover-preview .contact-bot-glow {
  width: 108%;
  height: 92%;
  opacity: 1;
  filter: blur(14px);
  background: radial-gradient(circle, rgba(96, 196, 255, 0.5) 0%, rgba(56, 150, 240, 0.16) 50%, transparent 78%);
}

html .contact-bot-launcher:active .contact-bot-stage {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

.contact-bot-launcher:focus-visible,
.contact-drawer-close:focus-visible,
.contact-drawer button:focus-visible,
.contact-drawer input:focus-visible,
.contact-drawer select:focus-visible,
.contact-drawer textarea:focus-visible {
  outline: 3px solid #f0b536;
  outline-offset: 3px;
}

html.contact-drawer-open .contact-bot-launcher,
.contact-bot-launcher.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.contact-bot-launcher.is-paused .contact-bot-motion,
.contact-bot-launcher.is-paused .contact-bot-glow {
  animation-play-state: paused;
}

@keyframes contact-bot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes contact-bot-breathe {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

html.contact-drawer-open,
body.contact-drawer-open {
  overflow: hidden;
}

.contact-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(6, 22, 25, 0.54);
  opacity: 0;
  transition: opacity 0.26s ease;
}

.contact-drawer-overlay.is-open {
  opacity: 1;
}

.contact-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 120;
  width: min(470px, calc(100vw - 40px));
  height: 100dvh;
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0, rgba(35, 139, 149, 0.22), transparent 34%),
    #0a2445;
  color: #fff;
  padding: 76px 36px 36px;
  box-shadow: -24px 0 70px rgba(4, 20, 23, 0.34);
  transform: translateX(100%);
  transition: transform 0.26s ease;
}

/* Lock drawer type to the FAQ-page look. Beat page-level h2 serif rules. */
html body .contact-drawer,
html body .contact-drawer h1,
html body .contact-drawer h2,
html body .contact-drawer h3,
html body .contact-drawer p,
html body .contact-drawer label,
html body .contact-drawer input,
html body .contact-drawer select,
html body .contact-drawer textarea,
html body .contact-drawer button,
html body .contact-drawer .contact-drawer-notice {
  font-family: var(--mm3d-body-sans, "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", Arial, sans-serif);
  font-variation-settings: normal;
  font-synthesis: weight style;
  -webkit-text-stroke: 0;
  paint-order: normal;
  letter-spacing: 0;
}

.contact-drawer.is-open {
  transform: translateX(0);
}

.contact-drawer-close {
  position: absolute;
  top: 22px;
  right: 24px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

html body .contact-drawer h2,
.contact-drawer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
}

.contact-drawer > p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.7;
}

.contact-drawer-form {
  display: grid;
  gap: 14px;
}

.contact-drawer-form label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 700;
}

.contact-drawer-form input,
.contact-drawer-form select,
.contact-drawer-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-weight: 500;
  padding: 10px 12px;
}

.contact-drawer-form select option {
  color: #102033;
}

.contact-drawer-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-drawer-notice {
  margin: 0;
  color: #cfe8ff;
  font-size: 14px;
  line-height: 1.55;
}

.contact-drawer-notice.is-error {
  color: #ffd0a8;
}

.contact-drawer-form button[type="submit"] {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: #ff9d24;
  color: #302303;
  font-weight: 900;
  cursor: pointer;
}

.contact-drawer-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (prefers-reduced-motion: reduce) {
  .contact-bot-motion,
  .contact-bot-glow,
  .contact-bot-stage {
    animation: none;
    transition: none;
    filter: none;
    transform: none;
  }

  html .contact-bot-launcher:hover .contact-bot-stage,
  html .contact-bot-launcher:focus-visible .contact-bot-stage,
  html .contact-bot-launcher:active .contact-bot-stage,
  html .contact-bot-launcher.is-hover-preview .contact-bot-stage {
    transform: none;
  }
}

@media (max-width: 1100px) {
  html .contact-bot-launcher,
  html .contact-bot-launcher:hover,
  html .contact-bot-launcher:focus,
  html .contact-bot-launcher:active {
    --bot-size: 110px;
    --bot-height: 116px;
  }
}

@media (max-width: 700px) {
  html .contact-bot-launcher,
  html .contact-bot-launcher:hover,
  html .contact-bot-launcher:focus,
  html .contact-bot-launcher:active {
    --bot-size: 86px;
    --bot-height: 91px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px) + var(--mm3d-fixed-bottom-lift, 0px));
    max-width: calc(100vw - 16px);
  }

  .contact-bot-label {
    font-size: 14px;
    padding: 4px 12px;
  }

  .contact-drawer {
    top: auto;
    bottom: 0;
    width: 100%;
    height: auto;
    max-height: min(88dvh, 760px);
    border-radius: 18px 18px 0 0;
    padding: 62px 22px 28px;
    transform: translateY(100%);
  }

  .contact-drawer.is-open {
    transform: translateY(0);
  }
}
