/* v1.7.12 additions: saved hearts, save-search strip, salary pages, company/blog blocks, install bar */
.listing-card { position: relative; }
.ej-save { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); border: 1px solid #e5e7eb; color: #9ca3af; font-size: 19px; line-height: 32px; text-align: center; cursor: pointer; user-select: none; }
.ej-save:hover { color: #e11d48; border-color: #fecdd3; }
.ej-save.is-saved { color: #e11d48; background: #fff1f2; border-color: #fecdd3; }
.ej-savesearch { margin: 0 0 14px; }
.ej-savesearch a { display: inline-block; padding: 8px 14px; border: 1px dashed var(--brand-500, #10a37f); border-radius: 10px; font-size: .9rem; font-weight: 600; text-decoration: none; }
.ej-saved-empty, .ej-saved-hint { color: #6b7280; }
.gj-alertbox-kw { margin: 0 0 10px; font-weight: 600; }

.ej-block { margin: 32px 0; }
.ej-block h2 { font-size: 1.25rem; margin: 0 0 14px; }
.ej-postgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ej-postcard { display: block; border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 14px 16px; text-decoration: none; background: var(--surface, #fff); }
.ej-postcard strong { display: block; margin-bottom: 4px; color: var(--text, #111827); }
.ej-postcard span { font-size: .85rem; color: var(--text-soft, #6b7280); }
.ej-closed-box { border: 1px solid #fcd34d; background: #fffbeb; border-radius: 12px; padding: 14px 16px; margin: 0 0 18px; }
.ej-closed-box a { font-weight: 600; }

.ej-salary { max-width: 900px; margin: 0 auto; padding: 24px 16px 48px; }
.ej-salary h1 { font-size: 1.8rem; margin: 0 0 8px; }
.ej-salary .lead { color: var(--text-soft, #6b7280); margin: 0 0 22px; }
.ej-salary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 24px; }
.ej-salary-card { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 16px; background: var(--surface, #fff); }
.ej-salary-card b { display: block; font-size: 1.5rem; margin-top: 4px; }
.ej-salary table { width: 100%; border-collapse: collapse; margin: 0 0 24px; }
.ej-salary th, .ej-salary td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border, #e5e7eb); }
.ej-salary .note { font-size: .85rem; color: var(--text-soft, #6b7280); }

.ej-install { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9999; max-width: 460px; margin: 0 auto; background: #111827; color: #fff; border-radius: 14px; padding: 12px 14px; display: none; align-items: center; gap: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.3); font-size: .92rem; }
.ej-install.is-on { display: flex; }
.ej-install button { border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.ej-install .go { background: var(--brand-500, #10a37f); color: #fff; }
.ej-install .no { background: transparent; color: #9ca3af; }

/* dark mode for everything added in 1.7.11 / 1.7.12 */
html.dark .ej-save { background: rgba(31,41,55,.92); border-color: #374151; color: #9ca3af; }
html.dark .ej-save.is-saved { background: #3f1d2b; border-color: #7f1d3a; color: #fb7185; }
html.dark .gj-alertbox { background: linear-gradient(135deg, #12251f 0%, #111827 70%); border-color: #1f3d33; box-shadow: none; }
html.dark .gj-alertbox p, html.dark .gj-alertbox-tg { color: #9ca3af; }
html.dark .gj-alertbox-perks li { background: #1f2937; border-color: #1f3d33; color: #6ee7b7; }
html.dark .gj-alertbox-row input, html.dark .gj-alertbox-row select { background: #1f2937; border-color: #374151; color: #f3f4f6; }
html.dark .gj-popular li a { border-color: #374151; }
html.dark .ej-postcard, html.dark .ej-salary-card { background: #1f2937; border-color: #374151; }
html.dark .ej-postcard strong { color: #f3f4f6; }
html.dark .ej-closed-box { background: #3a2e0a; border-color: #92400e; }
html.dark .ej-warning { background: #3a2e0a; border-color: #92400e; color: #fde68a; }
html.dark .ej-report-line select { background: #1f2937; color: #f3f4f6; border-color: #374151; }
html.dark .ej-salary th, html.dark .ej-salary td { border-color: #374151; }
html.dark .gj-check { color: #e5e7eb; }

.gj-job { position: relative; }
.gj-job .ej-save { top: 12px; right: 12px; }

/* ad boxes that Google did not fill stay invisible (no empty "Advertisement" frames) */
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none !important; }
.ad-slot ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* extra job facts */
.badge-info { background: #475569; }
.badge-visa { background: #16a34a; }
.badge-level { background: #7c3aed; }
.gj-chip--x-new { background: #dcfce7; color: #166534; }
.gj-chip--x-closing { background: #ffedd5; color: #9a3412; }
.gj-chip--x-nat { background: #e2e8f0; color: #334155; }
.gj-chip--x-visa { background: #dcfce7; color: #166534; }
.gj-chip--x-mode { background: #e0f2fe; color: #075985; }
.gj-chip--x-level { background: #ede9fe; color: #5b21b6; }
.gj-chip--x-housing { background: #fef9c3; color: #854d0e; }
.ej-facts { border: 1px solid var(--border, #e5e7eb); border-radius: 14px; padding: 18px 20px; margin: 18px 0; background: var(--surface, #fff); }
.ej-facts h2 { font-size: 1.1rem; margin: 0 0 12px; }
.ej-facts h3 { font-size: .9rem; margin: 16px 0 8px; color: var(--text-soft, #6b7280); text-transform: uppercase; letter-spacing: .03em; }
.ej-facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 18px; margin: 0; }
.ej-facts-grid dt { font-size: .78rem; color: var(--text-soft, #6b7280); }
.ej-facts-grid dd { margin: 2px 0 0; font-weight: 600; }
.ej-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ej-chips li { padding: 5px 12px; border-radius: 999px; background: #e8f5ef; color: #0d6a52; font-size: .85rem; font-weight: 600; }
.ej-chips--soft li { background: #f1f5f9; color: #475569; }
html.dark .gj-chip--x-new, html.dark .gj-chip--x-visa { background: #14351f; color: #86efac; }
html.dark .gj-chip--x-closing { background: #3a1d0a; color: #fdba74; }
html.dark .gj-chip--x-nat { background: #1e293b; color: #cbd5e1; }
html.dark .gj-chip--x-mode { background: #0c2a3f; color: #7dd3fc; }
html.dark .gj-chip--x-level { background: #2a1f4d; color: #c4b5fd; }
html.dark .gj-chip--x-housing { background: #3a3209; color: #fde047; }
html.dark .ej-facts { background: #1f2937; border-color: #374151; }
html.dark .ej-chips li { background: #12332a; color: #6ee7b7; }
html.dark .ej-chips--soft li { background: #1f2937; color: #cbd5e1; border: 1px solid #374151; }

/* =========================================================================
   Job detail page upgrade (v1.7.12) — employer listing page.
   Uses the theme tokens (--brand-*, --surface, --border, --text-soft), so every
   colour theme and dark mode follow automatically.
   ====================================================================== */
.ej-employer .breadcrumbs { margin: 0 0 16px; }

/* Hero card */
.ej-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px 28px; flex-wrap: wrap; padding: 26px 28px; margin-bottom: 24px; border-left: 4px solid var(--brand-500); box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.05); }
.ej-hero-main { flex: 1 1 380px; min-width: 0; }
.ej-hero .badges-row { margin-bottom: 4px; }
.ej-hero .ej-employer-title { font-size: 1.75rem; letter-spacing: -.02em; margin: 10px 0 6px; }
.ej-hero .ej-employer-sub { margin: 0; font-size: .98rem; }
.ej-hero-cta { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; align-items: stretch; max-width: 100%; }
.ej-hero-cta .ej-apply { text-align: center; padding: 13px 26px; border-radius: 10px; }
.ej-hero-note { font-size: .78rem; color: var(--text-soft); text-align: center; }

/* Content cards: accent bar on headings, numbered "How to apply" steps */
.ej-employer .ej-block { margin-bottom: 20px; }
.ej-employer .ej-block h2 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin: 0 0 14px; letter-spacing: -.01em; }
.ej-employer .ej-block h2::before { content: ""; flex: 0 0 4px; height: 1.1em; border-radius: 2px; background: var(--brand-500); }
.ej-steps { list-style: none; margin: 0; padding: 0; counter-reset: ejstep; }
.ej-steps li { position: relative; counter-increment: ejstep; padding: 2px 0 14px 40px; }
.ej-steps li:last-child { padding-bottom: 0; }
.ej-steps li::before { content: counter(ejstep); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); font-size: .82rem; font-weight: 700; text-align: center; line-height: 26px; }

/* Sidebar: "Job at a glance" as stacked tiles */
.ej-employer-side .ej-facts { margin: 0 0 16px; padding: 20px; border-radius: var(--radius, 12px); }
.ej-employer-side .ej-facts h2 { font-size: 1.05rem; margin: 0 0 14px; }
.ej-employer-side .ej-facts-grid { grid-template-columns: 1fr; gap: 10px; }
.ej-employer-side .ej-facts-grid > div { padding: 10px 14px; background: var(--bg-subtle, #f1f5f9); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; }
.ej-employer-side .ej-facts-grid dt { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.ej-employer-side .ej-facts-grid dd { margin: 3px 0 0; word-break: break-word; }
.ej-employer-side .ej-facts h3 { margin: 20px 0 10px; }

/* Skills / benefits pills in the theme colour */
.ej-employer .ej-chips li { background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); transition: background .15s, color .15s; }
.ej-employer .ej-chips li:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.ej-employer .ej-chips--soft li { background: var(--bg-subtle, #f1f5f9); color: var(--text-soft, #475569); border-color: var(--border, #e2e8f0); }

/* "Job details" list rows */
.ej-employer-side .ej-details { margin-bottom: 16px; }
.ej-employer-side .ej-glance { gap: 0 16px; }
.ej-employer-side .ej-glance dt, .ej-employer-side .ej-glance dd { padding: 9px 0; border-bottom: 1px solid var(--border, #e2e8f0); }
.ej-employer-side .ej-glance dt:nth-last-of-type(1), .ej-employer-side .ej-glance dd:nth-last-of-type(1) { border-bottom: 0; }

/* Dark mode (tokens handle most of it) */
html.dark .ej-hero { box-shadow: none; }
html.dark .ej-employer-side .ej-facts-grid > div { background: var(--bg-subtle); border-color: var(--border); }
html.dark .ej-employer .ej-chips li { background: rgba(129,140,248,.14); color: var(--brand-400); border-color: rgba(129,140,248,.3); }
html.dark .ej-employer .ej-chips li:hover { background: var(--brand-500); color: #fff; }
html.dark .ej-employer .ej-chips--soft li { background: var(--bg-subtle); color: var(--text-soft); border-color: var(--border); }
html.dark .ej-steps li::before { background: rgba(129,140,248,.14); color: var(--brand-400); border-color: rgba(129,140,248,.3); }

@media (max-width: 860px) {
	.ej-hero { padding: 20px; }
	.ej-hero .ej-employer-title { font-size: 1.4rem; }
	.ej-hero-cta { flex: 1 1 100%; }
}
.ej-hero-cta .ej-apply, html.dark .ej-hero-cta .ej-apply { color: #fff; }
.ej-hero-cta .ej-apply:hover { text-decoration: none; }

/* Sections saved by the importer (bullet lists) and the "About company" card */
.ej-list ul { list-style: none; margin: 0; padding: 0; }
.ej-list li { position: relative; padding: 0 0 10px 28px; margin: 0; }
.ej-list li:last-child { padding-bottom: 0; }
.ej-list li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); font-size: .7rem; font-weight: 700; text-align: center; line-height: 16px; }
html.dark .ej-list li::before { background: rgba(129,140,248,.14); color: var(--brand-400); border-color: rgba(129,140,248,.3); }
.ej-company-head { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; }
.ej-company-logo { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-subtle, #f1f5f9); display: flex; align-items: center; justify-content: center; overflow: hidden; font-weight: 700; color: var(--text-soft); }
.ej-company-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ej-company-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ej-company-info span { font-size: .88rem; color: var(--text-soft); }
.ej-company-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-weight: 600; font-size: .92rem; }

/* Telegram join card (QR + button) under "Share this opportunity" */
.ej-telegram { display: flex; align-items: center; gap: 20px; margin: 16px 0 20px; border-left: 4px solid #2aabee; }
.ej-tg-qr { flex: 0 0 132px; line-height: 0; border-radius: 14px; box-shadow: 0 1px 4px rgba(15,23,42,.18); }
.ej-tg-qr img { width: 132px; height: auto; border-radius: 14px; display: block; }
.ej-tg-text h2 { font-size: 1.05rem; margin: 0 0 6px; }
.ej-tg-text p { margin: 0 0 12px; color: var(--text-soft); font-size: .92rem; }
.ej-tg-text .gj-tg-join { display: inline-block; background: #2aabee; border-color: #2aabee; color: #fff; padding: 10px 20px; border-radius: 10px; font-weight: 600; }
.ej-tg-text .gj-tg-join:hover { background: #1d96d6; text-decoration: none; }
@media (max-width: 520px) { .ej-telegram { flex-direction: column; align-items: flex-start; } }

/* =========================================================================
   Small-phone fixes (v1.7.12)
   The header (logo + dark-mode + avatar + "Post a Job" + menu) needed ~414px, so on every phone
   narrower than that the menu button and "Post a Job" ran off the screen and the whole page could
   be dragged sideways. The header now shrinks to fit; the wordmark gives way first.
   ====================================================================== */
@media (max-width: 720px) {
	.site-header .container { padding: 0 12px; }
	.site-header .bar { gap: 8px; }
	.site-header .logo { flex: 1 1 auto; min-width: 0; gap: 8px !important; font-size: 1.05rem; }
	.site-header .logo > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
	.site-header .logo-mark { flex: 0 0 auto; }
	.site-header .logo-mark-svg { width: 32px; height: 32px; }
	.header-actions { flex: 0 0 auto; gap: 6px; }
	.header-actions .icon-btn { width: 34px; height: 34px; flex: 0 0 34px; }
	.header-actions .avatar { flex: 0 0 auto; }
	.header-actions .btn-sm { padding: 6px 10px; font-size: .78rem; white-space: nowrap; }
}
@media (max-width: 720px) {
	/* Login / Register are also in the slide-out menu; keep the bar to the essentials. */
	.header-actions > .btn-outline.btn-sm,
	.header-actions > .btn-primary.btn-sm { display: none; }
	/* A page can never be dragged sideways on a phone. */
	body { overflow-x: hidden; }
}
@media (max-width: 370px) {
	.site-header .logo > span:last-child { display: none; } /* logo mark only, so the buttons always fit */
}

/* Job page: never let long words / links / tables push the page wider than the screen */
.ej-employer, .ej-employer-main, .ej-employer-side, .ej-hero-main { min-width: 0; }
.ej-employer { overflow-wrap: anywhere; }
.ej-employer .rte-content table { display: block; max-width: 100%; overflow-x: auto; }
.ej-employer .rte-content img, .ej-employer .rte-content iframe, .ej-employer .rte-content pre { max-width: 100%; }
.ej-employer .rte-content pre { overflow-x: auto; }
@media (max-width: 860px) {
	.ej-employer-grid { grid-template-columns: minmax(0, 1fr); }
}
