/**
 * Input 组件样式 - 100% 一比一复刻 MUI
 * 对应 MUI: packages/mui-material/src/Input/Input.js
 */

/* =============================================
   Root 基础样式
   ============================================= */
.MuiInput-root {
  position: relative;
}

/* =============================================
   下划线样式
   ============================================= */
.MuiInput-underline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.42);
  pointer-events: none;
  transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
}

.MuiInput-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-bottom: 2px solid #1976d2;
  transform: scaleX(0);
  pointer-events: none;
  transition: transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
}

/* 聚焦状态 */
.MuiInput-underline.Mui-focused::after {
  transform: scaleX(1);
}

/* Hover 状态 */
.MuiInput-underline:not(.Mui-disabled):not(.Mui-error)::before {
  border-bottom-color: rgba(0, 0, 0, 0.87);
}

/* 禁用状态 */
.MuiInput-underline.Mui-disabled::before {
  border-bottom-style: dotted;
}

/* 错误状态 */
.MuiInput-underline.Mui-error::before {
  border-bottom-color: #d32f2f;
}

.MuiInput-underline.Mui-error::after {
  border-bottom-color: #d32f2f;
}

/* Secondary 颜色 */
.MuiInput-colorSecondary.MuiInput-underline::after {
  border-bottom-color: #9c27b0;
}

/* =============================================
   Input 元素样式
   ============================================= */
.MuiInput-input {
  padding: 4px 0 5px;
}

/* 尺寸变体 */
.MuiInput-inputSizeSmall {
  padding-top: 1px;
}

/* 多行 */
.MuiInput-inputMultiline {
  padding: 0;
}
