/* Defensive baseline: some themes/page-builder resets apply box-sizing or
   list-style globally in ways that would otherwise break our layout (e.g.
   "ul { list-style: none }" resets are common and would silently strip the
   bullets from the Responsibilities/Requirements/Benefits sections below). */
[class*="cjm-"] { box-sizing: border-box; }

/* Wraps the auto-injected content (Hero + job listing, or the general
   application form) on the pages picked in Settings. Some page templates
   (full-width/canvas templates in particular) render page content edge to
   edge with no container — this keeps our content readable and gives it
   breathing room above/below so it doesn't butt up against the header or
   the "Powered by" line touching the footer. */
.cjm-page-content { max-width: 1200px; margin: 0 auto; padding: 40px 24px 60px; }

.cjm-icon { display: inline-flex; align-items: center; line-height: 1; }
.cjm-icon svg { width: 1em; height: 1em; fill: currentColor; display: block; }

.cjm-hero { display: flex; align-items: center; gap: 40px; padding: 20px 0 44px; box-sizing: border-box; }
.cjm-hero-content { flex: 1 1 50%; min-width: 0; }
.cjm-hero-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8em; font-weight: 700; color: #0ea5c4; margin: 0 0 10px; }
.cjm-hero-heading { font-size: 2.2em; line-height: 1.2; margin: 0 0 16px; word-break: break-word; }
.cjm-hero-highlight { color: #33ccff !important; }
.cjm-hero-text { font-size: 1.05em; color: #555; line-height: 1.6; margin: 0 0 24px; max-width: 480px; }
.cjm-hero-btn { display: inline-block; background: #22c1e8; color: #fff; text-decoration: none; padding: 12px 26px; border-radius: 6px; font-weight: 600; }
.cjm-hero-btn:hover { background: #0ea5c4; color: #fff; }
.cjm-hero-image { flex: 1 1 50%; min-width: 0; }
.cjm-hero-image svg { width: 100%; height: auto; display: block; }
.cjm-hero-custom-image { width: 100%; height: auto; display: block; border-radius: 12px; }

.cjm-empty-state { text-align: center; max-width: 560px; margin: 24px auto 40px; padding: 36px 28px; background: #f7fcfe; border: 1px solid #e2f3f8; border-radius: 12px; }
.cjm-empty-state-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: #22c1e8; color: #fff; margin-bottom: 18px; }
.cjm-empty-state-icon svg { width: 24px; height: 24px; fill: currentColor; }
.cjm-empty-state p { margin: 0; color: #555 !important; font-size: 1.05em; line-height: 1.6; }

.cjm-job-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 24px 0; padding: 16px; border: 1px solid #e2e2e2; border-radius: 8px; box-sizing: border-box; }
.cjm-job-filters input[type=text] { flex: 1 1 220px; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.cjm-job-filters select { padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; }
.cjm-filters-clear { color: #777; }

.cjm-jobs-list { display: flex; flex-direction: column; gap: 16px; margin: 24px 0; }
.cjm-jobs-list-rows { display: flex; flex-direction: column; margin: 24px 0; border-top: 1px solid #eee; }
.cjm-job-row { display: flex; align-items: center; gap: 16px; padding: 16px 4px; border-bottom: 1px solid #eee; transition: background-color 0.15s ease; }
.cjm-job-row:hover { background-color: #fafafa; }
.cjm-job-row-logo img { display: block; width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.cjm-job-row-main { flex: 1 1 auto; min-width: 0; }
.cjm-job-row-main h3 { margin: 0 0 2px; word-break: break-word; }
.cjm-job-row-main h3 a { color: inherit; text-decoration: none; }
.cjm-job-row-main h3 a:hover { text-decoration: none; }
.cjm-job-row-sub { color: #888; }
.cjm-job-row-meta { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; color: #888; flex-shrink: 0; }
.cjm-job-row-meta span:not(:first-child)::before { content: "•"; margin-right: 6px; color: #ccc; }
.cjm-job-row-action { flex-shrink: 0; }
.cjm-jobs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 24px 0; align-items: stretch; }
.cjm-job-card { border: 1px solid #e2e2e2; border-radius: 8px; padding: 20px 24px; box-sizing: border-box; transition: box-shadow 0.15s ease, border-color 0.15s ease; }
.cjm-job-card:hover { border-color: #d3d3d3; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.cjm-job-card h3 { margin: 0 0 8px; word-break: break-word; }
.cjm-job-card h3 a { color: inherit; text-decoration: none; }
.cjm-job-card h3 a:hover { text-decoration: none; }
.cjm-job-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; color: #666; }
.cjm-job-meta-item { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.cjm-job-card-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.cjm-jobs-grid .cjm-job-card { display: flex; flex-direction: column; height: 100%; }
.cjm-jobs-grid .cjm-job-card-actions { margin-top: auto; padding-top: 16px; }
.cjm-jobs-grid .cjm-job-card-actions a.button { display: block; width: 100%; text-align: center; box-sizing: border-box; }
.cjm-job-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.cjm-share { display: flex; align-items: center; gap: 6px; }
.cjm-share-label { color: #777; margin-right: 2px; }
.cjm-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #ddd; background: #fff; color: #555; text-decoration: none; cursor: pointer; box-sizing: border-box; padding: 0; margin: 0; font: inherit; line-height: normal; appearance: none; -webkit-appearance: none; -moz-appearance: none; }
.cjm-icon-btn:hover { background: #f2f2f2; }
.cjm-icon-btn svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }
.cjm-copy-link.cjm-copied { background: #e6f4ea; border-color: #1a7f37; color: #1a7f37; }
.cjm-apply-btn { flex-shrink: 0; }
.cjm-applications-closed { flex-shrink: 0; font-weight: 600; color: #999; }

.cjm-powered-by { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; color: #999 !important; }
.cjm-powered-by-logo { width: 18px; height: 18px; vertical-align: middle; }

.cjm-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 999999; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; }
.cjm-modal-overlay.open { display: flex; }
.cjm-modal-box { background: #fff; border-radius: 8px; max-width: 480px; width: 100%; padding: 30px; max-height: 90vh; overflow-y: auto; position: relative; box-sizing: border-box; }
.cjm-modal-close { position: absolute; top: 14px; right: 18px; font-size: 22px; line-height: 1; cursor: pointer; background: none; border: none; color: #333; }

.cjm-form-container { max-width: 480px; margin: 30px auto; padding: 24px; border: 1px solid #e2e2e2; border-radius: 8px; box-sizing: border-box; }
.cjm-form-container * { box-sizing: border-box; }
.cjm-form-container h3 { margin: 0 0 16px; font-size: 1.3em; font-weight: 600; line-height: 1.3; word-break: break-word; }
.cjm-form-container .cjm-field { display: block; width: 100%; margin-bottom: 14px; }
.cjm-form-container label { display: block; margin-bottom: 4px; font-weight: 600; }
.cjm-form-container input, .cjm-form-container textarea, .cjm-form-container select { display: block; width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 1em; }
.cjm-form-container textarea { min-height: 90px; }
.cjm-form-container .cjm-field-checkbox { display: flex; align-items: flex-start; }
.cjm-form-container .cjm-field-checkbox label { display: flex; align-items: center; gap: 8px; margin-bottom: 0; font-weight: 400; }
.cjm-form-container .cjm-field-checkbox input[type=checkbox] { display: inline-block; width: auto; }
.cjm-form-container .cjm-form-actions { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.cjm-form-msg { margin-top: 12px; }
.cjm-form-msg.success { color: #1a7f37; }
.cjm-form-msg.error { color: #c0392b; }

/* Best-effort sizing for the theme's own single-post title on the job
   overview page. Scoped to the job_opening body class so it can't affect any
   other post type; ".entry-title" is a very common theme convention but not
   universal, so this may not apply to every theme. */
body.single-job_opening .entry-title,
body.single-job_opening h1.entry-title { font-size: 2em; font-weight: 600; }

.cjm-single-job-header { margin-bottom: 24px; }
.cjm-job-section { margin: 28px 0; }
.cjm-job-section h2 { margin: 0 0 12px; font-size: 1.25em; font-weight: 700; }
.cjm-job-section ul { list-style: disc; margin: 0; padding-left: 20px; }
.cjm-job-section li { display: list-item; margin-bottom: 6px; }
.cjm-skills-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cjm-skill-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #f0f0f0; color: #444; }
.cjm-single-job-footer { margin-top: 32px; padding-top: 24px; border-top: 1px solid #eee; }

@media (max-width: 1100px) {
    .cjm-jobs-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
    .cjm-jobs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 782px) {
    .cjm-hero { flex-direction: column; align-items: stretch; gap: 24px; text-align: center; }
    .cjm-hero-text { max-width: none; margin-left: auto; margin-right: auto; }
    .cjm-hero-image { max-width: 320px; margin: 0 auto; }
}

@media (max-width: 600px) {
    .cjm-jobs-grid { grid-template-columns: 1fr; }
    .cjm-job-card { padding: 16px; }
    .cjm-job-actions { justify-content: flex-start; }
    .cjm-apply-btn { order: 2; width: 100%; text-align: center; }
    .cjm-share { order: 1; }
    .cjm-job-card-actions a.button { display: block; width: 100%; text-align: center; }
    .cjm-modal-box, .cjm-form-container { padding: 18px; margin: 16px auto; max-width: 100%; }
    .cjm-hero-heading { font-size: 1.6em; }
    .cjm-job-filters { flex-direction: column; align-items: stretch; }
    .cjm-job-filters select, .cjm-job-filters button { width: 100%; }
    .cjm-job-row { flex-wrap: wrap; }
    .cjm-job-row-meta { flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; gap: 10px; width: 100%; padding-left: 56px; box-sizing: border-box; }
    .cjm-job-row-action { width: 100%; padding-left: 56px; box-sizing: border-box; }
    .cjm-job-row-action a.button { display: block; width: 100%; text-align: center; box-sizing: border-box; }
}
