/* form-common.css - 폼 요소 공통 스타일 (design.css의 input.design 기준) */

/* 0. SELECT 화살표 기본 복원 (2026-08-20)
   design.css가 select 전역에 appearance:none + select.gif 화살표를 주지만,
   i_footer의 /css/pop/style.css → @import general.css 가
   `input,select{background:#fff}` + `...,select{padding:0}` 로 화살표 이미지·자리를 지워
   화면마다 화살표가 사라졌다(그래서 아래 2절이 selector 열거로 반복 복구해 왔음).
   html select(0,0,2)로 pop reset(0,0,1)만 이기고, 커스텀 화살표(.ai-control-panel select 등
   0,1,1)·datepicker(!important)·아래 열거 규칙(!important)은 그대로 우선한다. !important 금지. */
html select {
    background: #fff url('/totalAdmin/images/select.gif') right center no-repeat;
    padding: 1px 22px 4px 8px;
}
html select[multiple] {
    background-image: none;
    padding: 2px 8px;
}

/* 1. TEXT/NUMBER/DATE INPUTS */
/* .form-input: shared input styling outside table layouts */
/* !important: inline style="height:30px" 등 1차 프로젝트 하드코딩 오버라이드 */
.table_form td input[type="text"],
.table_form td input[type="number"],
.table_form td input[type="date"],
.table_form td input[type="email"],
.table_form td input[type="tel"],
.table_form td input[type="password"],
.table_form td input[type="search"],
.table_list td input[type="text"],
.table_list td input[type="number"],
input.form-input {
    border: 1px solid #d9dee3;
    background: #fff;
    box-sizing: border-box;
    padding: 6px 10px !important;
    font-size: 13px;
    height: 36px !important;
    line-height: normal;
    color: #666;
    outline: none;
    border-radius: 3px;
}

/* Hover (:not(:focus)로 focus 상태에선 적용 안 됨) */
.table_form td input:hover:not(:focus):not([type="radio"]):not([type="checkbox"]):not(:disabled):not([readonly]),
.table_list td input:hover:not(:focus):not(:disabled),
input.form-input:hover:not(:focus):not(:disabled):not([readonly]) {
    border-color: #aaa;
}

/* Focus */
.table_form td input:focus:not([type="radio"]):not([type="checkbox"]),
.table_list td input:focus,
input.form-input:focus {
    border-color: #3f51b5;
    color: #333;
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.1);
}

/* Disabled/Readonly */
.table_form td input:disabled,
.table_form td input[readonly],
.table_list td input:disabled,
input.form-input:disabled,
input.form-input[readonly] {
    background: #f5f5f5;
    cursor: no-drop;
}

/* 2. SELECT - !important로 inline style + appearance:menulist 오버라이드 */
.table_form td select,
.table_list td select,
#pageSizeSelect,
#tpl-select,
.approver-select {
    border: 1px solid #d9dee3;
    padding: 6px 30px 6px 10px !important;
    font-size: 13px !important;
    height: 36px !important;
    line-height: normal;
    background: #fff url('/totalAdmin/images/select.gif') right center no-repeat !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    -moz-appearance: none !important;
    box-sizing: border-box;
    color: #666;
    cursor: pointer;
    outline: none;
    border-radius: 3px;
}

.table_form td select:hover:not(:focus),
.table_list td select:hover:not(:focus),
#pageSizeSelect:hover:not(:focus),
#tpl-select:hover:not(:focus),
.approver-select:hover:not(:focus) {
    border-color: #aaa;
}

.table_form td select:focus,
.table_list td select:focus,
#pageSizeSelect:focus,
#tpl-select:focus,
.approver-select:focus {
    border-color: #3f51b5;
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.1);
}

.table_form td select::-ms-expand,
.table_list td select::-ms-expand,
#pageSizeSelect::-ms-expand,
#tpl-select::-ms-expand,
.approver-select::-ms-expand {
    display: none;
}

/* 3. TEXTAREA */
.table_form td textarea {
    border: 1px solid #d9dee3;
    background: #fff;
    box-sizing: border-box;
    padding: 10px;
    font-size: 13px;
    color: #666;
    outline: none;
    border-radius: 3px;
}

.table_form td textarea:focus {
    border-color: #3f51b5;
    color: #333;
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.1);
}

/* 4. RADIO/CHECKBOX 보호 */
.table_form td input[type="radio"],
.table_form td input[type="checkbox"] {
    border: initial;
    height: auto;
    padding: 0;
    background: transparent;
}

/* 5. SEARCH FORM TH - 줄바꿈 방지 */
.table_form th {
    white-space: nowrap;
}

/* 6. BUTTON 스타일 통일 (Bill 기준) */
/* body 접두사로 design.css !important 보다 높은 specificity 확보 */
body .c_btn {
    border-radius: 3px;
    font-size: 13px !important;
}

/* 색상 클래스 없는 기본 버튼: 흰색 → 밝은 회색 (목록/취소/관리 등) */
body .c_btn:not(.green):not(.blue):not(.red):not(.black) {
    background: #efefef;
    border-color: #ccc;
}

/* 6b. BUTTON 검색폼 크기 통일 (h27 27px → 32px, input 36px와 시각적 균형) */
/* .sm = 2차 프로젝트 시맨틱 별칭, .h27 = 1차 프로젝트 호환 */
body .c_btn.h27,
body .c_btn.sm {
    height: 32px !important;
    line-height: 28px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    box-sizing: border-box;
    vertical-align: middle;
}

/* input[type=button]/button 요소는 line-height 대신 padding으로 수직 중앙 */
body input.c_btn.h27,
body button.c_btn.h27,
body input.c_btn.sm,
body button.c_btn.sm {
    line-height: normal !important;
    padding: 4px 12px !important;
}

/* span.c_btn 내부 input 통일 (design.css line 35 오버라이드) */
body span.c_btn.h27 input,
body span.c_btn.sm input {
    padding: 4px 11px !important;
}

/* 7. DATEPICKER 변환 input 스타일 */
/* readonly 배경 흰색 유지 */
.table_form td input.dp-done[readonly],
input.form-input.dp-done[readonly]:not(:disabled) {
    background: #fff;
    cursor: pointer;
}
/* 1차 프로젝트 input.design 변환 후 너비 최적화 (기본 190px → 130px) */
input.design.dp-done {
    width: 130px;
    float: none;
    margin-right: 0;
}
/* date-pick-wrap: inline-flex로 인라인 배치 (float 사용 안 함 → ~ 텍스트 밀림 방지) */
.date-pick-wrap {
    margin-right: 5px;
}

/* 8. CURRENCY-INPUT 보존 */
.table_form td input.currency-input {
    text-align: right;
}
