/* UK jobs pages. Loaded only on the UK site, by the pages themselves:
   - /jobs/            (jobs/default.asp, UK branch): sections 1 to 3, on top of css/subjects.css
   - /jobs/<category>/ (the eight jobs/<category>/default.asp, through includes/jobs-uk.inc):
     sections 1 and 2, on top of css/subjects.css
   - /jobs/<subject>/  (jobs/tutor-jobs.asp): section 4, on top of css/subject-dir.css, which
     includes/code-css.inc loads for this page as it does for the subject directory pages.
   Styles only: no text, link or heading of any page is changed here. */

/* ---------- 1. /jobs/ and /jobs/<category>/ : the categories, as pills under the heading ---------- */
.jb-cats
{
  margin-top: 22px;
}

/* The label is a heading on /jobs/ and a paragraph on the category pages, as it was on each */
.sj .jb-cats h2, .sj .jb-cats__label
{
  color: var(--sj-navy);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0;
}

.sj .jb-cats__label strong
{
  font-weight: 700;
}

.jb-cats ul
{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.sj .jb-cats a
{
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--sj-line);
  border-radius: 999px;
  background: #fff;
  color: var(--sj-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  transition: border-color .15s, color .15s, box-shadow .15s;
}

.sj .jb-cats a:hover, .sj .jb-cats a:focus
{
  border-color: var(--sj-blue);
  box-shadow: 0 4px 12px rgba(31, 51, 80, .08);
  color: var(--sj-blue);
}

/* The category being shown: filled, so it cannot be taken for one of the others */
.sj .jb-cats a[aria-current], .sj .jb-cats a[aria-current]:hover, .sj .jb-cats a[aria-current]:focus
{
  border-color: var(--sj-blue);
  background: var(--sj-blue);
  box-shadow: none;
  color: #fff;
}

/* The list follows the hero closely */
.jb .sj-hero + .sj-section
{
  padding-top: 12px;
}

/* ---------- 2. The subject list ----------
   /jobs/ has no counts (.jb-subjects). The category pages (.jb-jobs) have one on each row: the
   number of students, which css/subjects.css places at the right as on the subject pages. */
.sj .jb-subjects a
{
  padding-right: 12px;
}

/* The category lists step up later than the lists of css/subjects.css (two columns from 600px,
   three from 992px there): "Information Technology Tutor Jobs" beside a count needs the room.
   One column on phones, two from 768px, three from 1200px. */
.sj-list.jb-jobs
{
  columns: 1;
}

/* The counts here are short: less room kept for them than the 66px of css/subjects.css.
   40px on phones lets the longest name ("Computer Programming Tutor Jobs") stay on one line
   at 360px. */
.sj .jb-jobs a
{
  padding-right: 40px;
}

@media (min-width: 600px)
{
  .sj .jb-jobs a
  {
    padding-right: 56px;
  }
}

@media (min-width: 768px)
{
  .sj-list.jb-jobs
  {
    columns: 2;
  }
}

@media (min-width: 1200px)
{
  .sj-list.jb-jobs
  {
    columns: 3;
  }
}

/* A category with one or two subjects: the card is no wider than its columns, so a count
   stays beside its subject and not out in the middle of a wide card. On a phone the card
   is the full width, as every list is. */
.sj-list.jb-jobs.jb-jobs--1, .sj-list.jb-jobs.jb-jobs--2
{
  columns: 1;
}

@media (min-width: 600px)
{
  .sj-list.jb-jobs.jb-jobs--1
  {
    max-width: 372px;
  }
}

@media (min-width: 768px)
{
  .sj-list.jb-jobs.jb-jobs--2
  {
    columns: 2;
    max-width: 752px;
  }
}

/* A category with nobody looking at the moment */
.jb-none
{
  margin-top: 16px;
  color: var(--sj-slate);
  font-size: 17px;
}

/* ---------- 3. /jobs/ : the three pieces of text, side by side ---------- */
.jb-about
{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.jb-about__item
{
  padding: 24px 24px 22px;
  border: 1px solid var(--sj-line);
  border-radius: 18px;
  background: #fff;
}

.sj .jb-about h2
{
  font-size: 20px;
  line-height: 1.25;
}

.jb-about p
{
  margin-top: 10px;
  color: var(--sj-slate);
  font-size: 16px;
  line-height: 1.6;
}

@media (min-width: 992px)
{
  /* The pills may run the width of the page: one row on a wide screen */
  .jb .sj-hero--plain .sj-hero__copy
  {
    max-width: none;
  }

  .jb-about
  {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (min-width: 1200px)
{
  .sj-list.jb-subjects
  {
    columns: 4;
  }
}

/* ---------- 4. /jobs/<subject>/ : the list of students ----------
   This sheet comes after css/subject-dir.css and css/previewpanels.css, so equal selectors
   here win. The cards are the directory's, made smaller: a student's request is a few lines,
   and most have no photo. */

/* The two paragraphs above the list: one width, one size */
#maincontentouter #maincontent > p:first-child,
#maincontentouter #maincontent > p:first-child + p
{
  max-width: 900px;
  margin: 0 0 10px !important;
  color: var(--sd-slate);
  font-size: 16px;
  line-height: 1.65;
}

#maincontentouter #maincontent > p:first-child strong
{
  color: var(--sd-navy);
}

#maincontentouter #maincontent > p:first-child + p
{
  margin-bottom: 0 !important;
}

/* The empty paragraph the page writes before the first card */
#maincontentouter #maincontent > p:first-child + p + p
{
  height: 18px;
  margin: 0;
}

#maincontent .usercard2
{
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 18px;
  margin: 0 0 12px;
  padding: 18px 20px;
  border-radius: 18px;
}

#maincontent .usercard2 .usercard2img img
{
  width: 72px;
  height: 72px;
  border-radius: 14px;
}

/* (css/tutorhunt.css gives the name itself 24px, 18px on phones) */
#maincontent .usercard2 .usercardname
{
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.25;
}

#maincontent .usercard2 .usercard2title
{
  margin-top: 4px;
}

/* Under the request: where the student is and how long they have been a member, on one line */
#maincontent .usercard2 .usercardmaincontent2
{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

#maincontent .usercard2 .usercard2desc
{
  flex: 1 1 100%;
  margin-top: 8px;
}

#maincontent .usercard2 .usercard2location,
#maincontent .usercard2 .usercard2meta
{
  flex: 0 0 auto;
  width: auto;
  margin-top: 0;
}

#maincontent .usercard2 .usercard2metaitem
{
  padding: 4px 11px;
}

/* The page numbers sit after the list, outside its column */
#maincontentouter > .pagenums
{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  box-sizing: border-box;
  max-width: 1170px;
  margin: 0 auto;
  padding: 8px 15px 0;
  float: none;
  background: none;
  list-style: none;
  text-align: left;
}

#maincontentouter > .pagenums li, #maincontentouter > .pagenums li:hover, #maincontentouter > .pagenums li.currentpage:hover
{
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  float: none;
  background: none;
  list-style: none;
}

#maincontentouter > .pagenums a
{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: #fff;
  color: var(--sd-ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

#maincontentouter > .pagenums a:hover
{
  border-color: var(--sd-blue);
  color: var(--sd-blue);
}

#maincontentouter > .pagenums .currentpage a, #maincontentouter > .pagenums .currentpage a:hover
{
  border-color: var(--sd-blue);
  background: var(--sd-blue);
  color: #fff;
}

#maincontentouter > .pagenums li.skipblock
{
  align-self: center;
  padding: 0 4px;
  color: var(--sd-slate);
}

/* A single page needs no page numbers */
#maincontentouter > .pagenums li:only-child
{
  display: none;
}

/* The spacer paragraph between the list and the page numbers */
#maincontentouter > #maincontent + p
{
  height: 4px;
  margin: 0;
  font-size: 0;
  line-height: 0;
}

/* (css/subject-dir.css sets 64px with this selector) */
body #maincontentouter
{
  padding-bottom: 40px;
}

@media (max-width: 767px)
{
  #maincontent .usercard2
  {
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 14px;
    padding: 16px;
  }

  #maincontent .usercard2 .usercard2img img
  {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }

  #maincontent .usercard2 .usercardname
  {
    font-size: 18px;
  }

  body #maincontentouter
  {
    padding-bottom: 28px;
  }
}
