/* base.css — Shared structural styles for all themes */
/* Loaded BEFORE the theme CSS. Themes override colors/fonts/decorations. */

/* Reset */
*{margin:0;padding:0;box-sizing:border-box}

/* Page wrapper */
.jb-page{max-width:720px;margin:0 auto;padding:2rem 1.5rem 4rem}

/* Header */
.jb-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1.5rem;margin-bottom:2rem;border-bottom:1px solid var(--border)}
.jb-powered{font-size:.72rem;color:var(--text-lighter);text-decoration:none}
.jb-powered span{font-weight:600}

/* Company */
.jb-company{display:flex;align-items:center;gap:1rem;margin-bottom:1.8rem}
.jb-company-logo{width:56px;height:56px;border-radius:var(--radius,12px);background:var(--surface,var(--bg));border:1px solid var(--border);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}
.jb-company-logo img{width:100%;height:100%;object-fit:contain;padding:6px;border-radius:inherit}
.jb-company-name{font-size:1rem;font-weight:600;color:var(--text-bright,var(--text))}
.jb-company-name a{color:inherit;text-decoration:none;transition:color .2s}
.jb-company-name a:hover{color:var(--primary)}
.jb-company-meta{display:flex;gap:.6rem;margin-top:.2rem;font-size:.82rem;color:var(--text-light);flex-wrap:wrap}
.jb-company-meta .jb-sep{color:var(--border)}
.jb-meta-item{display:flex;align-items:center;gap:.3rem}
.jb-meta-item svg{width:14px;height:14px;stroke:var(--text-lighter,var(--text-light));fill:none;stroke-width:2;flex-shrink:0}

/* Title */
.jb-title{font-size:clamp(1.6rem,3.5vw,2.2rem);font-weight:700;line-height:1.2;letter-spacing:-.3px;color:var(--text-bright,var(--text));margin-bottom:.5rem}

/* Department */
.jb-dept{font-size:.88rem;color:var(--text-light);margin-bottom:1.2rem}

/* Tags */
.jb-tags{display:flex;gap:.35rem;flex-wrap:wrap;margin-bottom:1.5rem}
.jb-tag{padding:.22rem .65rem;border-radius:var(--radius,6px);font-size:.73rem;font-weight:500;background:var(--primary-pale,var(--surface));color:var(--primary);border:1px solid transparent}

