/* =====================================================================
 * iSSO 登录滑块验证码样式（配合 js/captcha.js）
 * 视觉沿用登录卡片的主色（#1d4ed8 → #2563eb），不引入任何外部字体/图标。
 * ===================================================================== */

.isso-cap {
    width: 100%;
    max-width: 340px;
    margin: 4px 0 18px;
    box-sizing: border-box;
}

.isso-cap__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.isso-cap__label {
    font-size: 13px;
    color: #475569;
    font-weight: 600;
    letter-spacing: .02em;
}

.isso-cap__refresh {
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
}
.isso-cap__refresh:hover { text-decoration: underline; }

/* 图片区域 */
.isso-cap__stage {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #e2e8f0;
    line-height: 0;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.isso-cap__bg {
    display: block;
    pointer-events: none;
}

.isso-cap__piece {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    will-change: transform;
    filter: drop-shadow(0 2px 4px rgba(15, 23, 42, .35));
}

.isso-cap__stage.is-dragging .isso-cap__piece {
    filter: drop-shadow(0 4px 10px rgba(37, 99, 235, .55));
}

/* 拖动条 */
.isso-cap__track {
    position: relative;
    margin-top: 10px;
    height: 42px;
    border-radius: 21px;
    background: #eef2f7;
    border: 1px solid #dbe3ef;
    overflow: hidden;
}

.isso-cap__bar {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #7b8aa3;
    line-height: 42px;
    text-align: center;
    pointer-events: none;
}

.isso-cap__btn {
    position: absolute;
    top: 50%;
    left: 3px;
    width: 36px;
    height: 36px;
    margin-top: -18px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #cfd9e8;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .16);
    cursor: grab;
    will-change: transform;
    /* 用 CSS 画一个右箭头，避免额外图片资源 */
    background-image:
        linear-gradient(45deg, transparent 48%, #2563eb 48%, #2563eb 56%, transparent 56%),
        linear-gradient(135deg, transparent 48%, #2563eb 48%, #2563eb 56%, transparent 56%);
    background-size: 8px 8px, 8px 8px;
    background-position: 62% 50%, 46% 50%;
    background-repeat: no-repeat;
}
.isso-cap__btn:active { cursor: grabbing; }

/* 成功 / 失败反馈 */
.isso-cap.is-ok .isso-cap__track { background: #e7f6ec; border-color: #a7e0bb; }
.isso-cap.is-ok .isso-cap__bar  { color: #16794a; font-weight: 600; }
.isso-cap.is-ok .isso-cap__btn  { border-color: #a7e0bb; }

.isso-cap.is-fail .isso-cap__track { background: #fdecec; border-color: #f3b7b7; }
.isso-cap.is-fail .isso-cap__bar  { color: #b42318; }
.isso-cap.is-fail .isso-cap__stage { animation: isso-cap-shake .4s; }

@keyframes isso-cap-shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-5px); }
    75%      { transform: translateX(5px); }
}

/* 顶部提示条（服务端拦截后回显） */
.isso-cap__alert {
    display: none;
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fdecec;
    border: 1px solid #f3b7b7;
    color: #b42318;
    font-size: 13px;
    line-height: 1.5;
}
