/* ============================================================
   refine_ix1.css v1  ——  A档·第1批：焦点与表单状态反馈
   ------------------------------------------------------------
   安全边界（严守 gf47/48 事故教训）：
   只使用 outline / box-shadow / border-color / background /
   opacity / cursor / transition 这些【不参与盒模型】的属性。
   绝不改动任何尺寸类与间距类属性，也不改圆角与边框粗细。
   一键撤回：python3 /tmp/gf50_off.py
   ============================================================ */

/* ---- [F1] 输入框聚焦态（清单 A1）----
   实测基线：首页/国家页搜索框 h=70 圆角100px 白边；详情页留言
   textarea h=80 且 border-width=0（所以只改 border-color 无效）
   → 采用 inset 1px 描边 + 外 3px 光晕，既能给 border:0 的元素显形，
     又完全不占布局；对白底、深色 banner 两种底色都成立。 */
/* 注意：整条选择器必须写在一行。前面踩过坑——换行的 :not() 链
   会被浏览器解析成"后代选择器"，规则静默失效且不报错。 */
input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=reset]):not([type=file]):not([type=image]),
textarea,
select{
  transition:box-shadow .2s cubic-bezier(.22,.61,.36,1),
             border-color .2s cubic-bezier(.22,.61,.36,1) !important;
}

input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=reset]):not([type=file]):not([type=image]):focus,
textarea:focus,
select:focus{
  outline:none !important;
  border-color:#3a7bff !important;
  box-shadow:0 0 0 3px rgba(58,123,255,.18),
             inset 0 0 0 1px rgba(58,123,255,.55) !important;
}

/* layui 表单（后台/详情页可能用到）同步拉齐，避免绿色/灰色冲突 */
.layui-input:focus, .layui-textarea:focus, .layui-select:focus{
  border-color:#3a7bff !important;
  box-shadow:0 0 0 3px rgba(58,123,255,.18),
             inset 0 0 0 1px rgba(58,123,255,.55) !important;
}

/* ---- [F2] 键盘焦点环（清单 A3）----
   只在键盘导航时出现，鼠标点击不显示；排除轮播 slide 与第三方组件，
   防止出现意外的方框（gf48 事故同源防呆）。 */
a:focus-visible,
button:focus-visible,
[role=button]:focus-visible,
[tabindex]:focus-visible:not(.swiper-slide):not(.swiper-button-prev):not(.swiper-button-next){
  outline:2px solid #3a7bff !important;
  outline-offset:2px !important;
}

/* ---- [F3] 文字选中态（清单 A8）----
   只改背景不改前景色：避免深色区块上的白字被选中后变成黑字看不清。 */
::selection{
  background:rgba(58,123,255,.22) !important;
}
::-moz-selection{
  background:rgba(58,123,255,.22) !important;
}

/* ---- [F4] 不可用状态（清单 A10）----
   opacity 不占布局，安全。readonly 单独轻描淡写，避免误伤日期选择器。 */
input[disabled], textarea[disabled], select[disabled],
button[disabled], a.btn.disabled, .layui-btn-disabled,
.layui-btn[disabled]{
  opacity:.5 !important;
  cursor:not-allowed !important;
  box-shadow:none !important;
}
input[readonly]:not([disabled]), textarea[readonly]:not([disabled]){
  background-color:rgba(58,123,255,.04) !important;
}
