/* 滑块人机校验样式（登录页「获取验证码」气泡、找回密码页共用；结构见 partials.html 的 slide）。
   版式照 go-captcha 的 Slide 组件，与官网、浏览器控制台（go-captcha-vue / go-captcha-react 2.0.x）同一套外观；
   下面 .go-captcha 段落改写自 go-captcha-vue/dist/style.css，只保留滑块用到的部分并限定在 .hs-slide 内：
     MIT License — Copyright (c) 2021 Awen <wengaolng@gmail.com>
     Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
     documentation files (the "Software"), to deal in the Software without restriction, including without limitation
     the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
     permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright
     notice and this permission notice shall be included in all copies or substantial portions of the Software.
     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
   配色换成认证页的深色品牌色（与浏览器控制台按自身主题覆写 --go-captcha-theme-* 的做法相同）。 */

.hs-slide {
  --go-captcha-theme-text-color: #E4E6E9;
  --go-captcha-theme-bg-color: #1B1F26;
  --go-captcha-theme-icon-color: #9DA3AB;
  --go-captcha-theme-border-color: rgba(255, 255, 255, .1);
  --go-captcha-theme-drag-bar-color: rgba(255, 255, 255, .12);
  --go-captcha-theme-drag-bg-color: #094DFF;
  --go-captcha-theme-drag-icon-color: #FFFFFF;
  --go-captcha-theme-btn-disabled-color: #3A4250;
  --go-captcha-theme-loading-icon-color: #3D7BFF;
  --go-captcha-theme-body-bg-color: #11141A;
  --hs-slide-w: 300px;                 /* 画面逻辑宽度，slide.js 按挑战 image_width 改写 */
  width: 100%;
  max-width: calc(var(--hs-slide-w) + 26px); /* 左右内边距 12 + 边框 1 */
}

.hs-slide.go-captcha.gc-wrapper { padding: 16px 12px; user-select: none; -webkit-user-select: none; box-sizing: border-box; }
.hs-slide.go-captcha.gc-theme {
  border: 1px solid var(--go-captcha-theme-border-color);
  border-radius: 8px;
  background-color: var(--go-captcha-theme-bg-color);
  box-shadow: 0 0 20px rgba(0, 0, 0, .35);
}
.hs-slide .gc-header { height: 36px; width: 100%; display: flex; align-items: center; font-size: 15px; color: var(--go-captcha-theme-text-color); }
.hs-slide .gc-header > span { flex: 1; padding-right: 5px; }
.hs-slide .gc-icon-block { display: flex; align-items: center; }
.hs-slide__icon {
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 0 0 6px; padding: 2px; border: 0; border-radius: 4px; background: none; cursor: pointer;
  color: var(--go-captcha-theme-icon-color); fill: var(--go-captcha-theme-icon-color);
}
.hs-slide__icon svg { width: 22px; height: 22px; fill: currentColor; }
.hs-slide__icon:hover { color: #FFFFFF; }
.hs-slide__icon:focus-visible { outline: 2px solid #3D7BFF; outline-offset: 1px; }
.hs-slide__tip { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: #9DA3AB; }
.hs-slide__tip.is-error { color: #FF8A87; }
.hs-slide .gc-body {
  position: relative; width: 100%; margin-top: 10px; overflow: hidden; border-radius: 5px;
  background: var(--go-captcha-theme-body-bg-color);
  aspect-ratio: 300 / 220;             /* slide.js 按挑战 image_width / image_height 改写 */
}
.hs-slide .gc-picture { position: relative; z-index: 2; display: block; width: 100%; height: 100%; }
.hs-slide .gc-loading {
  position: absolute; z-index: 1; top: 50%; left: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px;
  display: flex; align-items: center; justify-content: center;
}
.hs-slide .gc-loading svg, .hs-slide .gc-loading circle { fill: var(--go-captcha-theme-loading-icon-color); }
.hs-slide .gc-tile { position: absolute; z-index: 3; top: 0; left: 0; pointer-events: none; }
.hs-slide .gc-tile img { display: block; width: 100%; height: 100%; max-width: none; }
.hs-slide .gc-footer { width: 100%; height: 50px; padding-top: 10px; display: flex; align-items: center; }
.hs-slide .gc-drag-slide-bar { position: relative; width: 100%; height: 100%; touch-action: none; }
.hs-slide .gc-drag-line {
  position: absolute; left: 0; right: 0; top: 50%; height: 14px; margin-top: -7px; border-radius: 7px;
  background-color: var(--go-captcha-theme-drag-bar-color);
}
.hs-slide .gc-drag-block {
  position: absolute; z-index: 2; left: 0; top: 50%; width: 82px; height: 40px; margin-top: -20px;
  display: flex; align-items: center; justify-content: center; border-radius: 24px; cursor: grab;
  background-color: var(--go-captcha-theme-drag-bg-color);
  color: var(--go-captcha-theme-drag-icon-color); fill: var(--go-captcha-theme-drag-icon-color);
  box-shadow: 0 0 20px rgba(9, 77, 255, .35);
  touch-action: none;
}
.hs-slide .gc-drag-block:active { cursor: grabbing; }
.hs-slide .gc-drag-block:focus-visible { outline: 2px solid #8DB4FF; outline-offset: 2px; }
.hs-slide .gc-drag-block.disabled { pointer-events: none; background-color: var(--go-captcha-theme-btn-disabled-color); box-shadow: none; }
.hs-slide .gc-drag-block-inline { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.hs-slide .gc-drag-block-inline svg { width: 20px; height: 20px; fill: currentColor; }
/* 未启用滑块（页面没有公钥）：只留提示 */
.hs-slide.is-off .gc-body, .hs-slide.is-off .gc-footer, .hs-slide.is-off [data-slide-refresh] { display: none; }

/* ---------- 登录页：气泡贴着验证码那一行弹出（上方放不下翻到下方），带小三角 ---------- */
.hs-slide-pop { position: fixed; z-index: 60; top: 0; left: 0; }
.hs-slide-pop[hidden] { display: none; }
.hs-slide-pop .hs-slide { width: calc(var(--hs-slide-w) + 26px); max-width: calc(100vw - 16px); }
.hs-slide-pop__arrow {
  position: absolute; left: var(--hs-arrow-x, 50%); width: 10px; height: 10px;
  background: #1B1F26; border: 1px solid rgba(255, 255, 255, .1);
  transform: translateX(-50%) rotate(45deg); pointer-events: none;
}
.hs-slide-pop[data-place="top"] .hs-slide-pop__arrow { bottom: -5px; border-top: 0; border-left: 0; }
.hs-slide-pop[data-place="bottom"] .hs-slide-pop__arrow { top: -5px; border-right: 0; border-bottom: 0; }