/* Details strip */
.jb-details{display:flex;gap:1px;background:var(--border);border-radius:var(--radius-lg,10px);overflow:hidden;margin-bottom:1.8rem}
.jb-detail{flex:1;background:var(--surface,var(--bg));padding:.9rem 1rem;text-align:center;min-width:0}
.jb-detail-val{font-size:1rem;font-weight:700;color:var(--text-bright,var(--text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.jb-detail-lbl{font-size:.68rem;color:var(--text-lighter,var(--text-light));text-transform:uppercase;letter-spacing:.8px;margin-top:.1rem}

/* Apply section */
.jb-apply{background:var(--surface,var(--bg));border:1px solid var(--border);border-radius:var(--radius-lg,12px);padding:1.2rem 1.4rem;margin-bottom:2rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.jb-apply-text{font-size:.88rem;color:var(--text-light)}
.jb-apply-text strong{color:var(--text-bright,var(--text))}
.jb-apply-btn{padding:.7rem 1.8rem;background:var(--primary);color:#fff;border:none;border-radius:var(--radius,8px);font-family:inherit;font-weight:600;font-size:.88rem;cursor:pointer;transition:all .2s;display:flex;align-items:center;gap:.4rem;white-space:nowrap}
.jb-apply-btn:hover{background:var(--primary-hover,var(--primary));transform:translateY(-1px)}
.jb-apply-btn svg{width:16px;height:16px}
#jb-uploading{display:none;align-items:center;gap:.5rem;font-size:.85rem;color:var(--primary)}
#jb-uploading svg{animation:jb-spin 1s linear infinite}
@keyframes jb-spin{to{transform:rotate(360deg)}}

/* Flash messages */
.jb-flash{padding:.85rem 1.1rem;border-radius:var(--radius,10px);margin-bottom:1.5rem;font-size:.85rem;font-weight:500}
.jb-flash-success{background:var(--success-bg);border:1px solid var(--success-border);color:var(--success)}
.jb-flash-error{background:var(--error-bg);border:1px solid var(--error-border);color:var(--error)}

/* Content sections */
.jb-section{margin-bottom:2rem}
.jb-section-label{font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:1.2px;color:var(--text-lighter,var(--text-light));margin-bottom:.8rem;padding-bottom:.6rem;border-bottom:1px solid var(--border)}
.jb-divider{height:1px;background:var(--border);margin-bottom:2rem}
.jb-og-image-wrap{margin-bottom:2rem}
.jb-og-image{display:block;max-width:100%;width:100%;height:auto;border-radius:8px;border:1px solid var(--border)}

/* Markdown content body */
.jb-section-body{font-size:.9rem;color:var(--text);line-height:1.8}
.jb-section-body h1,.jb-section-body h2,.jb-section-body h3{color:var(--text-bright,var(--text));margin:1.3rem 0 .6rem;font-weight:600}
.jb-section-body h1{font-size:1.25rem}
.jb-section-body h2{font-size:1.1rem}
.jb-section-body h3{font-size:.98rem}
.jb-section-body p{margin-bottom:.7rem}
.jb-section-body ul,.jb-section-body ol{padding-inline-start:1.3rem;margin-bottom:.7rem}
.jb-section-body li{margin-bottom:.35rem}
.jb-section-body li::marker{color:var(--primary)}
.jb-section-body strong{color:var(--text-bright,var(--text))}
.jb-section-body a{color:var(--primary);text-decoration:none}
.jb-section-body a:hover{text-decoration:underline}
.jb-section-body code{font-family:var(--font-mono,monospace);font-size:.85em;background:var(--surface,var(--bg));padding:.12rem .35rem;border-radius:4px}
.jb-section-body hr{border:none;height:1px;background:var(--border);margin:1.5rem 0}
.jb-section-body blockquote{border-inline-start:3px solid var(--primary);padding-inline-start:1rem;color:var(--text-light);margin:1rem 0}

/* More positions link */
.jb-more{text-align:center;padding:1.5rem 0}
.jb-more a{font-size:.88rem;font-weight:600;color:inherit;opacity:.6;text-decoration:none;transition:opacity .2s;display:inline-flex;align-items:center;gap:.4rem}
.jb-more a:hover{opacity:1}

/* Footer */
.jb-footer{text-align:center;padding-top:2rem;border-top:1px solid var(--border);font-size:.72rem;color:var(--text-lighter,var(--text-light))}
.jb-footer a{color:var(--primary);text-decoration:none}

/* RTL */
[dir="rtl"] .jb-company{flex-direction:row-reverse}
[dir="rtl"] .jb-company-meta{flex-direction:row-reverse}
[dir="rtl"] .jb-apply{flex-direction:row-reverse}
[dir="rtl"] .jb-tags{flex-direction:row-reverse}
[dir="rtl"] .jb-meta-item{flex-direction:row-reverse}
[dir="rtl"] .jb-more a{flex-direction:row-reverse}

/* Responsive — standard breakpoints */
@media(max-width:640px){
  .jb-page{padding:1.5rem 1rem 3rem}
  .jb-apply{flex-direction:column;text-align:center}
  [dir="rtl"] .jb-apply{flex-direction:column}
  .jb-company{flex-direction:column;text-align:center}
  [dir="rtl"] .jb-company{flex-direction:column}
  .jb-company-meta{justify-content:center}
  .jb-details{flex-direction:column}
  .jb-title{text-align:center}
  .jb-tags{justify-content:center}
}

/* Print */
@media print{
  body{background:#fff !important;color:#000 !important}
  .jb-apply,.jb-header,.jb-footer,.jb-more{display:none}
  .jb-page{max-width:100%;padding:0}
}
