/* JobNetwork boards — shared styles. Everything is scoped under .jn so the
   host site's CSS is untouched; logical properties keep RTL (Arabic) correct. */
.jn {
    --jn-primary: #2563eb;
    --jn-font: inherit;
    --jn-text: #111827;
    --jn-muted: #6b7280;
    --jn-border: #e5e7eb;
    --jn-soft: #f9fafb;
    --jn-radius: 10px;
    container-type: inline-size;
    box-sizing: border-box;
    color: var(--jn-text);
    font-family: var(--jn-font);
    font-size: 16px;
    line-height: 1.5;
    text-align: start;
}
.jn *, .jn *::before, .jn *::after { box-sizing: inherit; }
.jn a { color: var(--jn-primary); }
.jn img { max-width: 100%; }
.jn-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.jn-header { display: flex; align-items: center; gap: 12px; margin-block-end: 16px; }
.jn-logo { max-height: 44px; width: auto; }
.jn-title { margin: 0; font-size: 1.5em; font-weight: 700; line-height: 1.25; }

.jn-input, .jn-select {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--jn-border);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    font: inherit;
}
.jn-input { flex: 1 1 220px; }
.jn-select { flex: 1 1 160px; }
.jn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--jn-primary);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.jn .jn-btn { color: #fff; }
.jn-btn:hover { filter: brightness(0.92); }
.jn-btn-sm { padding: 6px 12px; font-size: 0.9em; }
.jn-btn-lg { width: 100%; padding: 14px 28px; font-size: 1.1em; }
.jn .jn-btn-ghost { background: transparent; color: var(--jn-primary); border: 1px solid currentColor; }
.jn :focus-visible { outline: 3px solid color-mix(in srgb, var(--jn-primary) 45%, transparent); outline-offset: 2px; }
.jn-clear { display: inline-block; font-size: 0.9em; }

.jn-results { margin: 12px 0; color: var(--jn-muted); font-size: 0.9em; }
.jn-list { margin: 0; padding: 0; list-style: none; }
.jn-item-body { min-width: 0; flex: 1; }
.jn-job-title { margin: 0; font-size: 1.1em; font-weight: 600; line-height: 1.35; }
.jn-job-title a { color: var(--jn-text); text-decoration: none; }
.jn-job-title a:hover { color: var(--jn-primary); text-decoration: underline; }
.jn-company { margin: 2px 0 0; color: var(--jn-muted); }
.jn-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; padding: 0; list-style: none; color: var(--jn-muted); font-size: 0.9em; }
.jn-salary { color: var(--jn-text); font-weight: 600; }
.jn-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--jn-primary) 12%, #fff); color: var(--jn-primary); font-size: 0.8em; font-weight: 600; }
.jn-company-logo { flex: none; width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--jn-border); border-radius: 8px; background: #fff; }
.jn-company-logo-lg { width: 64px; height: 64px; }
.jn-item-featured .jn-job-title::after { content: "★"; margin-inline-start: 6px; color: #f59e0b; font-size: 0.85em; }

.jn-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block-start: 20px; }
.jn-page-link { padding: 8px 14px; border: 1px solid var(--jn-border); border-radius: 8px; text-decoration: none; }
.jn-page-link[aria-disabled="true"] { opacity: 0.4; }
.jn-page-info { color: var(--jn-muted); font-size: 0.9em; }

.jn-empty { padding: 40px 16px; border: 1px dashed var(--jn-border); border-radius: var(--jn-radius); color: var(--jn-muted); text-align: center; }
.jn-message { padding: 16px; border: 1px solid var(--jn-border); border-radius: var(--jn-radius); background: var(--jn-soft); color: var(--jn-muted); text-align: center; }
.jn-attribution { margin-block-start: 16px; color: var(--jn-muted); font-size: 0.75em; }
.jn-attribution a { color: inherit; text-decoration: underline; }

/* Loading state (the widget shows it while fetching). */
.jn-loading .jn-skeleton {
    height: 84px;
    margin-block-end: 12px;
    border-radius: var(--jn-radius);
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
    background-size: 400% 100%;
    animation: jn-pulse 1.4s ease infinite;
}
@keyframes jn-pulse { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .jn-loading .jn-skeleton { animation: none; } }

/* Job page */
.jn-back { display: inline-block; margin-block-end: 14px; text-decoration: none; font-size: 0.95em; }
.jn-detail-head { display: flex; align-items: flex-start; gap: 16px; }
.jn-detail-title { margin: 0 0 4px; font-size: 1.6em; line-height: 1.25; }
.jn-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; padding: 16px; border-radius: var(--jn-radius); background: var(--jn-soft); }
.jn-facts dt { color: var(--jn-muted); font-size: 0.8em; }
.jn-facts dd { margin: 2px 0 0; font-weight: 600; }
.jn-apply { margin-block: 20px; }
.jn-apply-bottom { position: sticky; bottom: 12px; }
.jn-description { margin-block: 20px; overflow-wrap: anywhere; }
.jn-description h2, .jn-description h3, .jn-description h4 { margin: 1.3em 0 0.4em; font-size: 1.1em; }
.jn-description ul, .jn-description ol { padding-inline-start: 1.4em; }
.jn-description p { margin: 0 0 0.8em; }
.jn-related { margin-block-start: 32px; }
.jn-related-title { margin: 0 0 12px; font-size: 1.2em; }

/* Classic List — a clean list with a filters sidebar. */
.jn-theme-classic .jn-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
.jn-theme-classic .jn-filters { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--jn-border); border-radius: var(--jn-radius); background: var(--jn-soft); }
.jn-theme-classic .jn-filters .jn-input, .jn-theme-classic .jn-filters .jn-select { flex: none; width: 100%; }
.jn-theme-classic .jn-main .jn-results { margin-block-start: 0; }
.jn-theme-classic .jn-list { border: 1px solid var(--jn-border); border-radius: var(--jn-radius); background: #fff; }
.jn-theme-classic .jn-item { display: flex; gap: 14px; padding: 16px; border-block-end: 1px solid var(--jn-border); }
.jn-theme-classic .jn-item:last-child { border-block-end: 0; }
.jn-theme-classic .jn-item:hover { background: var(--jn-soft); }

@container (max-width: 720px) {
    .jn-theme-classic .jn-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
