/* 공고함 (bids.html): search demo in the subpage design language. */
/* SEMO brand purple (the accent used across the landing: active menu, links, highlights). */
body.subpage { --bids-brand: #7938d6; --bids-brand-hover: #6a2bc4; }
.bids-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bids-demo {
  position: relative; margin-top: 72px; padding: 56px 56px 48px; border-radius: 32px;
  background: radial-gradient(120% 90% at 85% 100%, #e4d6fb 0%, transparent 60%), linear-gradient(160deg, #faf8fe 0%, #f6f2fd 55%, #ebe1fc 100%);
  letter-spacing: -.03em;
}
.bids-demo__head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.sp-flow .page-content .bids-demo .bids-demo__title { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.4; color: #191f28; }
.sp-flow .page-content .bids-demo .bids-demo__note { margin: 0; font-size: 15px; line-height: 1.6; color: #8b95a1; }

/* Search field */
.bids-search {
  display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 16px; border: 1px solid #e5e8eb; border-radius: 32px;
  background: #fff;
  transition: box-shadow .2s ease;
}
.bids-search:focus-within { box-shadow: 0 0 0 2px #7938d6; }
.bids-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none;
  font: inherit; font-size: 18px; color: #191f28; letter-spacing: -.03em;
}
.bids-search input::placeholder { color: #b0b8c1; }
.bids-search input::-webkit-search-cancel-button { display: none; }
.bids-search button {
  height: 48px; padding: 0 24px; border: 0; border-radius: 24px; cursor: pointer;
  background: var(--bids-brand); color: #fff; font: inherit; font-size: 16px; font-weight: 600; letter-spacing: -.03em;
  transition: background .18s ease;
}
.bids-search button:hover { background: var(--bids-brand-hover); }

.bids-industries__chips button, .bids-sources button {
  height: 36px; padding: 0 16px; border: 0; border-radius: 18px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 500; letter-spacing: -.03em; transition: background .18s ease, color .18s ease;
}

/* Industry chips — the same «많이 고르는 키워드» as supplier signup */
.bids-industries { margin-top: 28px; }
.sp-flow .page-content .bids-demo .bids-industries__label { margin: 0 0 12px; font-size: 15px; font-weight: 500; line-height: 1.5; color: #4e5968; }
.bids-industries__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bids-industries__chips button { background: rgba(255, 255, 255, .7); color: #4e5968; box-shadow: inset 0 0 0 1px rgba(25, 31, 40, .04); }
.bids-industries__chips button:hover { background: #fff; color: #191f28; }
.bids-industries__chips button[aria-pressed="true"] { background: #7938d6; color: #fff; box-shadow: 0 6px 16px rgba(121, 56, 214, .22); }
.bids-industries__chips button[aria-pressed="true"]::before { content: ""; display: inline-block; width: 6px; height: 10px; margin: 0 8px 2px 0; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); vertical-align: middle; }
.bids-industries__chips button:focus-visible, .bids-sources button:focus-visible { outline: 2px solid #7938d6; outline-offset: 2px; }

/* «지금 맞는 공고 N건 | 지난 1년 M건» */
.bids-match { display: flex; width: fit-content; max-width: 100%; align-items: center; flex-wrap: wrap; gap: 8px 0; margin-top: 24px; padding: 16px 8px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px rgba(121, 56, 214, .1); animation: bids-in .45s cubic-bezier(.22, 1, .36, 1) both; }
.bids-match[hidden], .bids-match__year[hidden] { display: none; }
.sp-flow .page-content .bids-demo .bids-match__stat { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin: 0; padding: 0 20px; font-size: 16px; font-weight: 500; color: #4e5968; }
.bids-match__stat + .bids-match__stat { border-left: 1px solid #ebe5f5; }
.bids-match__stat strong { font-size: 22px; font-weight: 700; color: #7938d6; font-variant-numeric: tabular-nums; }
.bids-match__stat small { font-size: 13px; color: #8b95a1; font-variant-numeric: tabular-nums; }

.bids-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 40px 0 16px; }
.bids-sources { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 22px; background: rgba(255, 255, 255, .55); }
.bids-sources button { background: none; color: #6b7684; }
.bids-sources button:hover { color: #191f28; }
.bids-sources button[aria-checked="true"] { background: #fff; color: #191f28; }
.bids-sources button[hidden], .bids-toolbar[hidden] { display: none; }
.bids-sources__n { margin-left: 6px; font-size: 13px; font-weight: 500; color: #8b95a1; font-variant-numeric: tabular-nums; }
.bids-sources__n:empty { display: none; }
.bids-sources button[aria-checked="true"] .bids-sources__n { color: #7938d6; }
.sp-flow .page-content .bids-demo .bids-count { margin: 0; font-size: 14px; color: #8b95a1; }

/* Result rows */
.sp-flow .page-content .bids-demo .bids-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; max-width: none; }
.sp-flow .page-content .bids-demo .bids-list > li { margin: 0; }
.sp-flow .page-content .bids-demo .bids-toolbar[hidden] + .bids-list { margin-top: 32px; }
.bids-item { animation: bids-in .5s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--k, 0) * 40ms); }
.bids-demo[data-refreshing] .bids-list, .bids-demo[data-refreshing] .bids-more { opacity: .55; transition: opacity .2s ease; }
@keyframes bids-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.bids-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; grid-template-areas: "top locked go" "title locked go" "meta locked go";
  align-items: center; column-gap: 24px; row-gap: 4px; width: 100%; padding: 24px; border: 1px solid #e5e8eb; border-radius: 20px; cursor: pointer; text-align: left;
  background: #fff; color: #191f28; font: inherit; letter-spacing: -.03em;
  transition: border-color .2s ease, background-color .2s ease;
}
.bids-row:hover { border-color: #c4a0ee; background: #fcfaff; }
.bids-row:focus-visible { outline: 2px solid #7938d6; outline-offset: 2px; }
.bids-row__top { grid-area: top; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bids-badge { padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #f2f4f6; color: #4e5968; }
.bids-badge[data-src="SEMO"] { background: #f1e9fd; color: #7938d6; }
.bids-due { font-size: 13px; font-weight: 500; color: #8b95a1; }
.bids-due.is-soon { color: #e5484d; }
.bids-hit { padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #f1e9fd; color: #7938d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14em; }
.bids-row__title { grid-area: title; font-size: 18px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.bids-row__title mark { background: none; color: #7938d6; }
.bids-row__meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: baseline; font-size: 14px; color: #8b95a1; }
.bids-row__meta > .bids-org { font-size: 15px; font-weight: 600; color: #333d4b; }
.bids-posted { font-size: 13px; color: #8b95a1; white-space: nowrap; }
.bids-row__meta { gap: 4px 0; }
.bids-row__meta > span + span::before { content: "·"; margin: 0 8px; color: #c4cad1; }
.bids-row__meta > span { overflow-wrap: anywhere; }
.bids-row__locked { grid-area: locked; display: flex; gap: 28px; justify-self: end; }
.bids-field { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.bids-field__label { font-size: 12px; color: #8b95a1; }
.bids-blur { font-size: 15px; font-weight: 600; color: #333d4b; filter: blur(5px); user-select: none; }
.bids-row__go { grid-area: go; display: inline-flex; align-items: center; justify-content: center; font-size: 0; color: #b0b8c1; transition: color .2s ease, transform .2s ease; }
.bids-row:hover .bids-row__go { color: #7938d6; transform: translateX(2px); }

/* Rows past the preview fade out under the sign-up prompt */
/* Rows past the preview stay readable (title, agency); only amount/qualification are blurred. */
.bids-item.is-locked:nth-last-child(2) { opacity: .82; }
.bids-item.is-locked:last-child { opacity: .55; }
.bids-more {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 20px; margin-top: 8px; padding-top: 8px; text-align: center;
}
.bids-demo[data-locked] .bids-more { margin-top: 24px; padding-top: 0; }
.sp-flow .page-content .bids-demo .bids-more p { margin: 0; font-size: 17px; font-weight: 500; color: #333d4b; }
.bids-more[hidden] { display: none; }
.bids-empty { padding: 48px 24px; border-radius: 20px; background: rgba(255, 255, 255, .7); text-align: center; word-break: keep-all; }
.sp-flow .page-content .bids-demo .bids-empty p { margin: 0; font-size: 16px; color: #6b7684; }
.sp-flow .page-content .bids-demo .bids-empty p:first-child { margin-bottom: 6px; color: #191f28; }
.bids-empty strong { font-weight: 600; }

/* Loading placeholders */
.bids-skeleton { display: flex; flex-direction: column; gap: 10px; padding: 24px 28px; border-radius: 20px; background: rgba(255, 255, 255, .72); }
.bids-skeleton span { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, #efeaf8 0%, #f7f4fc 50%, #efeaf8 100%); background-size: 200% 100%; animation: bids-shimmer 1.4s ease-in-out infinite; }
.bids-skeleton span:nth-child(1) { width: 22%; }
.bids-skeleton span:nth-child(2) { width: 64%; height: 18px; }
.bids-skeleton span:nth-child(3) { width: 40%; }
@keyframes bids-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Primary actions in brand purple (가입하고 전체 보기 · 기업 가입하고 공고함 열기 · 상세 창 · 페이지 끝 큰 버튼) */
.sp-cta-button {
  background: var(--bids-brand); box-shadow: 0 10px 24px rgba(121, 56, 214, .24);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.sp-cta-button:hover { background: var(--bids-brand-hover); }
.sp-cta-button svg { background: rgba(255, 255, 255, .22); }

/* Company sign-up at the very bottom of the 공고함 box */
.bids-join {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px 48px;
  margin-top: 40px; padding: 40px 44px; border-radius: 28px; background: #fff;
  box-shadow: 0 24px 60px rgba(73, 38, 140, .1), 0 0 0 1px rgba(121, 56, 214, .08);
}
.sp-flow .page-content .bids-demo .bids-join p { margin: 0; }
.sp-flow .page-content .bids-demo .bids-join__eyebrow { margin-bottom: 12px; font-size: 15px; font-weight: 600; color: #7938d6; }
.sp-flow .page-content .bids-demo .bids-join__title { margin: 0 0 14px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; line-height: 1.38; color: #191f28; letter-spacing: -.03em; }
.sp-flow .page-content .bids-demo .bids-join__lead { max-width: 520px; font-size: 16px; line-height: 1.7; color: #6b7684; word-break: keep-all; }
.bids-join__action { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.sp-flow .page-content .bids-demo .bids-join__fact { max-width: 380px; font-size: 15px; line-height: 1.6; color: #4e5968; text-align: right; text-wrap: balance; word-break: keep-all; }
.bids-join__fact strong { color: #7938d6; font-weight: 700; font-variant-numeric: tabular-nums; }
.bids-join__fact[hidden] { display: none; }
.bids-join__button { height: 56px; padding: 0 10px 0 26px; font-size: 17px; font-weight: 600; white-space: nowrap; }

/* Sign-up gate */
.bids-gate { width: min(480px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 28px; background: #fff; color: #191f28; box-shadow: var(--shadow-overlay, 0 8px 24px -8px rgb(25 31 40 / 0.16)); letter-spacing: -.03em; }
.bids-gate::backdrop { background: rgba(25, 31, 40, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.bids-gate[open] { animation: bids-gate-in .4s cubic-bezier(.22, 1, .36, 1); }
@keyframes bids-gate-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.bids-gate__panel { padding: 40px 36px 32px; }
.bids-gate__eyebrow { margin: 0 0 12px; font-size: 14px; color: #7938d6; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bids-gate h2 { margin: 0 0 10px; font-size: 24px; font-weight: 600; line-height: 1.4; }
.bids-gate__lead { margin: 0 0 20px; font-size: 16px; color: #6b7684; }
.bids-gate ul { margin: 0 0 32px; padding: 20px 24px; border-radius: 16px; background: #f8f6fc; list-style: none; }
.bids-gate li { position: relative; padding-left: 16px; font-size: 15px; line-height: 1.6; color: #333d4b; }
.bids-gate li + li { margin-top: 8px; }
.bids-gate li::before { content: ""; position: absolute; left: 0; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: #a88bcf; }
.bids-gate__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bids-gate__close { border: 0; background: none; padding: 12px 4px; cursor: pointer; font: inherit; font-size: 15px; color: #6b7684; letter-spacing: -.03em; }
.bids-gate__close:hover { color: #191f28; }

@media (max-width: 760px) {
  .bids-demo { margin-top: 48px; padding: 28px 16px 20px; border-radius: 24px; }
  .sp-flow .page-content .bids-demo .bids-demo__title { font-size: 21px; }
  .bids-demo__head { margin-bottom: 18px; gap: 6px; }
  .sp-flow .page-content .bids-demo .bids-demo__note { font-size: 14px; }
  .bids-industries { margin-top: 22px; }
  .bids-industries__chips { gap: 6px; }
  .bids-industries__chips button { height: 34px; padding: 0 13px; font-size: 14px; }
  .bids-match { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 4px; }
  .bids-match__stat + .bids-match__stat { border-left: 0; }
  .sp-flow .page-content .bids-demo .bids-match__stat { padding: 0 14px; font-size: 15px; }
  .bids-match__stat strong { font-size: 20px; }
  .bids-toolbar { margin: 28px 0 12px; gap: 10px; }
  .bids-sources { width: 100%; }
  .bids-sources button { height: 32px; padding: 0 11px; font-size: 13px; }
  .bids-row__top { flex-wrap: wrap; row-gap: 6px; }
  .bids-row__title { font-size: 17px; }
  .bids-join { grid-template-columns: 1fr; padding: 28px 22px; border-radius: 22px; margin-top: 28px; }
  .bids-join__action { align-items: stretch; }
  .sp-flow .page-content .bids-demo .bids-join__fact { max-width: none; text-align: left; }
  .bids-join__button { justify-content: space-between; width: 100%; }
  .bids-gate__panel { padding: 32px 22px 24px; }
  .bids-gate__actions { flex-direction: column-reverse; align-items: stretch; }
  .bids-gate__actions .sp-cta-button { justify-content: space-between; }
  .bids-row { grid-template-columns: 1fr; grid-template-areas: "top" "title" "meta" "locked"; padding: 16px; }
  .bids-row__locked { margin-top: 10px; }
  .bids-row__locked { justify-self: start; }
  .bids-field { align-items: flex-start; }
  .bids-row__go { display: none; }
  .bids-search { height: 56px; padding: 0 16px; }
  .bids-search input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .bids-item, .bids-gate[open], .bids-match, .bids-skeleton span { animation: none; }
}

/* Phone width (bids page only): the shared header and 64px content inset are
   wider than a 390px screen. Drop the inset and move the main menu to its own
   row that scrolls inside itself, so the page never scrolls sideways. */
@media (max-width: 640px) {
  body.subpage { --content-inset: 0px; }
  body.subpage > header { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; min-height: 0; padding: 14px 0 6px; }
  body.subpage > header nav[aria-label="주요 메뉴"] {
    grid-row: 2; grid-column: 1 / -1; justify-self: stretch; justify-content: space-between; gap: 16px; overflow-x: auto; padding-block: 6px; font-size: 15px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  body.subpage > header nav[aria-label="주요 메뉴"]::-webkit-scrollbar { display: none; }
  body.subpage > header a.header-cta { padding: 8px 14px; }
}
