/* JOB KONG real-data layout guard
   Keeps long, frequently changing vacancy content readable without changing
   the locked application structure. */

/* Every grid/flex column that can contain live data must be allowed to shrink. */
:where(
  .consumer-shell > *,
  .consumer-filters > *,
  .consumer-job > *,
  .detail-top > *,
  .company-panel > *,
  .related-job > *,
  .result-card > *,
  .home-job > *,
  .home-company > *,
  .company-title > *,
  .company-job-row > *,
  .insight-list-card > *,
  .feature-row > *,
  .crm-candidate-card > *,
  .crm-profile-head > *,
  .admin-row > *
){min-width:0}

/* Vacancy stream: title first, salary second. Real salary descriptions can be
   much longer than the compact ranges used by the original prototype. */
.consumer-job{min-height:0;padding-bottom:50px}
.consumer-job.active{padding-bottom:49px}
.job-line{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:start;
  justify-content:stretch;
  gap:7px;
}
.job-line b{
  display:-webkit-box;
  min-width:0;
  font-size:17px;
  line-height:1.45;
  overflow:hidden;
  overflow-wrap:anywhere;
  word-break:break-word;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
}
.job-line .job-pay{
  display:-webkit-box;
  justify-self:start;
  width:auto;
  max-width:100%;
  padding:4px 8px;
  border-radius:7px;
  background:#e7f8f6;
  color:#008f88;
  font-size:14px;
  font-weight:800;
  line-height:1.45;
  white-space:normal;
  overflow:hidden;
  overflow-wrap:anywhere;
  word-break:break-word;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.mini-tags,.detail-tags{display:flex;flex-wrap:wrap;gap:5px}
.mini-tags span,.detail-tags span{margin:0}
.consumer-job p{
  display:-webkit-box;
  min-width:0;
  overflow:hidden;
  overflow-wrap:anywhere;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.company-line{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:8px;
}
.company-line span{min-width:0;overflow-wrap:anywhere}
.company-line span:last-child{text-align:right}
.job-source{
  display:-webkit-box;
  min-height:34px;
  padding-right:78px;
  overflow:hidden;
  overflow-wrap:anywhere;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.compare-check{max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Vacancy detail: preserve source paragraphs and stop imported descriptions
   from creating horizontal overflow. */
.detail-top{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start}
.detail-top h1,.detail-pay,.detail-meta,.detail-section,.company-panel,.related-job{
  overflow-wrap:anywhere;
  word-break:break-word;
}
.detail-pay{max-width:100%;line-height:1.45}
.detail-meta,.detail-tags{line-height:1.7}
.detail-section p{
  max-width:82ch;
  white-space:pre-line;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.detail-section a,.official-source-link{max-width:100%;overflow-wrap:anywhere}
.company-panel,.related-job{gap:14px}
.company-panel > :last-child,.related-job > :last-child{flex:none;text-align:right}
.result-card{grid-template-columns:minmax(0,1fr) auto}
.result-card :where(b,strong,span),.related-job :where(b,strong,span){overflow-wrap:anywhere}

/* Home, editorial, personal, employer and operations workspaces share the same
   long-content safety rules. */
:where(
  .home-job-top b,
  .home-job-pay,
  .company-title h3,
  .company-job-row span,
  .company-job-row b,
  .mode-card b,
  .insight-list-card h3,
  .bbs-article-head h1,
  .bbs-content,
  .simple-message,
  .simple-application,
  .crm-candidate-top b,
  .crm-candidate-card h3,
  .crm-profile-head h1,
  .crm-task span,
  .admin-row b,
  .admin-row span,
  .admin-row small
){overflow-wrap:anywhere;word-break:break-word}
.home-job-top{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:start;
  gap:8px;
}
.home-job-pay{justify-self:start;max-width:100%;white-space:normal;line-height:1.45}
.company-title h3,.insight-list-card h3,.mode-card b{
  display:-webkit-box;
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
}
.company-job-row,.feature-row,.crm-candidate-top,.admin-row > div{align-items:flex-start;flex-wrap:wrap}
.company-job-row > :last-child,.feature-row > :last-child{margin-left:auto;text-align:right}

/* Header and filters should compress or scroll instead of pushing the canvas. */
body > header{gap:12px}
body > header .brand,body > header .site-ad,body > header .account-actions{min-width:0}
body > header .site-ad{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.consumer-filters{min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
.consumer-filters input{min-width:180px}

@media(max-width:1280px){
  .detail-top{grid-template-columns:minmax(0,1fr);gap:16px}
  .detail-top .job-actions{justify-self:start}
  body > header .brand span{display:none}
}

@media(max-width:760px){
  .consumer-job{padding-bottom:52px}
  .consumer-job.active{padding-bottom:51px}
  .job-line b{font-size:16px}
  .job-line .job-pay{font-size:14px;-webkit-line-clamp:3}
  .company-line{grid-template-columns:minmax(0,1fr)}
  .company-line span:last-child{text-align:left}
  .job-source{padding-right:74px}
  .detail-top{display:block}
  .detail-section p{max-width:none}
  .company-panel,.related-job{align-items:flex-start;flex-direction:column}
  .company-panel > :last-child,.related-job > :last-child{text-align:left}
  .home-job-top{display:grid}
  .feature-row{display:grid;grid-template-columns:minmax(0,1fr)}
  .feature-row > :last-child{margin-left:0;text-align:left}
}
