/* Baltic Jobs — archive/single/dashboard/submit. Relies on theme + accounts tokens. */

.bc-joblist__count { color: var(--bc-muted); font-size: .9rem; margin-bottom: 1rem; }
.bc-joblist__empty { padding: 2rem 0; color: var(--bc-muted); }

/* homepage AJAX job feed: dim the old rows and float a spinner while the next page loads */
.bc-joblist-wrap { position: relative; scroll-margin-top: 90px; }
.bc-joblist-wrap__loader { display: none; position: absolute; inset: 0; justify-content: center; align-items: flex-start; padding-top: 4rem; background: rgba(255,255,255,.6); border-radius: var(--bc-radius); z-index: 2; }
.bc-joblist-wrap.is-loading .bc-joblist-wrap__loader { display: flex; }
.bc-joblist-wrap.is-loading .bc-joblist { opacity: .4; pointer-events: none; }
.bc-joblist-wrap.is-loading .bc-pagination { pointer-events: none; opacity: .6; }
.bc-loader { width: 38px; height: 38px; border: 3px solid var(--bc-line); border-top-color: var(--bc-primary); border-radius: 50%; animation: bc-spin .6s linear infinite; }
.bc-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { .bc-loader { animation-duration: 1.6s; } }
.bc-jobsearch__form--archive select { flex: 1 1 180px; }

