/*
 * 입찰청약 공통 부품 (모든 현장 공통)
 * - 글꼴: Pretendard. 글꼴 · 자간 · 줄바꿈처럼 모든 현장에 걸리는 꼴은 harness-base.css(입찰 · 비입찰 공통, QA-187)에 있다
 * - 색은 현장 스킨(static/{prefix}/css/style.css)의 변수로 바꾼다.
 * - 변수가 없으면 아래 기본값(기존 청약 기본색)으로 보인다.
 */
:root {
  --bid-brand: #102060;        /* 주색: 버튼·선택 강조 */
  --bid-accent: #0096de;       /* 강조: 선택 테두리·포인트 */
  --bid-accent-bg: #eef7fc;    /* 강조 배경 */
  --bid-danger: #c9151e;
}

/* 기존 .apply .apply-container strong { padding-left: 15px } 가 입찰 부품의 제목을 들여 쓰므로 해제 */
.apply .apply-container .room-select-guide strong,
.apply .apply-container .room-grid strong,
.apply .apply-container .bid-card strong,
.apply .apply-container .deposit-sum strong,
.apply .apply-container .bid-confirm-table strong { padding-left: 0; }

/* ── 호실 선택 ─────────────────────────────── */
.apply .apply-container .room-select-guide { margin: -5px 0 15px; color: #888; font-size: 14px; }
.apply .apply-container .room-select-guide strong { color: var(--bid-brand); font-size: 14px; }
.room-floor { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; }
.room-floor span { flex-shrink: 0; color: #888 !important; font-size: 13px !important; }
.room-floor::after { content: ""; flex: 1; border-top: 1px solid #ececec; }
.room-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.room-grid button.room, .room-floor-rooms button.room {
  position: relative; width: 100%; height: 58px; padding: 0; border: 1px solid #dcdcdc; border-radius: 6px;
  background: #fff; line-height: 1.3; letter-spacing: -0.03em; font-family: 'Nanum Gothic', sans-serif;
}
.room-grid button.room strong, .room-floor-rooms button.room strong { display: block; color: #222; font-size: 15px !important; }
.room-grid button.room small, .room-floor-rooms button.room small { display: block; color: #999 !important; font-size: 12px !important; font-weight: 400; }
.room-grid button.room:hover, .room-floor-rooms button.room:hover { border-color: var(--bid-accent); }
.room-grid button.room.on, .room-floor-rooms button.room.on { border: 2px solid var(--bid-accent); background: var(--bid-accent-bg); }
.room-grid button.room.on strong, .room-floor-rooms button.room.on strong { color: var(--bid-brand); }
.room-grid button.room.on::after, .room-floor-rooms button.room.on::after {
  content: "✓"; position: absolute; top: 4px; right: 6px; color: var(--bid-accent); font-size: 13px; font-weight: 800;
}

/* 층(sub_group)이 있는 현장: 동별 상자를 옆으로, 상자 안은 위층부터 층별 줄, 줄 안 호실은 옆으로(넘치면 줄 바꿈) */
/* 동 상자는 260px 아래로 줄지 않고, 자리가 모자라면 다음 줄로 넘어간다(동이 몇 개든 카드가 상자 밖으로 안 나온다) */
.room-buildings { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; gap: 16px; }
.room-building {
  box-sizing: border-box; min-width: 0; padding: 14px 12px 8px; border: 1px solid #dcdcdc; border-radius: 8px; background: #fff;
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px;
}
.apply .apply-container .room-building .room-building-name,
.room-building .room-building-name {
  display: block; margin: 0 0 8px; padding: 0 0 10px; border-bottom: 1px solid #ececec;
  color: #222 !important; font-size: 16px !important; font-weight: 700; letter-spacing: -0.03em;
}
/* 층 이름표 칸은 그 동에서 가장 긴 이름 폭(subgrid, 6em 까지 — 넘으면 «…»), subgrid 를 모르는 브라우저는 줄마다 34px 이상 */
.room-building .room-building-name { grid-column: 1 / -1; }
.room-floor-row {
  grid-column: 1 / -1; display: grid; align-items: center; column-gap: 8px; padding: 6px 0;
  grid-template-columns: minmax(34px, max-content) minmax(0, 1fr); grid-template-columns: subgrid;
}
.room-floor-row + .room-floor-row { border-top: 1px dashed #ececec; }
.room-floor-name {
  grid-column: 1; min-width: 34px; max-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #888 !important; font-size: 13px !important; text-align: right;
}
.room-floor-rooms { grid-column: 2; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.room-floor-rooms button.room {
  /* 좌우 여백 10px · 폭은 가격 글자에 맞춰 늘어난다(최소 94px) — QA-114 김효진 10-15 */
  flex: 0 0 auto; box-sizing: border-box; width: auto; min-width: 94px; height: auto; min-height: 58px; padding: 7px 10px; overflow: hidden;
}
.apply .apply-container .room-floor-rooms strong { padding-left: 0; }
.room-floor-rooms button.room em.room-reserve { display: block; font-style: normal; white-space: nowrap; letter-spacing: -0.02em; color: #666 !important; font-size: 12px !important; font-weight: 400; }
.room-floor-rooms button.room.on em.room-reserve { color: var(--bid-brand) !important; }
.room-floor-rooms button.room.on { border-width: 1px; box-shadow: inset 0 0 0 1px var(--bid-accent); }
.room-floor-rooms button.room:focus-visible { outline: 2px solid var(--bid-brand); outline-offset: 2px; }

/* ── 호실별 입찰가 카드 ─────────────────────── */
.bid-card { margin-top: 14px; padding: 18px 20px; border: 1px solid var(--bid-accent); border-radius: 8px; background: #fff; }
.bid-card .bid-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bid-card .bid-card-head strong { color: #111 !important; font-size: 17px !important; }
.bid-card .bid-card-head strong small { margin-left: 6px; color: #999 !important; font-size: 13px !important; font-weight: 400; }
.bid-card .bid-card-head a { color: #888 !important; font-size: 13px !important; text-decoration: underline; }
.bid-card .reserve { margin-bottom: 10px; color: var(--bid-accent) !important; font-size: 14px !important; font-weight: 700; }
.bid-card .bid-input { display: flex; align-items: center; gap: 8px; }
.apply .apply-container .bid-card .bid-input input[type=text] {
  flex: 1; width: auto; max-width: 360px; height: 44px; border: 1px solid #ccc; font-size: 20px !important; font-weight: 700;
  text-align: right; color: #111;
}
.bid-card .bid-input span { color: #111 !important; font-size: 16px !important; }
/* 입력칸이 기본 최소 폭(약 20자) 아래로 줄지 못해 좁은 화면에서 "원"과 함께 카드 밖으로 밀리던 것 — 줄어들 수 있게 */
.apply .apply-container .bid-card .bid-input input[type=text] { min-width: 0; box-sizing: border-box; }
.bid-card .bid-input span { flex: none; }
/* ▼ ▲ 단추 — 입력칸과 같은 높이 44px, [▼][입력 원][▲] 한 줄 */
.bid-card .bid-input .bid-step { flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid #ccc; border-radius: 6px; background: #fff; color: #111; font-size: 14px; line-height: 1; cursor: pointer; }
.bid-card .bid-input .bid-step:hover { border-color: var(--bid-accent); }
.bid-card .bid-input .bid-step:disabled { opacity: .35; cursor: default; border-color: #ccc; }
.bid-card .bid-hangul { margin-top: 6px; color: #555 !important; font-size: 14px !important; min-height: 20px; }
.bid-card .bid-error { margin-top: 4px; color: var(--bid-danger) !important; font-size: 13px !important; display: none; }
.bid-card.error { border-color: var(--bid-danger); }
.bid-card.error .bid-error { display: block; }
.bid-empty { margin-top: 14px; padding: 18px; border: 1px dashed #ddd; border-radius: 8px; color: #999 !important; font-size: 14px !important; text-align: center; }
.bid-cards-order { margin: 14px 0 -4px; color: #888 !important; font-size: 13px !important; }

/* ── 입찰보증금 합계 ─────────────────────────── */
.deposit-sum {
  margin-top: 16px; padding: 16px 20px; border: 1px solid var(--bid-accent); border-radius: 8px; background: var(--bid-accent-bg);
}
.deposit-sum .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.deposit-sum .row strong { color: #111 !important; font-size: 15px !important; }
.deposit-sum .row em { font-style: normal; color: var(--bid-brand) !important; font-size: 22px !important; font-weight: 800; }
.deposit-sum p { margin-top: 6px; color: #666 !important; font-size: 13px !important; line-height: 1.6; }

/* ── 입찰 내용 확인 ─────────────────────────── */
/* 입찰 내용 확인 표 — 칸 폭을 똑같이(호실 · 면적 · 입찰가 3분할, 면적이 없으면 반씩) · 모두 가운데(QA-335, 내역 표 QA-332 와 같게) */
.bid-confirm-table { width: 100%; border-collapse: collapse; border-top: 2px solid #111; table-layout: fixed; }
.bid-confirm-table th, .bid-confirm-table td { padding: 14px 12px; border-bottom: 1px solid #e5e5e5; font-size: 15px !important; text-align: center !important; }
.bid-confirm-table th { color: #666; font-weight: 600; background: #fafafa; }
.bid-confirm-table td.amount { text-align: center; }
.bid-confirm-table td.amount strong { color: #111 !important; font-size: 20px !important; }
.bid-confirm-table td.amount small { display: block; color: #777 !important; font-size: 13px !important; }
.bid-confirm-check { margin-top: 20px; padding: 16px 18px; border: 1px solid #ddd; border-radius: 6px; background: #fafafa; line-height: 1.6; }
.bid-confirm-check label { color: #111 !important; }

/* ── 결과 조회 상자: 안쪽 요소 간격을 24px로 통일 (기존 상자 여백 40px 은 유지) ── */
.result .result-container.bid-result-box { display: flex; flex-direction: column; gap: 24px; }
.result .result-container.bid-result-box > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.result .result-container.bid-result-box > br { display: none; }

/* ── 결과·상태 배지 ─────────────────────────── */
.bid-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 13px !important; font-weight: 700; }
.bid-badge.win { color: #fff !important; background: var(--bid-brand); }
.bid-badge.lose { color: #777 !important; background: #eee; }
/* 입금이 확인되지 않아 낙찰 대상에서 빠진 신청 — 결과 아래 빨간 안내(r20, 10-14). 빨강은 테스트 기간 안내(.preview-notice)와 같다 */
.bid-result-guide .bid-result-unpaid { color: #c9151e !important; font-weight: 600; }
.bid-badge.wait { color: #8a651e !important; background: #fff3d6; }
.bid-badge.done { color: #2f7d5d !important; background: #e6f1eb; }

.bid-result-table { width: 100%; border-collapse: collapse; border-top: 2px solid #111; margin: 10px 0 6px; }
.bid-result-table th, .bid-result-table td { padding: 12px 10px; border-bottom: 1px solid #e5e5e5; font-size: 15px !important; text-align: center; }
.bid-result-table th { color: #666; background: #fafafa; }
/* 입찰 신청 내역의 입찰 호실 표 — 칸 폭을 똑같이(호실 · 입찰가 50%씩, 면적이 있으면 셋이 같게). 개봉 전 «암호화» · 개봉 뒤 금액에 따라 폭이 바뀌었다(QA-332) */
.bid-result-table.bid-info-table { table-layout: fixed; }
/* 입찰가: 결과 화면마다 정렬이 달라지지 않도록 가운데로 고정 (기존 #result 하위 규칙과 충돌 방지) */
.body-container .bid-result-table td.amount { text-align: center !important; color: #111; font-variant-numeric: tabular-nums; }

.bid-win-banner { margin: 10px 0 20px; padding: 26px 20px; border: 1px solid var(--bid-accent); background: var(--bid-accent-bg); text-align: center; }
.bid-win-banner strong { display: block; color: #111 !important; font-size: 18px !important; font-weight: 700; font-family: NanumSquare, serif; }
.bid-win-banner .rooms { display: block; margin-top: 6px; font-style: normal; color: var(--bid-accent) !important; font-size: 30px !important; font-weight: 800; font-family: NanumSquare, serif; letter-spacing: -0.02em; }
.bid-win-banner p { margin-top: 6px; color: #555 !important; font-size: 14px !important; }

/* ── 입찰 안내 개요 표(점선 줄) · 공고 PDF 띠 · 유의사항 p.li 는 입찰 · 비입찰 공통이라 harness-base.css 로 옮겼다(QA-187) ── */

/* ── 신청 유형(개인/법인) 선택 카드는 입찰 · 비입찰 공통이라 common/css/company-select.css 로 옮겼다(10-15) ── */


@media only screen and (max-width: 620px) {
  .room-grid { grid-template-columns: repeat(2, 1fr); }
  .room-buildings { grid-template-columns: minmax(0, 1fr); }
  .room-building { padding: 12px 12px 8px; }
  .room-floor-rooms button.room { flex: 1 1 94px; width: auto; max-width: 120px; }
  .apply .apply-container .bid-card .bid-input input[type=text] { max-width: none; }
}

/* 입찰가 암호화 안내 */
.lock-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: -3px; }
.bid-enc-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; padding: 16px 18px; border: 1px solid var(--bid-accent, #986C40); border-radius: 6px; background: var(--bid-accent-bg, #FAF6F1); }
.bid-enc-note .lock-ico { width: 22px; height: 22px; color: var(--bid-accent, #986C40); margin-top: 1px; }
.bid-enc-note p { margin: 0; line-height: 1.6; color: #333 !important; font-size: 14px !important; }
.bid-enc-note b { color: #111 !important; }
.bid-result-table td.amount.sealed { color: #888 !important; font-weight: 400; }
.bid-result-table td.amount.sealed .lock-ico { width: 15px; height: 15px; margin-right: 4px; }
.bid-sealed-guide { margin: 10px 0 18px; line-height: 1.6; word-break: keep-all; color: #777 !important; font-size: 13px !important; text-align: left; }

/* 결과 화면 하단 안내문구는 다른 결과 화면과 같이 좌측 정렬 (#result 는 기존 공통 CSS 가 가운데 정렬) */
#result .bid-result-box .guide { text-align: left; }

/* 검수용 미리보기 안내 — 자리 · 크기만. 색(빨강)은 입찰 · 비입찰 공통이라 harness-base.css 에 둔다(QA-187) */
.preview-notice { margin: 0 0 20px; padding: 12px 16px; border-width: 1px; border-style: solid; border-radius: 4px; font-size: 14px !important; line-height: 1.6; text-align: left; }

/* 접수 완료: 테스트 기간 안내는 결과 문구 박스 밖(위)에, 결과 조회와 같은 빨간 안내로 */
.test-notice { text-align: center; }

/* 신청 예외 화면: 입찰 준비 중 안내 */
.error-container .ready-guide { display: inline-block; margin-top: 6px; color: #555 !important; }

/* 입찰 제출 확인 레이어 — 기존 .cancelConfirm 레이어 모양에 딤과 호실 · 입찰가 표만 더한다 */
.bid-layer-dim{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:998}
.bid-submit-layer{position:fixed;width:calc(100% - 32px);max-width:420px;padding:44px 24px 28px;transform:translate(-50%,-50%);box-sizing:border-box}
.bid-submit-layer .guide{padding:0;margin-bottom:14px}
.bid-submit-list{width:100%;border-collapse:collapse;border-top:2px solid #111;margin-bottom:28px;font-size:15px}
.bid-submit-list th,.bid-submit-list td{padding:11px 8px;border-bottom:1px solid #e5e5e5}
.bid-submit-list th{font-weight:600;color:#555;font-size:13px}
.bid-submit-list td:last-child{text-align:right;font-weight:700}
.bid-submit-list th:last-child{text-align:right}
.bid-submit-layer .guide2{margin:0 0 24px}
.bid-submit-layer .button-container{margin:0;padding:0;display:flex;gap:8px;justify-content:center}
.bid-submit-layer .button-container button{width:auto !important;min-width:120px;margin:0}
/* 결과 발표 뒤 내역 조회 닫힘 — «입찰 결과 조회» 가 기본 폭(100px) · 글자 간격에 두 줄로 꺾였다. 글자 폭대로 한 줄 */
.bid-search-closed .button-container button{width:auto !important;min-width:120px;padding:0 24px;white-space:nowrap}

/* 입찰 내용 확인 — 수정 · 취소 불가 안내는 빨간 글씨 (제출 확인 레이어의 .guide2 와 같은 색) */
.bid-warn-title{color:#f00 !important}



/* 메인 브라우저 안내 — 모바일에서 한 줄로 */
@media only screen and (max-width: 620px) { .intro-container .browser-guide { font-size: 12px; letter-spacing: -0.04em; white-space: nowrap; } }

/* 메인 · 일정 아래 안내 — 모바일에서 단어 단위로 줄바꿈, 계약기간 바로 아래로 붙인다 */
@media only screen and (max-width: 620px) {
  .intro-container .detail p.guide { word-break: keep-all; }   /* 들여쓰기 · 크기는 기존 그대로, 단어 중간에서만 끊지 않는다 */
  .intro-container .detail ul { margin-bottom: 0; }   /* 계약기간과 안내 문장 사이를 좁힌다 */
  .intro-container .detail p.guide { margin-top: 6px; }
}

/* 관리자 결과 미리보기 띠 (SUPER, 발표 전) */
.admin-preview-bar { position: sticky; top: 0; z-index: 9000; display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; align-items: center; padding: 10px 16px; background: #d4111e; color: #fff; font-size: 14px; line-height: 1.5; text-align: center; word-break: keep-all; }
.admin-preview-bar * { color: #fff !important; }
body.admin-preview .preview-notice { display: none !important; }

/* 접수 완료 — 입금 기한 강조. 계좌번호 · 입금자명 [복사] 는 입찰 · 비입찰 공통이라 common/css/deposit-copy.css 로 옮겼다(QA-172) */
.bid-due { margin-top: 10px; text-align: center; color: #333 !important; font-size: 15px !important; }
.bid-due b, .bid-due-inline { color: var(--bid-danger) !important; font-weight: 700; }

/* ── 360px 점검 결과 ── */
/* 빨간 경고 제목: 단어 중간에서 끊지 않는다 */
.bid-warn-title { word-break: keep-all; }

/* 입찰 내용 확인 — 신청자(구분 · 이름 · 환불계좌) */
/* 신청자는 맨 위(경고 문구 바로 아래), 환불계좌는 본인이 확인하도록 마스킹 없이 전체 */
.bid-who { margin: 22px 0 24px; }
.bid-who h3 { margin: 0 0 8px; padding: 0; color: #111 !important; font-size: 15px !important; font-weight: 700; }
/* 입찰 호실 표처럼 제목 아래에 굵은 선 */
.bid-who h3 + dl { border-top: 2px solid #111; }
.bid-who dl { display: flex; align-items: center; gap: 12px; float: none; width: auto; height: auto !important; margin: 0; padding: 10px 0; border-bottom: 1px solid #e5e5e5; }
.bid-who dt, .bid-who dd, .bid-who dd span { float: none; width: auto; height: auto; margin: 0; padding: 0; line-height: 1.5 !important; }
.bid-who dt { flex: 0 0 90px; color: #666 !important; font-size: 14px !important; }
.bid-who dd { flex: 1; min-width: 0; color: #111 !important; font-size: 14px !important; word-break: keep-all; }

/* 입찰 신청 내역 조회 — 입금 기한은 납부 안내 표(5칸) 아래 안내 문장으로 */
.bid-due-note { margin: 14px 0 0; color: #555 !important; font-size: 14px !important; line-height: 1.6; text-align: left; word-break: keep-all; }
.bid-sub-h { margin: 0 0 8px; color: #111 !important; font-size: 15px !important; font-weight: 700; }

/* ── 글꼴 · 자간 · 줄바꿈 · 본인인증 줄 · 환불계좌 · 예외 화면 여백 · 납부 안내 정렬은 입찰 · 비입찰 공통이라 harness-base.css 로,
   법인 정보 입력칸 폭은 company-select.css 로 옮겼다(QA-187) ── */
