/* =====================================================================
   견적 옵션 확장 화면 스타일 (KG-029, 2026-10-08)
   사용처: estimateRegister.jsp (입력) / estimateList.jsp · store_detail.jsp (카드·상세)
   색상 변수는 estimate.css 의 --est-* 사용
   ===================================================================== */

/* ── 목록 카드: 매장명 한 줄 + "✓ 제휴" 고정 ── */
.est-product-name.est-pn-flex { display: flex; align-items: baseline; min-width: 0; }
.est-pn-flex .est-pn-cat   { color: #5B5880; font-weight: 500; flex-shrink: 0; white-space: pre; }
.est-pn-flex .est-pn-store { color: #1a1830; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.est-partner-mark { flex-shrink: 0; margin-left: 5px; font-size: 11px; font-weight: 700; color: var(--est-purple); white-space: nowrap; }

/* ── 목록 카드: 디자인·컬러 회색 한 줄 (태그 줄 아래) ── */
.est-opt-line { font-size: 11.5px; color: #6B6888; margin: -1px 0 7px; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.est-opt-line .est-ol-dz   { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.est-opt-line .est-ol-more { color: #A3A0B8; }
.est-opt-line .est-ol-bar  { width: 1px; height: 10px; background: #DDD9EA; flex-shrink: 0; }
.est-opt-line .est-ol-cols { display: flex; gap: 6px; flex-shrink: 0; }
.est-opt-line .est-sw      { width: 9px; height: 9px; margin-right: 3px; vertical-align: -1px; }

/* ── 펼친 상세: 상품 정보 / 매장 조건 박스 ── */
.est-opt-box { margin-top: 12px; padding: 12px; border: 1.5px solid var(--est-border); border-radius: 12px; background: #FAF9FD; }
.est-opt-box-title { font-size: 13px; font-weight: 700; color: var(--est-text-dark); margin-bottom: 8px; }
.est-opt-row { display: flex; gap: 10px; padding: 4px 0; font-size: 13px; align-items: flex-start; }
.est-opt-row .k { width: 64px; flex-shrink: 0; color: var(--est-text-gray); }
.est-opt-row .v { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; color: var(--est-text-dark); font-weight: 500; }
.est-opt-dchip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--est-border); border-radius: 8px; padding: 2px 8px 2px 2px; font-size: 12px; background: #fff; }
.est-opt-dchip img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.est-opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.est-opt-cell { background: #fff; border: 1px solid var(--est-border); border-radius: 8px; padding: 6px 8px; }
.est-opt-cell .k { font-size: 11px; color: var(--est-text-gray); }
.est-opt-cell .v { font-size: 13px; font-weight: 600; color: var(--est-text-dark); margin-top: 1px; }

/* ── 등록 화면: 공통 ── */
.reg-opt-optional { font-size: 12px; font-weight: 500; color: var(--est-text-gray); margin-left: 4px; }
.reg-opt-hint { font-size: 12px; font-weight: 400; color: var(--est-text-gray); margin-left: 6px; }
.reg-opt-hidden { display: none !important; }
.reg-opt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.reg-opt-chip { padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; border: 1.5px solid var(--est-border); color: var(--est-text-mid); background: #fff; cursor: pointer; font-family: inherit; }
.reg-opt-chip.on { border-color: #111; color: #111; font-weight: 700; }
.reg-opt-chip.more { border-style: dashed; color: var(--est-text-gray); }
.reg-opt-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.reg-opt-tags:empty { display: none; }
.reg-opt-tag { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #111; border-radius: 20px; padding: 6px 10px 6px 14px; font-size: 13px; font-weight: 700; color: #111; background: #fff; }
.reg-opt-tag .x { color: var(--est-text-gray); cursor: pointer; font-weight: 500; padding: 0 2px; }
.reg-opt-tip { display: inline-flex; width: 15px; height: 15px; border-radius: 50%; border: 1.3px solid var(--est-text-gray); color: var(--est-text-gray); font-size: 10px; align-items: center; justify-content: center; margin-left: 4px; cursor: pointer; vertical-align: middle; position: relative; }

/* 호수/길이 입력 */
.reg-opt-size-in { display: flex; gap: 6px; }
.reg-opt-size-in input { width: 100px; border: 1.5px solid var(--est-border); border-radius: 10px; padding: 8px 10px; font-size: 16px; font-family: inherit; color: var(--est-text-mid); }
.reg-opt-size-in input:focus { outline: none; border-color: var(--est-purple); }
.reg-opt-size-in button { border: 1.5px solid var(--est-border); border-radius: 10px; background: #fff; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--est-text-mid); font-family: inherit; cursor: pointer; }

/* 구성 정보 · 매장 조건: 라벨 아래 테두리 박스 */
.reg-opt-group { border: 1.5px solid var(--est-border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 14px; background: #fff; }
.reg-opt-sub { display: flex; flex-direction: column; gap: 8px; }
.reg-opt-sublabel { font-size: 12.5px; font-weight: 700; color: #444; display: flex; align-items: center; }
.reg-opt-group .reg-opt-fold { border: none; padding: 0; background: transparent; font-weight: 600; color: var(--est-text-gray); font-size: 13px; }
.reg-opt-group .reg-opt-cond { padding-top: 4px; }

/* 매장 조건 접기 */
.reg-opt-fold { display: flex; justify-content: space-between; align-items: center; border: 1.5px solid var(--est-border); border-radius: 10px; padding: 11px 12px; font-size: 13px; font-weight: 700; color: var(--est-text-mid); cursor: pointer; background: #fff; }
.reg-opt-fold .arrow { font-weight: 500; color: var(--est-text-gray); font-size: 12px; }
.reg-opt-cond { display: flex; flex-direction: column; gap: 12px; padding: 10px 2px 0; }
.reg-opt-cond .k { font-size: 12px; font-weight: 700; color: #444; margin-bottom: 6px; display: flex; align-items: center; }

/* ── 등록 화면: 디자인 선택창 (아래에서 올라옴) ── */
.reg-dsg-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; align-items: flex-end; justify-content: center; }
.reg-dsg-overlay.open { display: flex; }
.reg-dsg-sheet { background: #fff; width: 100%; max-width: 430px; max-height: 88vh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; }
.reg-dsg-grab { width: 40px; height: 4px; border-radius: 2px; background: #ddd; margin: 8px auto 0; flex-shrink: 0; }
.reg-dsg-title { padding: 12px 18px 2px; font-size: 17px; font-weight: 700; color: var(--est-text-dark); flex-shrink: 0; }
.reg-dsg-sub { padding: 0 18px; font-size: 12px; color: var(--est-text-gray); flex-shrink: 0; }
.reg-dsg-guide { margin: 8px 18px 10px; background: var(--est-bg); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: #555; line-height: 1.55; flex-shrink: 0; }
.reg-dsg-guide b { color: var(--est-text-dark); }
.reg-dsg-list { overflow-y: auto; padding: 0 18px 8px; display: flex; flex-direction: column; gap: 8px; }
.reg-dsg-grp { font-size: 13px; font-weight: 700; color: #444; margin: 6px 2px -2px; }
.reg-dsg-item { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--est-border); border-radius: 14px; padding: 8px 12px 8px 8px; cursor: pointer; position: relative; user-select: none; }
.reg-dsg-item.on { border-color: #111; box-shadow: 0 0 0 1px #111; }
.reg-dsg-item img, .reg-dsg-item .ph { width: 84px; height: 84px; border-radius: 10px; flex-shrink: 0; object-fit: cover; }
.reg-dsg-item .ph { background: #fafafa; display: flex; align-items: center; justify-content: center; color: var(--est-text-light); font-size: 28px; }
.reg-dsg-item .tx { flex: 1; min-width: 0; padding-right: 24px; }
.reg-dsg-item .nm { font-size: 15px; font-weight: 700; color: var(--est-text-mid); }
.reg-dsg-item .ds { font-size: 12.5px; color: var(--est-text-gray); line-height: 1.45; margin-top: 3px; }
.reg-dsg-item .ds2 { font-size: 11.5px; color: #A3A0B8; line-height: 1.4; margin-top: 2px; word-break: keep-all; }
.reg-dsg-item .ck { position: absolute; top: 50%; margin-top: -11px; right: 12px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--est-text-light); background: #fff; font-size: 13px; line-height: 19px; text-align: center; color: #fff; }
.reg-dsg-item.on .ck { background: #111; border-color: #111; }
.reg-dsg-done { flex-shrink: 0; margin: 8px 18px 20px; background: #111; color: #fff; border: none; border-radius: 10px; padding: 14px; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; }

/* ── 컬러 색 점 (A안, 2026-10-08): 은은한 금속 광택 그라데이션. 클래스 = est-sw-{option_code} ── */
.est-sw { display: inline-block; flex-shrink: 0; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.14); vertical-align: -2px; }
.est-opt-row .v .est-sw, .est-opt-color { width: 12px; height: 12px; }
.est-opt-color-item { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; }
.reg-opt-chip .est-sw { margin-right: 6px; }
.est-sw-CL_WHITE     { background: linear-gradient(135deg, #F7F7F8 0%, #D6D7DB 55%, #BFC1C6 100%); }
.est-sw-CL_YELLOW    { background: linear-gradient(135deg, #FBE7A9 0%, #E2B958 55%, #C99A33 100%); }
.est-sw-CL_ROSE      { background: linear-gradient(135deg, #F9D9CB 0%, #E2A891 55%, #C98670 100%); }
.est-sw-CL_NATURAL   { background: linear-gradient(135deg, #F6F1E6 0%, #DDD3BE 55%, #C7BBA1 100%); }
.est-sw-CL_CHAMPAGNE { background: linear-gradient(135deg, #F8E8C9 0%, #E2C796 55%, #C9AA72 100%); }
.est-sw-CL_BEIGE     { background: linear-gradient(135deg, #F3E8DA 0%, #D9C3A9 55%, #C0A788 100%); }
.est-sw-CL_HONEY     { background: linear-gradient(135deg, #F8D58E 0%, #DCA545 55%, #B9842A 100%); }
.est-sw-CL_BLACK     { background: linear-gradient(135deg, #77777C 0%, #3F3F44 55%, #222226 100%); }
.est-sw-CL_TWOTONE   { background: linear-gradient(135deg, #FBE7A9 0%, #E2B958 49%, #D6D7DB 51%, #BFC1C6 100%); }
.est-sw-CL_ETC       { background: #fff; border: 1.5px dashed #B8B5D0; }

/* ── 구성 정보·매장 조건 박스 다듬기 (2026-10-08 2차) ──
   테두리 겹침 제거(박스는 옅은 배경), 칩은 작게, 선택은 보라 톤, 호수 입력창은 낮게 */
.reg-opt-group { border: none; background: var(--est-bg); padding: 12px 12px 14px; gap: 12px; }
.reg-opt-sublabel { font-size: 12px; font-weight: 600; color: #555; }
.reg-opt-group .reg-opt-hint { font-size: 11px; }
.reg-opt-group .reg-opt-chips { gap: 5px; }
.reg-opt-group .reg-opt-chip,
.reg-opt-cond .reg-opt-chip { padding: 5px 11px; font-size: 12.5px; font-weight: 500; border: 1px solid #E4E0EF; background: #fff; color: var(--est-text-mid); }
.reg-opt-group .reg-opt-chip.on,
.reg-opt-cond .reg-opt-chip.on { border-color: var(--est-purple); background: var(--est-purple-light); color: var(--est-purple); font-weight: 600; }
.reg-opt-group .reg-opt-chip.more { background: transparent; border-style: dashed; color: var(--est-text-gray); }
.reg-opt-group .reg-opt-chip .est-sw { width: 12px; height: 12px; margin-right: 5px; }
.reg-opt-group .reg-opt-tag { padding: 4px 8px 4px 11px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--est-purple); background: var(--est-purple-light); color: var(--est-purple); }
/* 호수 입력: 글자는 16px 유지(아이폰에서 16px보다 작으면 입력할 때 화면이 확대됨), 높이만 낮춤 */
.reg-opt-size-in input { width: 84px; height: 32px; padding: 0 10px; font-size: 16px; border: 1px solid #E4E0EF; border-radius: 8px; background: #fff; }
.reg-opt-size-in button { height: 32px; padding: 0 12px; font-size: 12.5px; font-weight: 600; border: 1px solid #E4E0EF; border-radius: 8px; }
.reg-opt-group .reg-opt-fold { font-size: 12.5px; }
.reg-opt-cond .k { font-size: 12px; font-weight: 600; color: #555; }

/* ── 3차 (2026-10-08): 선택 표시는 연보라 배경 없이 흰 바탕 + 진한 보라 테두리·글자만 ── */
.reg-opt-group .reg-opt-chip.on,
.reg-opt-cond .reg-opt-chip.on,
.reg-opt-group .reg-opt-tag { background: #fff; border-color: var(--est-purple); color: var(--est-purple); }

/* ── 호수 입력: 보이는 글자 13px.
   아이폰은 입력칸 글자가 16px보다 작으면 누를 때 화면이 확대되므로,
   실제 글자는 16px로 두고 칸 전체를 0.8125배로 줄여서 13px처럼 보이게 함 (줄어든 만큼 여백 보정) ── */
.reg-opt-size-in input {
  width: 104px; height: 40px; padding: 0 12px; font-size: 16px;
  transform: scale(0.8125); transform-origin: left center;
  margin: -4px -20px -4px 0;
}

/* ── 4차 (2026-10-08): 박스 배경 보라 제거 → 다른 입력칸과 같은 흰 바탕 + 같은 테두리 ── */
.reg-opt-group { background: #fff; border: 1.5px solid var(--est-border); }

/* ── 5차 (2026-10-08): 박스 테두리 제거 — 라벨 아래 항목만 들여쓰기 없이 나열 ── */
.reg-opt-group { border: none; background: transparent; padding: 2px 0 0; }

/* ── 6차 (2026-10-08): 테두리 다시 넣되 다른 입력칸보다 연하게 (1px, 연회색) ── */
.reg-opt-group { border: 1px solid #ECEAF2; background: #fff; padding: 12px 12px 14px; }

/* ── 7차 (2026-10-08): 구성 정보 안 항목 사이 여백 넓힘 ── */
.reg-opt-group { gap: 18px; padding: 14px 14px 16px; }
.reg-opt-sub { gap: 8px; }
.reg-opt-cond { gap: 16px; }

/* ── 견적리스트 펼친 상세 (2026-10-08 2차): 상품 정보·매장 조건이 예상 공임비보다 튀지 않게
   배경·테두리 제거 → 점선 구분선 + 작은 회색 제목 + 담백한 글자 목록 ── */
.est-opt-box { margin-top: 10px; padding: 10px 0 0; border: none; border-top: 1px dashed var(--est-border); border-radius: 0; background: transparent; }
.est-opt-box-title { font-size: 12px; font-weight: 600; color: var(--est-text-gray); margin-bottom: 4px; }
.est-opt-row { padding: 3px 0; font-size: 13px; }
.est-opt-row .k { width: 64px; font-size: 12.5px; }
.est-opt-row .v { font-weight: 400; color: var(--est-text-mid); }
.est-opt-dchip { border: none; background: transparent; padding: 0; gap: 4px; font-size: 13px; }
.est-opt-dchip img { width: 22px; height: 22px; border-radius: 5px; }
.est-opt-grid { gap: 2px 12px; }
.est-opt-cell { display: flex; gap: 10px; align-items: baseline; border: none; background: transparent; padding: 3px 0; }
.est-opt-cell .k { width: 64px; flex-shrink: 0; font-size: 12.5px; }
.est-opt-cell .v { font-size: 13px; font-weight: 400; color: var(--est-text-mid); margin-top: 0; }
.est-opt-box + .est-memo-label { display: block; margin-top: 14px; }
.est-opt-box + .est-store-btn { margin-top: 14px; } /* 매장 서비스 바로 아래 매장 바로가기 버튼이 붙지 않게 */

/* ── 견적리스트 펼친 상세 3차: 위 가격 줄과 같은 정렬 — 이름은 왼쪽 끝, 값은 오른쪽 끝 ── */
.est-opt-row { justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; }
.est-opt-row .k { width: auto; flex-shrink: 0; font-size: 13px; color: var(--est-text-mid); }
.est-opt-row .v { flex: 0 1 auto; justify-content: flex-end; text-align: right; font-size: 13px; font-weight: 500; color: var(--est-text-dark); }
.est-opt-grid { display: block; }
.est-opt-cell { justify-content: space-between; align-items: center; padding: 4px 0; }
.est-opt-cell .k { width: auto; font-size: 13px; color: var(--est-text-mid); }
.est-opt-cell .v { font-size: 13px; font-weight: 500; color: var(--est-text-dark); text-align: right; }

/* ── 견적리스트 펼친 상세 4차 (A안): 이름과 값 사이를 옅은 점선으로 이어 눈 이동을 도움 ── */
.est-opt-row .k, .est-opt-cell .k { flex: 1 1 auto; display: flex; align-items: center; }
.est-opt-row .k::after, .est-opt-cell .k::after { content: ""; flex: 1; border-bottom: 1px dotted #CFCBE0; margin: 0 8px; transform: translateY(3px); }
.est-opt-row .v, .est-opt-cell .v { flex: 0 0 auto; }

/* ── 5차: 상품 정보는 점선(A안) 그대로, 매장 조건만 태그 묶음(B안) ── */
.est-opt-grid { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.est-opt-cell { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #E4E0EF; border-radius: 14px; padding: 4px 10px; background: #fff; }
.est-opt-cell .k { flex: 0 0 auto; display: inline; width: auto; font-size: 12px; color: var(--est-text-gray); }
.est-opt-cell .k::after { content: none; }
.est-opt-cell .v { font-size: 12.5px; font-weight: 600; color: var(--est-text-dark); text-align: left; }

/* ── 매장상세 견적 탭 바탕을 견적리스트와 같은 연한 회보라로 (카드가 같은 느낌으로 보이게) ── */
#tab3view { background: var(--est-bg); }

/* ? 툴팁 말풍선 (누르면 뜸, 견적리스트 .est-legend-tooltip 과 같은 모양) */
.reg-opt-tip::after { content: ''; position: absolute; inset: -10px; } /* 손가락으로 누르기 쉽게 터치 영역 확대 */
.reg-tip-bubble { position: absolute; z-index: 10000; max-width: 260px; background: #18162E; color: #fff; font-size: 12px; font-weight: 500; line-height: 1.5; padding: 8px 11px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.2); word-break: keep-all; white-space: normal; text-align: left; }
.reg-tip-bubble { opacity: 0; transform: translateY(-3px); transition: opacity .15s ease, transform .15s ease; }
.reg-tip-bubble.show { opacity: 1; transform: none; }
.reg-tip-bubble::before { content: ''; position: absolute; top: -5px; left: var(--tail-x, 50%); margin-left: -5px; border: 5px solid transparent; border-top: 0; border-bottom-color: #18162E; }
.est-opt-cell[data-tip] { cursor: pointer; } /* 매장 서비스 칸: 누르면 설명 말풍선 */

/* ── 견적 카드 여백 (2026-10-10): 디자인·컬러 줄이 추가돼 촘촘해져서 줄마다 숨 쉴 공간 ──
   견적리스트 · 매장상세 견적 탭 · 메인 견적 카드 공통. 기본 estimate.css 는 그대로 두고 여기서만 덮어씀 */
.est-card-wrap .est-card         { padding: 13px 14px; }
.est-card-wrap .est-card-header  { margin-bottom: 7px; }
.est-card-wrap .est-product-name { margin-bottom: 5px; }
.est-card-wrap .est-opt-line     { margin: 0 0 9px; }
.est-card-wrap .est-tag-row      { margin-bottom: 9px; }
/* 메인 미리보기 카드는 원래 더 촘촘한 디자인(7px 10px) → 같은 비율로 조금만 */
.est-card-wrap--main .est-card--main { padding: 10px 12px !important; }

/* ── 견적 등록 > 매장 서비스 접기 줄 (2026-10-10): 기본은 접힘 유지, 대신 누를 곳이 또렷하게 ──
   안내 문구 진한 회색 + "펼치기/접기" 보라 굵게 (매장 서비스 한 곳에서만 쓰는 줄) */
.reg-opt-group .reg-opt-fold { color: #3F3D56; }
.reg-opt-fold .arrow { color: var(--est-purple); font-weight: 700; font-size: 12.5px; }
/* 매장 서비스 맨 아래 안내: 칩에 없는 서비스는 메모로 (2026-10-10) */
.reg-opt-cond-hint { font-size: 12px; color: var(--est-text-gray); line-height: 1.5; margin-top: -4px; }
/* 견적 상세 > 매장 서비스 > 받은 혜택: 한 줄 전체 차지, 혜택마다 알약으로 줄바꿈 (2026-10-13) */
.est-opt-benefits { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.est-opt-benefits > .k { flex-basis: 100%; font-size: 12px; color: var(--est-text-gray); margin: 4px 0 0; }   /* 라벨은 윗줄, 알약은 아래로 */