/* pagination (list markup from paginate_links) */
.bc-pagination ul { list-style: none; display: flex; gap: .4rem; justify-content: center; padding: 0; margin: 2rem 0 0; flex-wrap: wrap; }
.bc-pagination a, .bc-pagination span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 .7rem; border-radius: var(--bc-radius); border: 1px solid var(--bc-line); color: var(--bc-body); font-weight: 600; font-size: .9rem; text-decoration: none; }
.bc-pagination a:hover { border-color: var(--bc-primary); color: var(--bc-primary); }
.bc-pagination .current { background: var(--bc-primary); border-color: var(--bc-primary); color: #fff; }

/* ---- single job ---- */
.bc-single { display: grid; grid-template-columns: 1fr 360px; gap: 2.5rem; align-items: start; }
/* A grid item defaults to min-width:auto, so one long unbreakable word (a pasted
   email address) sizes the column to its min-content and drags the whole page wider
   than the phone screen. min-width:0 lets the column shrink; the overflow-wrap rules
   below then break the word inside it. */
.bc-single__main { min-width: 0; }
.bc-single__head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.bc-single__logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.bc-single__title { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.bc-single__company { color: var(--bc-muted); }
.bc-single__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; padding: 1.25rem; background: var(--bc-bg-soft); border-radius: var(--bc-radius-lg); margin-bottom: 1.5rem; }
.bc-single__facts span { display: block; color: var(--bc-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.bc-single__facts strong { color: var(--bc-ink); font-family: var(--bc-font); }
/* Employer-pasted text carries long emails/URLs. URLs break on their own at "/" and
   "-", but an email address has no break opportunity and will push the page wider
   than a phone screen, so force it. */
.bc-single__body { line-height: 1.75; overflow-wrap: break-word; }
.bc-single__body h2, .bc-single__body h3 { margin: 1.5rem 0 .5rem; overflow-wrap: break-word; }
.bc-single__body p, .bc-single__body ul { margin-bottom: 1rem; }
/* Employer-pasted addresses/links: blue and obviously clickable. */
.bc-single__body a { color: var(--bc-primary); text-decoration: underline; }
.bc-single__body a:hover { color: var(--bc-primary-600); }

.bc-single__contact { margin-bottom: 1.5rem; overflow-wrap: anywhere; }
.bc-single__contact span { display: block; color: var(--bc-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.bc-single__contact a { color: var(--bc-primary); font-weight: 600; text-decoration: underline; }
.bc-single__contact a:hover { color: var(--bc-primary-600); }

.bc-apply-card { position: sticky; top: 96px; background: #fff; border: 1px solid var(--bc-line); border-radius: var(--bc-radius-lg); padding: 1.5rem; box-shadow: var(--bc-shadow); }
.bc-apply-card h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.bc-apply-card .bc-btn { width: 100%; justify-content: center; }
.bc-apply-card__done { color: #1a7f43; font-weight: 600; }
.bc-apply-card__alt { margin-top: .75rem; font-size: .9rem; color: var(--bc-muted); }

/* ---- dashboard ---- */
.bc-dash__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.bc-dash__avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.bc-dash__head h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
.bc-dash__role { color: var(--bc-muted); }
.bc-dash__logout, .bc-dash__head-actions { margin-left: auto; display: flex; gap: .6rem; }
.bc-dash__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.bc-dash__card { background: #fff; border: 1px solid var(--bc-line); border-radius: var(--bc-radius-lg); padding: 1.5rem; box-shadow: var(--bc-shadow); margin-bottom: 1.5rem; }
.bc-dash__card h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.bc-dash__empty { color: var(--bc-muted); }

.bc-applist { list-style: none; padding: 0; margin: 0; }
.bc-applist li { display: flex; align-items: center; gap: .75rem; padding: .85rem 0; border-bottom: 1px solid var(--bc-line); }
.bc-applist li:last-child { border-bottom: 0; }
.bc-applist__avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.bc-applist time { margin-left: auto; color: var(--bc-muted); font-size: .82rem; white-space: nowrap; }
.bc-applist__msg { color: var(--bc-body); font-size: .88rem; margin-top: .25rem; }

.bc-badge { font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .02em; background: var(--bc-bg-soft); color: var(--bc-body); }
.bc-badge--publish, .bc-badge--submitted { background: #e3ebfd; color: var(--bc-primary); }
.bc-badge--pending, .bc-badge--draft { background: #fff4e0; color: #a86400; }
.bc-badge--shortlisted { background: #eafaf0; color: #1a7f43; }

.bc-table { width: 100%; border-collapse: collapse; }
.bc-table th, .bc-table td { text-align: left; padding: .75rem .5rem; border-bottom: 1px solid var(--bc-line); font-size: .92rem; }
.bc-table th { color: var(--bc-muted); font-family: var(--bc-font); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.bc-table__wrap { overflow-x: auto; }

.bc-submitjob { max-width: 820px; }
.bc-submitjob h1 { margin-bottom: 1.5rem; }
.bc-submitjob select { width: 100%; border: 1px solid var(--bc-line); border-radius: var(--bc-radius); padding: .8rem .9rem; background: var(--bc-bg-soft); }

/* ---- responsive ---- */
@media (max-width: 900px) {
	.bc-single { grid-template-columns: 1fr; }
	.bc-apply-card { position: static; }
	.bc-dash__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.bc-dash__head-actions, .bc-dash__logout { margin-left: 0; width: 100%; }
	.bc-table thead { display: none; }
	.bc-table tr { display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem; padding: .75rem 0; border-bottom: 1px solid var(--bc-line); }
	.bc-table td { border: 0; padding: .15rem 0; }
}

/* ==========================================================================
   Portal dashboard
   ========================================================================== */
.bc-portal { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; align-items: start; }
.bc-portal__side { position: sticky; top: 96px; background: #fff; border: 1px solid var(--bc-line); border-radius: var(--bc-radius-lg); box-shadow: var(--bc-shadow); overflow: hidden; }
.bc-portal__me { display: flex; align-items: center; gap: .75rem; padding: 1.25rem; border-bottom: 1px solid var(--bc-line); }
.bc-portal__avatar { border-radius: 50%; object-fit: cover; }
.bc-portal__me strong { display: block; font-family: var(--bc-font); }
.bc-portal__me span { color: var(--bc-muted); font-size: .82rem; }
.bc-portal__nav { display: flex; flex-direction: column; padding: .5rem; }
.bc-portal__nav a { padding: .7rem .85rem; border-radius: var(--bc-radius); color: var(--bc-body); font-family: var(--bc-font); font-weight: 500; font-size: .93rem; }
.bc-portal__nav a:hover { background: var(--bc-bg-soft); text-decoration: none; }
.bc-portal__nav a.is-active { background: var(--bc-primary); color: #fff; }
.bc-portal__cta { margin: .5rem 0; justify-content: center; }
.bc-portal__logout { color: var(--bc-muted) !important; }
/* Same grid min-content trap as .bc-single__main — the dashboard lists applicant
   email addresses, which are exactly the unbreakable words that blow the column out. */
.bc-portal__main { min-width: 0; }
.bc-portal__main > h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 1.25rem; }
.bc-applist__contacts { overflow-wrap: anywhere; }

.bc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.bc-stat { background: #fff; border: 1px solid var(--bc-line); border-radius: var(--bc-radius-lg); padding: 1.25rem; box-shadow: var(--bc-shadow); text-align: center; }
.bc-stat__n { display: block; font-size: 1.9rem; font-weight: 800; font-family: var(--bc-font); color: var(--bc-primary); line-height: 1; }
.bc-stat__l { display: block; color: var(--bc-muted); font-size: .82rem; margin-top: .35rem; }
.bc-stat--ring { background: radial-gradient(closest-side, #fff 79%, transparent 80% 100%), conic-gradient(var(--bc-primary) calc(var(--p) * 1%), var(--bc-line) 0); }

.bc-panel { background: #fff; border: 1px solid var(--bc-line); border-radius: var(--bc-radius-lg); box-shadow: var(--bc-shadow); padding: 1.5rem; margin-bottom: 1.5rem; }
.bc-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.bc-panel__head h2 { font-size: 1.15rem; }
.bc-ok { color: #1a7f43; }
.bc-muted { color: var(--bc-muted); }
.bc-link { color: var(--bc-primary); font-weight: 600; font-size: .88rem; }

.bc-profile-photo { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.bc-applist--manage li { align-items: flex-start; }
.bc-applist__info { flex: 1 1 auto; min-width: 0; }
.bc-applist__contacts { font-size: .85rem; margin-top: .15rem; }
.bc-applist__actions { display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; margin-left: auto; }
.bc-status-select { border: 1px solid var(--bc-line); border-radius: var(--bc-radius); padding: .4rem .6rem; font-size: .85rem; background: #fff; }
.bc-applicants__filter { margin-bottom: 1.25rem; max-width: 380px; }

@media (max-width: 860px) {
	.bc-portal { grid-template-columns: 1fr; }
	.bc-portal__side { position: static; }
	.bc-portal__nav { flex-direction: row; flex-wrap: wrap; }
	.bc-portal__nav a { flex: 1 1 auto; text-align: center; }
	.bc-stats { grid-template-columns: repeat(2, 1fr); }
}

/* save-job button on single job */
.bc-single__head .bc-save-btn { margin-left: auto; }
.bc-save-btn { background: #fff; border: 1.5px solid var(--bc-line); border-radius: 50%; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--bc-muted); flex: none; transition: color .15s, border-color .15s, background .15s; }
.bc-save-btn:hover { color: var(--bc-primary); border-color: var(--bc-primary); }
.bc-save-btn.is-saved { color: #fff; background: var(--bc-primary); border-color: var(--bc-primary); }
.bc-save-btn.is-saved svg { fill: #fff; }

/* dashboard row actions */
.bc-rowactions { display: flex; gap: .85rem; align-items: center; flex-wrap: wrap; }
.bc-rowactions .bc-link { background: none; border: 0; cursor: pointer; padding: 0; font-family: var(--bc-font); }
.bc-link--danger { color: #c0392b !important; }

/* single-job subscription gate */
.bc-gate__teaser { color: var(--bc-body); line-height: 1.7; margin-bottom: 1.5rem; position: relative; max-height: 5.5em; overflow: hidden; }
.bc-gate__teaser::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3em; background: linear-gradient(transparent, #fff); }
.bc-gate__box { background: var(--bc-bg-soft); border: 1px solid var(--bc-line); border-radius: var(--bc-radius-lg); padding: 2rem; text-align: center; }
.bc-gate__box h3 { margin-bottom: .5rem; }
.bc-gate__box p { color: var(--bc-body); margin-bottom: 1rem; }
.bc-gate__box .bc-btn { display: inline-flex; }
.bc-gate__alt { font-size: .9rem; color: var(--bc-muted); margin-top: .75rem !important; }
