/* ============================================================
   UI 优化：移除点击 / 聚焦时的蓝色高亮
   说明：本文件为覆盖层样式，位于主样式之后加载，仅修改视觉反馈，
        不影响原有页面结构与功能。如需还原，删除本文件并在
        index.html 中移除对应 <link> 即可。
   ============================================================ */

/* 1. 移除移动端点击/触摸元素时的蓝色高亮闪烁 */
*,
*::before,
*::after {
  -webkit-tap-highlight-color: transparent !important;
}

html,
body,
#app {
  -webkit-tap-highlight-color: transparent !important;
}

/* 2. 移除鼠标点击时浏览器自带的蓝色焦点描边（键盘 Tab 聚焦仍保留提示） */
:focus:not(:focus-visible) {
  outline: none !important;
}

/* 3. 移除 Element Plus 按钮聚焦时的蓝色外框（Safari/iOS 点击也会触发） */
.el-button:focus-visible,
.el-button:focus {
  outline: none !important;
}

/* 4. 移除 Element Plus 输入框 / 下拉框 / 级联选择器聚焦时的蓝色光圈 */
.el-input__wrapper.is-focus,
.el-select__wrapper.is-focused,
.el-cascader .el-input.is-focus .el-input__wrapper {
  box-shadow: none !important;
}

/* 5. 登录页输入框聚焦时的蓝色边框与光圈改为中性色 */
.form-group input:focus {
  border-color: #c0c4cc !important;
  box-shadow: none !important;
}

/* 6. 兜底：其他自定义输入控件聚焦光圈 */
input:focus,
textarea:focus,
select:focus {
  box-shadow: none;
}

/* 7. 触摸设备：点击后不再残留 hover 蓝色高亮（桌面端鼠标悬停效果保留） */
@media (hover: none) {
  .oauth-btn:hover {
    border-color: #e5e5e5 !important;
    background: #fff !important;
  }

  .btn-submit:hover:not(:disabled) {
    transform: none !important;
    box-shadow: none !important;
  }

  .back-home a:hover {
    color: #86868b !important;
  }
}

/* 8. 按钮点击动画：按下时轻微缩放 + 变暗，松开回弹 */
button,
a,
[role="button"],
.el-button,
.btn-17,
.btn-block-main,
.btn-block-secondary,
.btn-recharge,
.btn-get,
.btn-info,
.btn-cancel,
.btn-confirm,
.btn-import-cert,
.btn-cert-action,
.btn-download,
.btn-copy,
.btn-reason,
.btn-delete,
.btn-outline,
.btn-main,
.menu-item,
.theme-toggle,
.agency-theme,
.oauth-btn,
.cert-check-button,
.get-btn,
.dock-btn {
  transition: transform 0.12s ease, filter 0.12s ease !important;
}

button:not(:disabled):active,
a:active,
[role="button"]:active,
.el-button:not(.is-disabled):active,
.btn-17:active,
.btn-block-main:active:not(:disabled),
.btn-block-secondary:active:not(:disabled),
.btn-recharge:active,
.btn-get:active,
.btn-info:active,
.btn-cancel:active,
.btn-confirm:active:not(:disabled),
.btn-import-cert:active,
.btn-cert-action:active,
.btn-download:active,
.btn-copy:active,
.btn-reason:active,
.btn-delete:active:not(:disabled),
.btn-outline:active,
.btn-main:active,
.menu-item:active,
.theme-toggle:active,
.agency-theme:active,
.oauth-btn:active,
.cert-check-button:active,
.get-btn:active,
.dock-btn:active {
  transform: scale(0.95) !important;
  filter: brightness(0.92) !important;
}

/* 9. 安装应用弹窗：高级选项展开过渡动画 */
.advanced-options {
  animation: adv-opt-in 0.28s ease;
}
@keyframes adv-opt-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 10. 弹窗打开时禁止背景页面滚动（只能滚动弹窗内容） */
body:has(.modal-overlay) {
  overflow: hidden;
}


