/* ============================================================
   집테리어 — 인테리어업체(view=company) · 무료견적신청(view=quote)
   2026-09-16 디자인 총괄 · 시안 CO01~CO09 / FQ01~FQ07
   ------------------------------------------------------------
   두 탭이 한 흐름으로 이어진다(업체 고르기 → 견적 요청)라 부품을 같이 둔다.
   공통 부품(.zp-cta·.zp-select·.zp-card…)은 zp-view.css / zp-cases.css.
   ============================================================ */

/* ---------- 세 갈래 선택 (우리집 시공업체 / 우리지역 / 전국) ---------- */
.zp-segment--3{ grid-template-columns: repeat(3, 1fr); }
.zp-segment--3 .zp-segment__btn{ font-size: 14px; padding: 0 6px; }
@media (max-width: 360px){
  /* 세 칸이 320 에서 글자를 뭉갠다 — 줄이지 말고 두 줄로 흘린다 */
  .zp-segment--3{ grid-template-columns: repeat(2, 1fr); }
  .zp-segment--3 .zp-segment__btn:first-child{ grid-column: 1 / -1; }
}

/* ---------- 아직 아무것도 고르지 않았을 때 (CO01) ---------- */
.zp-blank{
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 28px 12px 8px; text-align: center;
}
.zp-blank__art{ color: var(--green-soft, #edf5f2); }
.zp-blank__art .ink{ color: var(--green-3, #447466); }
.zp-blank__title{
  margin: 6px 0 0; font-size: 21px; font-weight: 800; line-height: 1.4;
  color: var(--ink, #202421); word-break: keep-all; text-wrap: balance;
}
.zp-blank__desc{
  margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted, #777e79);
  word-break: keep-all; text-wrap: pretty;
}

/* ---------- 뒤로 가는 줄 ---------- */
.zp-back{
  display: inline-flex; align-items: center; gap: 4px;
  align-self: flex-start; min-height: var(--h-tap); margin: -10px 0 -6px;
  font-size: 14px; font-weight: 700; color: var(--muted, #777e79);
  text-decoration: none; background: none; border: 0; cursor: pointer;
}
.zp-back:hover{ color: var(--ink, #202421); }

/* ---------- 단계 표시 (1 업체 확인 — 2 공사조건·요청) ---------- */
.zp-steps2{
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  margin: 2px 0 4px;
}
.zp-steps2__item{ display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.zp-steps2__no{
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: #d5dad7; color: #fff; font-size: 13px; font-weight: 800;
}
.zp-steps2__item.is-on .zp-steps2__no{ background: var(--green, #21463b); }
.zp-steps2__label{ font-size: 14px; font-weight: 700; color: var(--muted, #777e79); white-space: nowrap; }
.zp-steps2__item.is-on .zp-steps2__label{ color: var(--ink, #202421); }
.zp-steps2__bar{ height: 3px; border-radius: 2px; background: #e2e6e4; }
.zp-steps2__bar.is-on{ background: var(--green, #21463b); }

/* ---------- 지금 무엇을 고른 상태인지 요약 (CO07) ---------- */
.zp-summary{
  display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 14px; align-items: center;
  padding: 14px 16px;
  background: var(--green-soft, #edf5f2); border-radius: var(--r-lg);
}
.zp-summary__icon{
  display: grid; place-items: center; width: 52px; height: 52px;
  border-radius: 50%; background: #fff; color: var(--green-3, #447466);
}
.zp-summary__kind{ display: block; font-size: 12.5px; font-weight: 700; color: var(--green-2, #2f5c4e); }
.zp-summary__main{ display: block; margin-top: 2px; font-size: 17px; font-weight: 800; color: var(--green, #21463b); }
.zp-summary__note{ display: block; margin-top: 3px; font-size: 13px; color: var(--green-2, #2f5c4e); word-break: keep-all; }

/* ---------- 고르는 목록 (체크) ---------- */
/* 같은 이유로 '전체 선택' 줄도 <label> 로 통째로 감싸지 않는다 —
   안의 '전체 해제' 버튼을 누르면 전체 선택이 함께 뒤집힌다. */
.zp-pick{
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px;
  font-size: 15px; font-weight: 800; color: var(--ink, #202421);
}
.zp-pick__label{ cursor: pointer; }
.zp-pick__count{ color: var(--muted, #777e79); font-weight: 700; font-size: 14px; }
.zp-pick__clear{
  margin-left: auto; position: relative;
  min-height: 32px; padding: 0 2px;
  border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--muted, #777e79);
}
.zp-pick__clear::before{ content: ""; position: absolute; inset: -6px -8px; }
.zp-pick__clear:hover{ color: var(--red, #bb1730); }

.zp-checklist{ display: flex; flex-direction: column; gap: 8px; }
/* 🔴 행 전체를 <label> 로 감싸면 안 된다 — 안에 있는 '업체 보기' 링크를 눌러도
   체크가 같이 켜졌다 꺼진다(실측 확인). 그래서 **누르면 체크되는 부분**(.zp-check__info)과
   **링크**를 형제로 갈라 둔다. 체크는 label[for] 로 연결해 글자를 눌러도 켜지게 한다. */
.zp-check{
  display: grid; grid-template-columns: 26px minmax(0,1fr) auto;
  gap: 12px; align-items: center;
  min-height: 64px; padding: 8px 12px;
  border: 1px solid var(--line, #e6e9e7); border-radius: var(--r-lg);
  transition: border-color .12s ease, background .12s ease;
  background: #fff;
}
.zp-check__info{
  display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 12px; align-items: center;
  min-width: 0; min-height: var(--h-md); cursor: pointer;
}
.zp-check.is-on{ border-color: var(--green-3, #447466); background: #fbfdfc; }
/* 진짜 checkbox 를 쓴다 — 보조기기와 키보드가 그대로 동작한다 */
.zp-check__box{
  width: 26px; height: 26px; margin: 0; accent-color: var(--green, #21463b); cursor: pointer;
}
.zp-check__thumb{
  width: 56px; aspect-ratio: 4 / 3; border-radius: 6px;
  background: var(--soft, #f5f6f5); overflow: hidden;
  display: grid; place-items: center; color: #a7aeaa; font-size: 10px;
}
.zp-check__thumb img{ width: 100%; height: 100%; object-fit: cover; }
.zp-check__name{ display: block; font-size: 15px; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zp-check__where{ display: block; margin-top: 2px; font-size: 13px; color: var(--muted, #777e79); }
.zp-check__go{
  position: relative; display: inline-flex; align-items: center; gap: 3px;
  min-height: 32px;
  font-size: 13px; font-weight: 700; color: var(--green, #21463b);
  text-decoration: none; background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.zp-check__go::before{ content: ""; position: absolute; inset: -6px -8px; }

.zp-more{
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: var(--h-md);
  border: 1px solid var(--line, #e6e9e7); border-radius: var(--r-md);
  transition: border-color .12s ease;
  background: #fff; color: var(--ink, #202421);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.zp-more:hover{ border-color: var(--green-3, #447466); }

/* ---------- 아래 고정 줄 (개수 + 다음) ---------- */
.zp-bottombar{
  position: sticky; bottom: 0; z-index: 5;
  margin: 8px calc(var(--zp-pane-px, 28px) * -1) -32px;
  padding: 12px var(--zp-pane-px, 28px) calc(14px + var(--z360-tabbar-space, 0px));
  background: #fff; border-top: 1px solid var(--line, #e6e9e7);
}
.zp-bottombar__row{ display: flex; align-items: center; gap: 12px; }
.zp-bottombar__count{ flex: 0 0 auto; font-size: 14px; font-weight: 700; color: var(--ink, #202421); }
.zp-bottombar__count b{ font-size: 17px; font-weight: 800; color: var(--red, #bb1730); }
.zp-bottombar__row .zp-cta{ flex: 1 1 auto; width: auto; }
/* 고른 게 하나도 없으면 다음으로 못 간다 — 왜 못 가는지 글로 적는다 */
.zp-bottombar__why{ margin: 8px 0 0; font-size: 13px; color: var(--muted, #777e79); text-align: center; }

@media (max-width: 360px){
  .zp-bottombar__row{ flex-wrap: wrap; }
  .zp-bottombar__row .zp-cta{ flex: 1 0 100%; }
}

/* ---------- 공사 조건 입력 (CO08 / FQ) ---------- */
.zp-form{ display: flex; flex-direction: column; gap: 16px; }
.zp-chips{ display: flex; flex-wrap: wrap; gap: 8px; }
.zp-chip{
  min-height: var(--h-tap); padding: 0 14px;
  border: 1px solid var(--line, #e6e9e7); border-radius: 999px;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
  background: #fff; color: var(--ink, #202421);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.zp-chip[aria-pressed="true"]{
  border-color: var(--green-3, #447466); background: var(--green-soft, #edf5f2); color: var(--green, #21463b);
}
.zp-textarea{
  width: 100%; min-height: 120px; padding: 12px 14px;
  border: 1px solid var(--line, #e6e9e7); border-radius: var(--r-md);
  font: inherit; font-size: 15px; line-height: 1.6; color: var(--ink, #202421);
  resize: vertical;
}
.zp-textarea:focus{ outline: none; border-color: var(--green-3, #447466); box-shadow: var(--zp-focus); }
.zp-count{ margin: 4px 0 0; font-size: 12.5px; color: var(--muted, #777e79); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 접수 완료 (CO09) ---------- */
.zp-done{
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 32px 16px 8px; text-align: center;
}
.zp-done__mark{
  display: grid; place-items: center; width: 72px; height: 72px;
  border-radius: 50%; background: var(--green-soft, #edf5f2); color: var(--green, #21463b);
}
.zp-done__title{ margin: 4px 0 0; font-size: 21px; font-weight: 800; color: var(--ink, #202421); word-break: keep-all; }
.zp-done__desc{ margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted, #777e79); word-break: keep-all; text-wrap: pretty; }
.zp-done__box{
  width: 100%; margin-top: 8px; padding: 14px 16px;
  border: 1px solid var(--line, #e6e9e7); border-radius: var(--r-lg); background: var(--soft, #f5f6f5);
  text-align: left; font-size: 14px; line-height: 1.8; color: var(--ink, #202421);
}
.zp-done__box dt{ float: left; clear: left; width: 86px; color: var(--muted, #777e79); font-weight: 700; }
.zp-done__box dd{ margin: 0 0 0 86px; }

/* 🔴 09-17 실측 수정 — `.zp-stickycta` 와 같은 이유(탭바 자리 이중 계산). zp-cases.css 주석 참고. */
@media (max-width: 768px){
  .zp-bottombar{
    /* sticky 의 bottom:0 은 스크롤 칸의 **패딩 안쪽**을 기준으로 잡는다 → margin 만으로는 안 내려간다.
       실측(375): bottom 을 패딩만큼 음수로 주면 바가 화면 맨 아래에 붙고, 바 자신의 padding-bottom(14+탭바)이
       버튼을 탭바 위 14px 에 놓는다. 틈 0. */
    bottom: calc((24px + var(--z360-tabbar-space, 0px)) * -1);
    margin-bottom: calc((24px + var(--z360-tabbar-space, 0px)) * -1);
  }
}

/* 동의 본문 — 약관·개인정보 세션 제공(09-17). 문서 21종 배포 전이라 링크 대신 이 자리에서 펼쳐 보인다. */
.zp-consent__more{
  display: block; width: 100%; margin: -2px 0 8px;
  padding: 8px 2px; border: 0; background: none;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--green-3, #447466);
  text-align: left; cursor: pointer;
}
.zp-consent__more svg{ vertical-align: -1px; }
.zp-consent__more[aria-expanded="true"] svg{ transform: rotate(90deg); }
.zp-consent{
  margin: -4px 0 10px; padding: 14px 16px;
  border: 1px solid var(--line, #e6e9e7); border-radius: var(--r-lg, 12px);
  background: var(--soft, #f5f6f5);
  font-size: 13px; line-height: 1.8; color: var(--ink, #202421);
}
.zp-consent h4{ margin: 0 0 10px; font-size: 14px; font-weight: 800; }
.zp-consent dl{ margin: 0; }
.zp-consent dt{ margin-top: 10px; font-weight: 700; color: var(--ink, #202421); }
.zp-consent dt:first-of-type{ margin-top: 0; }
.zp-consent dd{ margin: 2px 0 0; color: var(--muted, #777e79); }
.zp-consent__note{ margin: 12px 0 0; color: var(--muted, #777e79); }

/* 2026-10-05 약관 세션: 배포된 동의서 전문(새 창)을 「내용 보기」 옆에 둔다 — 같은 탭으로 열면 쓰던 견적이 날아간다. */
.zp-consent__more{ display: inline-block; width: auto; margin-right: 14px; }
.zp-consent__doc{
  display: inline-block; margin: -2px 0 8px; padding: 8px 2px;
  font-size: 13px; font-weight: 700; color: var(--green-3, #447466);
  text-decoration: underline; text-underline-offset: 2px;
}
.zp-consent__note a{ color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* 동의 칸 제목은 줄바꿈해서 끝까지 보여 준다(말줄임이면 무엇에 동의하는지 안 보인다 — 제22조) */
.zp-check--consent .zp-check__name{ white-space: normal; overflow: visible; text-overflow: clip; }

/* 10-19 2차 직원 3e4424·부대표 결정(점검-058 ⑥): 동의 체크 칸은 업체 고르기 칸과 같은 테두리 상자라 글 길이와 안 맞아 어색했다 →
   동의 칸만 테두리·배경을 없애고 체크 상자와 글만 남긴다(업체 고르기 칸은 그대로). */
.zp-check.zp-check--consent,
.zp-check.zp-check--consent.is-on{ border-color: transparent; background: transparent; padding-left: 0; padding-right: 0; min-height: 0; }

/* 10-19 점검-077(직원 2차 afad6c): 왼쪽 칸(.zp-pane)은 높이가 정해진 세로 flex 라, 줄들이 글 높이보다 작게 눌릴 수 있다 —
   동의 칸은 min-height 0(점검-058 ⑥) 이라 글보다 낮게 눌려 아래 「내용 보기」·「전문 보기」가 글 위에 겹치고 끝 글자가 잘렸다 → 동의 줄·링크·본문은 눌리지 않게. */
.zp-pane > .zp-check--consent,
.zp-pane > .zp-consent__more,
.zp-pane > .zp-consent__doc,
.zp-pane > .zp-consent{ flex-shrink: 0; }

/* 10-20 점검-081: 휴대폰 동의 「내용 보기」 — 화면 가득 안내창(zp-views.js consentSheet) */
.zp-csheet{ position: fixed; inset: 0; z-index: 2147483000; display: flex; flex-direction: column; background: #fff; }
.zp-csheet__head{ display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line, #e6e9e7); font-size: 16px; }
.zp-csheet__x{ flex: 0 0 auto; min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: #f2f4f3; color: var(--ink, #202421); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.zp-csheet__body{ flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.zp-csheet .zp-consent{ margin: 0; padding: 0; border: 0; background: transparent; font-size: 15px; }
/* 10-20 점검-082: 휴대폰에서 글 칠 때 아래 고정 줄(요청 단추·탭바)을 숨겨 자판 위 공간을 칸에 준다(zp-views.js 가 html.zp-typing 을 켜고 끔) */
html.zp-typing .zp-bottombar,
html.zp-typing .z360-tabbar{ display: none !important; }

/* 10-20 점검-089(부대표 「① 한 줄에」·직원 87e6c8): 왼쪽 칸이 세로 flex 라 「내용 보기」·「전문 보기」가 따로 한 줄씩 차지했다 →
   둘을 한 줄 상자로 묶어 나란히(「내용 보기 ›  전문 보기」) · 펼친 글은 그 아래 그대로 · 눌리지 않게(점검-077) */
.zp-consent__links{ display: flex; flex-wrap: wrap; align-items: center; }
.zp-pane > .zp-consent__links{ flex-shrink: 0; }
