/* 공용 입력칸 TextField(테두리 · 모서리 · 글자 · 상태만) - 시안 TextField/Input 6178:23931(기본) · 6178:23932(포커스) · 6178:23617(에러).
   apply 원본이고 m · t 는 바이트까지 같은 복사본이다(tests/CjbAssetParityTest.php). 화면마다 다른 폭 · 말줄임 · 글자색은 화면 CSS 가 덮는다.
   셀렉터를 input.fstd-input(0,1,1)으로 둔다 - 옛 공통 CSS(p_common.css)의 input[type="text"](높이 50 · 모서리 5 · 들여쓰기 16)와 특정도가 같아 그 뒤에 싣는다(뷰 <link> 는 header 뒤라 맞다). */

/* 포커스 틸은 --fstd-brand 로 걸지 않는다 - 부고 화면(cjb-theme.css)이 --fstd-brand 를 코랄로 덮어도 입력칸 포커스는 틸이다. */
:root {
    --fstd-input-value: #242729;                                /* input/value/activated */
    --fstd-input-placeholder: #95989b;                          /* input/value/placeholder */
    --fstd-input-focus: #00b5c2;                                /* input/border/focused */
    --fstd-input-focus-ring: 0 0 0 3px rgba(0, 181, 194, 0.16); /* Focus-ring/faint */
    --fstd-input-error: #e02820;                                /* stroke/error/solid */
    --fstd-input-error-ring: 0 0 0 3px rgba(224, 40, 32, 0.12); /* Focus-ring/error */
    /* 비활성은 입력칸 시안에 없는 상태 - t 부고장 작성 폼(t/css/cjb-form.css .cjb-field__input:disabled)이 이미 쓰는 값을 그대로 둔다.
       바탕 layer/surface/normal/faint · 글자 button/brand/solid/label/disabled. 옛 p_common.css 비활성(#f6f6f6 · 테두리 #cdcdcd)은 따르지 않는다 */
    --fstd-input-disabled-bg: #f7f8f9;
    --fstd-input-disabled-value: #acafb1;
}

/* 48 - 세로 padding 10(10 + 줄 23 + 10 + 테두리 2 = 45, 48 안에 든다) */
input.fstd-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 10px 16px;
    text-indent: 0;
    border: 1px solid var(--fstd-stroke-shy);                   /* input/border/default */
    -webkit-border-radius: 4px;
    border-radius: 4px;
    background-color: var(--fstd-surface);                      /* input/bg/default */
    color: var(--fstd-input-value);
    font-family: 'Pretendard', 'font-r', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 23px;
    letter-spacing: -0.32px;
    -webkit-appearance: none;
    appearance: none;
}

/* 40 - 버튼 옆 칸(시안 [code]input+btn, fstd-button--md 와 같은 높이). 세로 padding 10 은 40 에 들지 않아 뺀다 */
input.fstd-input--md {
    height: 40px;
    padding-top: 0;
    padding-bottom: 0;
}

input.fstd-input::placeholder {
    color: var(--fstd-input-placeholder);
    opacity: 1;
}

/* 포커스(입력 중)는 틸 테두리 + 링 하나다. 글자 칸은 누르기만 해도 :focus-visible 이 맞아 공용 윤곽선(.cjb-sheet :focus-visible 등 0,2,0)이
   링 바깥에 겹친다 - 이 규칙(0,2,1)이 윤곽선을 끈다. 읽기 전용 칸도 포커스는 같은 모양이다(키보드로 와도 어디 있는지 보이게). */
input.fstd-input:focus {
    border-color: var(--fstd-input-focus);
    box-shadow: var(--fstd-input-focus-ring);
    outline: none;
}

/* 에러 - 칸에 aria-invalid="true" 를 단다. 위 포커스와 특정도가 같아 뒤에 둬야 포커스 중에도 빨갛다 */
input.fstd-input[aria-invalid="true"] {
    border-color: var(--fstd-input-error);
    box-shadow: var(--fstd-input-error-ring);
}

/* 비활성 - p_common.css 의 input[type="text"]:disabled(0,2,1 · 회색 바탕 · 테두리 #cdcdcd)와 특정도가 같아 뒤에 실려 이긴다 */
input.fstd-input:disabled {
    border-color: var(--fstd-stroke-shy);
    background-color: var(--fstd-input-disabled-bg);
    color: var(--fstd-input-disabled-value);
    -webkit-text-fill-color: var(--fstd-input-disabled-value);
    opacity: 1;
}
