/* 매물 접수 "매물 구해요 / 매물 내놓아요" - 진입 카드(메인·메뉴)와 접수 화면 (views/inquiry.ejs, inquiry_done.ejs, parts/inquiry_cards.ejs) */
:root {
  --iq-buy: #d9661a;
  --iq-buy-dark: #b8520f;
  --iq-sell: #1d7485;
  --iq-sell-dark: #155b69;
  --iq-line: #b9bec5;
  --iq-text: #222;
  --iq-sub: #666;
  --iq-error: #d0312d;
}

/* ── 진입 버튼 (한 줄) ── */
.iq-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.iq-card {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 6px 10px; box-sizing: border-box; border-radius: 5px; color: #fff !important; text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); -webkit-tap-highlight-color: transparent;
}
.iq-card:active { transform: translateY(1px); }
.iq-card.buy { background: var(--iq-buy); }
.iq-card.sell { background: var(--iq-sell); }
.iq-card.buy:hover { background: var(--iq-buy-dark); }
.iq-card.sell:hover { background: var(--iq-sell-dark); }
.iq-card svg { flex: none; width: 20px; height: 20px; fill: #fff; }
.iq-card-title { font-size: 16px; font-weight: bold; letter-spacing: -0.3px; white-space: nowrap; }

/* 모바일: 손가락으로 누르기 좋은 높이 */
.iq-cards.mobile .iq-card, .iq-cards.compact .iq-card { min-height: 46px; border-radius: 6px; }
.iq-cards.mobile .iq-card-title, .iq-cards.compact .iq-card-title { font-size: 17px; }

/* ── 접수 화면 ── */
.iq-page { max-width: 640px; margin: 0 auto 40px; padding: 0 16px; box-sizing: border-box; color: var(--iq-text); font-size: 17px; line-height: 1.5; }
.iq-page.pc { margin-top: 24px; }
.iq-page *, .iq-page *::before, .iq-page *::after { box-sizing: border-box; }
.iq-page [hidden] { display: none !important; }

.iq-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid #34495e; border-radius: 8px; overflow: hidden; margin-bottom: 18px; }
.iq-tabs a { display: flex; align-items: center; justify-content: center; min-height: 50px; font-size: 17px; font-weight: bold; color: #34495e; text-decoration: none; background: #fff; }
.iq-tabs a + a { border-left: 2px solid #34495e; }
.iq-tabs a.on.buy { background: var(--iq-buy); color: #fff; }
.iq-tabs a.on.sell { background: var(--iq-sell); color: #fff; }

.iq-title { font-size: 24px; font-weight: bold; margin: 0 0 6px; letter-spacing: -0.5px; }
.iq-lead { font-size: 16px; color: var(--iq-sub); margin: 0 0 6px; word-break: keep-all; }
.iq-reqnote { font-size: 14px; color: var(--iq-sub); margin: 0 0 14px; }
.iq-req { color: var(--iq-error); font-weight: bold; margin-left: 2px; }

.iq-form { margin: 0; }
.iq-field { padding: 18px 0; border-top: 1px solid #e3e5e8; }
.iq-label { display: block; font-size: 18px; font-weight: bold; margin-bottom: 10px; }
.iq-label .iq-opt, .iq-sublabel .iq-opt { font-size: 14px; font-weight: normal; color: #888; margin-left: 4px; }
.iq-help { font-size: 14px; color: var(--iq-sub); margin: -4px 0 10px; word-break: keep-all; }
.iq-sublabel { display: block; font-size: 16px; font-weight: bold; margin: 12px 0 6px; }
.iq-sublabel:first-child { margin-top: 0; }

/* 버튼식 선택 */
.iq-chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.iq-chips.c3 { grid-template-columns: repeat(3, 1fr); }
.iq-chips.c4 { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 480px) {
  .iq-chips.w4 { grid-template-columns: repeat(4, 1fr); }
}
.iq-chip { position: relative; display: block; margin: 0; cursor: pointer; }
.iq-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.iq-chip span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 6px 6px; border: 1.5px solid var(--iq-line); border-radius: 8px;
  background: #fff; font-size: 16px; line-height: 1.25; word-break: keep-all; user-select: none;
}
.iq-chip input:checked + span { color: #fff; font-weight: bold; }
.iq-page.buy .iq-chip input:checked + span { background: var(--iq-buy); border-color: var(--iq-buy); }
.iq-page.sell .iq-chip input:checked + span { background: var(--iq-sell); border-color: var(--iq-sell); }
.iq-chip input:focus-visible + span { outline: 3px solid #5b9dd9; outline-offset: 2px; }

.iq-input, .iq-textarea {
  width: 100%; height: 54px; padding: 0 14px; border: 1.5px solid var(--iq-line); border-radius: 8px;
  font-size: 17px; font-family: inherit; color: var(--iq-text); background: #fff; -webkit-appearance: none; appearance: none;
}
.iq-textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.iq-input:focus, .iq-textarea:focus { outline: none; border-color: #34495e; box-shadow: 0 0 0 3px rgba(52, 73, 94, 0.18); }
.iq-input::placeholder, .iq-textarea::placeholder { color: #9aa0a6; }
.iq-input + .iq-input { margin-top: 8px; }

.iq-money { display: flex; align-items: center; gap: 8px; }
.iq-money .iq-input { flex: 1; text-align: right; font-weight: bold; }
.iq-money .iq-unit { flex: none; font-size: 17px; }
.iq-money-hint { min-height: 20px; margin-top: 4px; font-size: 14px; color: #34495e; text-align: right; }
.iq-price-empty { font-size: 15px; color: var(--iq-sub); background: #f4f5f7; border-radius: 8px; padding: 14px; }
.iq-price-row + .iq-price-row { margin-top: 10px; }

.iq-area { display: flex; gap: 8px; }
.iq-area .iq-input { flex: 1; }
.iq-area .iq-chips { flex: none; width: 128px; grid-template-columns: 1fr 1fr; gap: 6px; }

.iq-error { margin-top: 8px; font-size: 15px; color: var(--iq-error); font-weight: bold; word-break: keep-all; }
.iq-error:empty { display: none; }
.iq-invalid .iq-input, .iq-invalid .iq-textarea, .iq-invalid .iq-chip span { border-color: var(--iq-error); }
.iq-alert { padding: 14px 16px; border-radius: 8px; background: #fdecea; color: #a1231f; font-size: 16px; font-weight: bold; margin-bottom: 14px; word-break: keep-all; }

/* 사진 */
.iq-file { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border: 1.5px dashed #8a9199; border-radius: 8px; background: #f8f9fa; font-size: 16px; font-weight: bold; color: #34495e; cursor: pointer; }
.iq-file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.iq-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.iq-thumbs:empty { display: none; }
.iq-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #eee; }
.iq-photo-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 14px; color: var(--iq-sub); }
.iq-photo-bar button { border: none; background: none; color: var(--iq-error); font-size: 14px; text-decoration: underline; padding: 6px 0; cursor: pointer; }

/* 개인정보 동의 */
.iq-consent { border: 1.5px solid var(--iq-line); border-radius: 8px; padding: 14px; background: #fafbfc; }
.iq-check { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: bold; cursor: pointer; }
.iq-check input { width: 26px; height: 26px; flex: none; margin: 0; accent-color: #34495e; }
.iq-consent details { margin-top: 10px; font-size: 15px; }
.iq-consent summary { cursor: pointer; color: #34495e; text-decoration: underline; padding: 4px 0; }
.iq-consent table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; background: #fff; }
.iq-consent th, .iq-consent td { border: 1px solid #d6d9dd; padding: 8px; text-align: left; vertical-align: top; word-break: keep-all; }
.iq-consent th { width: 84px; background: #eef0f2; white-space: nowrap; }
.iq-consent p { margin: 8px 0 0; font-size: 14px; color: var(--iq-sub); word-break: keep-all; }

.iq-submit {
  display: block; width: 100%; min-height: 58px; margin-top: 22px; border: none; border-radius: 8px;
  font-size: 19px; font-weight: bold; color: #fff; cursor: pointer; font-family: inherit;
}
.iq-page.buy .iq-submit { background: var(--iq-buy); }
.iq-page.sell .iq-submit { background: var(--iq-sell); }
.iq-submit:disabled { opacity: 0.6; cursor: wait; }
.iq-call { margin-top: 14px; text-align: center; font-size: 15px; color: var(--iq-sub); }
.iq-call a { color: #34495e; font-weight: bold; }

/* 자동 프로그램용 숨김 칸 (사람에게는 안 보임) */
.iq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* 완료 화면 */
.iq-done { text-align: center; padding: 30px 0 10px; }
.iq-done-icon { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.iq-done-icon svg { width: 40px; height: 40px; fill: #fff; }
.iq-done h1 { font-size: 23px; margin: 0 0 10px; line-height: 1.4; word-break: keep-all; }
.iq-done p { font-size: 17px; color: var(--iq-sub); margin: 0 0 20px; word-break: keep-all; }
.iq-phone-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; border-radius: 8px; background: #34495e; color: #fff !important; font-size: 20px; font-weight: bold; text-decoration: none; }
.iq-phone-btn svg { width: 22px; height: 22px; fill: #fff; }
.iq-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.iq-links a { display: flex; align-items: center; justify-content: center; min-height: 50px; border: 1.5px solid var(--iq-line); border-radius: 8px; color: #333; font-size: 16px; font-weight: bold; text-decoration: none; background: #fff; }
