@charset "utf-8";
/* consult-modal.css — 법률상담신청 우측 드로어 (Figma 5223:2532)
   접두사 csm_ : About us 상담안내 페이지(consult.css .cs_)와 충돌 방지 */

.csm { position: fixed; inset: 0; z-index: 10000; visibility: hidden; transition: visibility 0s .34s; }
.csm.on { visibility: visible; transition: visibility 0s 0s; }

/* 배경 딤 */
.csm_dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity .3s ease; }
.csm.on .csm_dim { opacity: 1; }

/* ── 우측 드로어 패널 ── */
.csm_panel {
    position: absolute; top: 0; right: 0;
    width: 500px; max-width: 100%; height: 100%;
    background: #20262b;
    transform: translateX(100%);
    transition: transform .34s cubic-bezier(.22, .61, .36, 1);
    word-break: keep-all; overflow-wrap: break-word;
}
.csm.on .csm_panel { transform: translateX(0); }

.csm_close {
    position: absolute; top: 18px; right: 18px; z-index: 2;
    width: 34px; height: 34px; padding: 0;
    background: none; border: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: .8; transition: opacity .15s;
}
.csm_close:hover { opacity: 1; }

/* 내부 스크롤 영역 — 내용이 짧으면 세로 중앙, 길면 위부터 스크롤 */
.csm_inner { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.csm_inner > .csm_form,
.csm_inner { }
.csm_inner::-webkit-scrollbar { width: 0; }

/* form + foot 을 세로 중앙 정렬(짧을 때) / 위정렬(길 때) */
.csm_inner { display: flex; flex-direction: column; }
.csm_form,
.csm_foot { width: 399px; max-width: 100%; margin-left: 51px; margin-right: 50px; box-sizing: border-box; }
.csm_form { margin-top: auto; padding-bottom: 60px; border-bottom: 1px solid #313b42; }
.csm_foot { margin-top: 80px; margin-bottom: auto; padding-bottom: 40px; }
.csm_inner { padding-top: 40px; }

/* 헤딩 */
.csm_head { color: #fff; }
.csm_head_sm { margin: 0; font-weight: 400; font-size: 16px; line-height: 1.4; letter-spacing: -0.64px; }
.csm_title { margin: 6px 0 0; font-weight: 700; font-size: 30px; line-height: 1.4; letter-spacing: -1.2px; }

/* 상담분야 */
.csm_field_cate { margin-top: 30px; }
.csm_label { margin: 0; font-weight: 400; font-size: 16px; line-height: 1.4; color: #fff; }
.csm_req { color: #c50000; }
.csm_cats { display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 2px; margin-top: 10px; }
.csm_cat { display: inline-flex; align-items: center; gap: 10px; height: 30px; cursor: pointer; }
.csm_cat input { position: absolute; opacity: 0; width: 0; height: 0; }
.csm_cbx {
    flex: 0 0 auto; width: 12px; height: 12px; background: #fff;
    display: flex; align-items: center; justify-content: center;
}
.csm_cbx svg { width: 8px; height: 8px; opacity: 0; transition: opacity .12s; }
.csm_cat input:checked + .csm_cbx svg { opacity: 1; }
.csm_cat input:focus-visible + .csm_cbx { outline: 2px solid #7894a8; outline-offset: 2px; }
.csm_cat_tx { font-size: 17px; line-height: 1.4; letter-spacing: -0.68px; color: #fff; }

/* 입력 박스 공통 */
.csm_ipts { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.csm_ipt {
    position: relative; height: 45px;
    background: #2f3a42; border-radius: 5px;
}
.csm_ipt_in {
    width: 100%; height: 100%; padding: 0 20px;
    background: transparent; border: 0; outline: none;
    color: #fff; font-size: 16px; line-height: 1.4;
    font-family: 'Pretendard', sans-serif;
    box-sizing: border-box;
    -webkit-appearance: none; appearance: none;
}
.csm_ipt_in::placeholder { color: #dfdfdf; opacity: 1; }
.csm_ipt_req { position: absolute; top: 50%; right: 20px; transform: translateY(-50%); color: #c50000; font-size: 17px; pointer-events: none; }
.csm_ipt_ico { position: absolute; top: 50%; right: 20px; transform: translateY(-50%); display: flex; pointer-events: none; }

/* 날짜: 네이티브 표시 숨기고 커스텀 placeholder 노출 */
.csm_ipt_date { cursor: pointer; color: #fff; padding-right: 46px; }
.csm_ipt_date::-webkit-calendar-picker-indicator { position: absolute; right: 0; top: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.csm_ipt_date::-webkit-datetime-edit { color: #fff; }
.csm_ipt_date.is-empty::-webkit-datetime-edit { color: transparent; }
.csm_ipt_date.is-empty { color: transparent; }
.csm_ipt_ph { position: absolute; top: 50%; left: 20px; transform: translateY(-50%); color: #dfdfdf; font-size: 16px; pointer-events: none; }
.csm_ipt_date:not(.is-empty) + .csm_ipt_ph { display: none; }

/* 상담 내용 */
.csm_ipt_area { height: 155px; margin-top: 8px; }
.csm_ipt_textarea { height: 100%; padding: 20px; resize: none; line-height: 1.5; }

/* 개인정보 동의 */
.csm_agree { margin-top: 10px; }
.csm_agree_lb { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.csm_agree_lb input { position: absolute; opacity: 0; width: 0; height: 0; }
.csm_agree_bx { flex: 0 0 auto; width: 12px; height: 12px; background: #b4b4b4; transition: background .12s; display: flex; align-items: center; justify-content: center; }
.csm_agree_bx svg { width: 8px; height: 8px; opacity: 0; transition: opacity .12s; }
.csm_agree_lb input:checked + .csm_agree_bx { background: #fff; }
.csm_agree_lb input:checked + .csm_agree_bx svg { opacity: 1; }
.csm_agree_lb input:focus-visible + .csm_agree_bx { outline: 2px solid #7894a8; outline-offset: 2px; }
.csm_agree_tx { font-size: 13px; line-height: 1.4; letter-spacing: -0.52px; color: #aaa; }
.csm_policy_open { padding: 0; background: none; border: 0; color: #aaa; font-size: 13px; letter-spacing: -0.52px; cursor: pointer; font-family: 'Pretendard', sans-serif; }
.csm_policy_open:hover { color: #fff; }

/* 경고/안내 팝업 (드로어 폼 영역 안) */
.csm_alert { position: absolute; inset: 0; z-index: 6; display: none; }
.csm_alert.on { display: block; }
.csm_alert_dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.csm_alert_box {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: calc(100% - 60px); max-width: 320px; text-align: center;
    background: #fff; border-radius: 16px; padding: 32px 26px 26px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); word-break: keep-all;
}
.csm_alert_ico { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; margin-bottom: 16px; background: #c50000; border-radius: 50%; }
.csm_alert_msg { font-size: 16px; font-weight: 600; line-height: 1.5; color: #20262b; margin: 0 0 22px; }
.csm_alert_ok { width: 100%; height: 48px; font-size: 15px; font-weight: 700; color: #fff; background: #20262b; border: 0; border-radius: 10px; cursor: pointer; font-family: 'Pretendard', sans-serif; transition: filter .15s; }
.csm_alert_ok:hover { filter: brightness(1.15); }

/* 제출 버튼 */
.csm_submit {
    position: relative; width: 100%; height: 50px; margin-top: 30px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.1); border: 0; border-radius: 30px;
    cursor: pointer; transition: background .15s;
    font-family: 'Pretendard', sans-serif;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
}
.csm_submit:hover { background: rgba(255, 255, 255, 0.18); }
.csm_submit_tx { font-weight: 600; font-size: 18px; color: #fff; }
.csm_submit_ar {
    font-size:18px; font-weight: 400;
    position: absolute; top: 50%; right: 7px; transform: translateY(-50%);
    width: 35px; height: 35px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center;
}
.csm_submit:disabled { opacity: .6; cursor: default; }

/* 하단 채널 */
.csm_foot_btns { display: flex; gap: 8px; }
.csm_foot_btn {
    flex: 1 1 0; height: 45px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-weight: 500; font-size: 17px; color: #222; line-height: 1.5;
}
.csm_foot_btn:hover { filter: brightness(.97); text-decoration: none; }
.csm_foot_kakao { background: #fae100; }
.csm_foot_call { background: #f5f3ef; }
.csm_foot_ic { flex: 0 0 auto; width: 25px; height: 22px; object-fit: contain; }
.csm_foot_call .csm_foot_ic { width: 21px; height: 21px; }
.csm_foot_sns { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 16px; }
.csm_foot_sns a { display: inline-flex; align-items: center; gap: 5px; color: #f5f3ef; font-weight: 500; font-size: 13px; line-height: 1.5; }
.csm_foot_sns a:hover { text-decoration: none; opacity: .85; }
.csm_foot_sns img { flex: 0 0 auto; height: 15px; width: auto; object-fit: contain; }

/* ── 개인정보 팝업(가운데) ── */
.csm_policy { position: fixed; inset: 0; z-index: 10002; display: none; }
.csm_policy.on { display: block; }
.csm_policy_dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.csm_policy_box {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: calc(100% - 48px); max-width: 440px;
    max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain;
    background: #fff; border-radius: 14px; padding: 32px 30px 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    word-break: keep-all; overflow-wrap: break-word;
}
.csm_policy_x { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; padding: 0; background: none; border: 0; font-size: 26px; line-height: 1; color: #8a949b; cursor: pointer; }
.csm_policy_x:hover { color: #20262b; }
.csm_policy_title { font-size: 19px; font-weight: 800; color: #20262b; margin: 0 0 16px; }
.csm_policy_body { font-size: 14px; line-height: 1.7; color: #56626b; }
.csm_policy_body > p { margin: 0 0 16px; }
.csm_policy_body dl { margin: 0; }
.csm_policy_body dt { font-weight: 700; color: #20262b; margin-top: 14px; }
.csm_policy_body dt:first-child { margin-top: 0; }
.csm_policy_body dd { margin: 4px 0 0; }
.csm_policy_agree {
    width: 100%; height: 50px; margin-top: 22px;
    font-size: 15px; font-weight: 700; color: #fff;
    background: #20262b; border: 0; border-radius: 10px; cursor: pointer;
    font-family: 'Pretendard', sans-serif; transition: filter .15s;
}
.csm_policy_agree:hover { filter: brightness(1.15); }

/* ── 신청완료 팝업 ── */
.csm_done { position: fixed; inset: 0; z-index: 10003; display: none; }
.csm_done.on { display: block; }
.csm_done_dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }
.csm_done_box {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: calc(100% - 48px); max-width: 360px; text-align: center;
    background: #fff; border-radius: 16px; padding: 38px 30px 30px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); word-break: keep-all;
}
.csm_done_ico { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin-bottom: 18px; background: #20262b; border-radius: 50%; }
.csm_done_msg { font-size: 18px; font-weight: 700; line-height: 1.5; color: #20262b; margin: 0 0 24px; }
.csm_done_ok { width: 100%; height: 52px; font-size: 16px; font-weight: 700; color: #fff; background: #20262b; border: 0; border-radius: 12px; cursor: pointer; font-family: 'Pretendard', sans-serif; transition: filter .15s; }
.csm_done_ok:hover { filter: brightness(1.15); }

html.csm_lock, body.csm_lock { overflow: hidden; }

/* =============================== 반응형 =============================== */
@media (max-width: 520px) {
    .csm_form, .csm_foot { width: 100%; margin-left: 0; margin-right: 0; padding-left: 26px; padding-right: 26px; }
    .csm_inner { padding-top: 34px; }
}
@media (max-width: 486px) {
    .csm_head_sm { font-size: 14px; letter-spacing: -0.4px; }
    .csm_title { font-size: 24px; letter-spacing: -0.8px; }
    .csm_field_cate { margin-top: 26px; }
    .csm_label { font-size: 15px; }
    .csm_cat_tx { font-size: 15px; letter-spacing: -0.4px; }
    .csm_ipt_in { font-size: 15px; }
    .csm_ipt_ph { font-size: 15px; }
    .csm_submit_tx { font-size: 16px; }
    .csm_foot_btn { font-size: 15px; }
    .csm_form { padding-bottom: 48px; }
    .csm_foot { margin-top: 56px; }
}
@media (max-width: 360px) {
    .csm_form, .csm_foot { padding-left: 20px; padding-right: 20px; }
    .csm_cat_tx { font-size: 14px; }
    .csm_foot_btn { font-size: 13px; gap: 6px; }
    .csm_foot_sns { gap: 18px; }
}
