/*
 * FlintHub — 极验滑块验证 V3 · 前台样式（浮层 + 提示条）
 * @file plugins/geetest_v3/assets/style.css
 *
 * 主题安全：所有颜色/圆角/阴影取核心 --mn-* 变量并给浅色兜底值，
 * 深色主题（themes/*.css 覆写变量）自动跟随，插件不写任何写死的配色。
 * 命名一律 gt3- 前缀，绝不覆盖核心类。
 */

/* 打开浮层时锁定页面滚动 */
body.gt3-lock {
    overflow: hidden;
}

/* ===== 遮罩 ===== */
.gt3-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--mn-comp-overlay-bg, rgba(0, 0, 0, .55));
}

.gt3-mask .gt3-dialog {
    width: 100%;
    max-width: 360px;
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 10px;
    box-shadow: var(--mn-shadow-float, 0 12px 32px rgba(0, 0, 0, .18));
    overflow: hidden;
}

/* 入场动画：终态写在普通规则里，动画只负责「从哪来」。
   ⚠️ 不要把 opacity:0 / transform 当基线、靠动画的 forwards 补终值 ——
   系统关掉动效时（Windows「显示动画」关闭 → prefers-reduced-motion: reduce）
   下面那条 animation:none 会连终值一起抽走，浮层变成一块永久透明的遮罩：
   它照样盖住整页吃掉点击，用户只会看到「点了提交什么也没发生」。 */
.gt3-mask {
    animation: gt3-fade .18s ease;
}
.gt3-mask .gt3-dialog {
    animation: gt3-rise .18s ease;
}

@keyframes gt3-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes gt3-rise {
    from { transform: translateY(6px); }
    to   { transform: translateY(0); }
}

/* ===== 头部 ===== */
.gt3-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--mn-border-light, #f0f0f0);
}

.gt3-dialog-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--mn-text, #1f2937);
}

.gt3-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    color: var(--mn-text-muted, #6b7280);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.gt3-dialog-close:hover {
    color: var(--mn-text, #1f2937);
    background: var(--mn-bg-row-hover, rgba(0, 0, 0, .05));
}

/* ===== 承载页 iframe ===== */
.gt3-frame {
    display: block;
    width: 100%;
    height: 220px;
    border: 0;
    background: transparent;
}

/* ===== 底部提示 ===== */
.gt3-dialog-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px 12px;
    border-top: 1px solid var(--mn-border-light, #f0f0f0);
}

.gt3-tip {
    flex: 1 1 auto;
    font-size: 12px;
    line-height: 1.5;
    color: var(--mn-text-muted, #6b7280);
}
.gt3-tip.is-error {
    color: var(--mn-comp-alert-error-text, #dc2626);
}

.gt3-retry {
    flex: 0 0 auto;
    padding: 5px 12px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--mn-primary, #2563eb);
    background: var(--mn-bg-input, #fff);
    border: 1px solid var(--mn-primary, #2563eb);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.gt3-retry:hover {
    color: var(--mn-text-inverse, #fff);
    background: var(--mn-primary, #2563eb);
}

.gt3-hidden {
    display: none;
}

/* ===== 闸门回跳提示条 ===== */
.gt3-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 10000;
    max-width: min(90vw, 420px);
    padding: 10px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--mn-comp-alert-error-text, #b91c1c);
    background: var(--mn-comp-alert-error-bg, #fef2f2);
    border: 1px solid var(--mn-comp-alert-error-border, #fecaca);
    border-radius: 8px;
    box-shadow: var(--mn-shadow, 0 4px 12px rgba(0, 0, 0, .1));
    transform: translate(-50%, 12px);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
}
.gt3-toast.is-in {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* 移动端：浮层贴底，避免小屏上按钮被键盘遮挡 */
@media (max-width: 480px) {
    .gt3-mask {
        padding: 12px;
        align-items: flex-end;
    }
    .gt3-mask .gt3-dialog {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gt3-mask,
    .gt3-mask .gt3-dialog {
        animation: none;
    }
    .gt3-toast {
        transition: none;
    }
}
