/* Highland Thrive Opportunity Hub */
div.job_listings {
  --hub-purple: #49358b;
  --hub-teal: #16818e;
  color: var(--hub-purple);
}

/* Search panel */
div.job_listings .job_filters {
  background: #f3f7f8;
  border: 1px solid #dce5e8;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
}

div.job_listings .job_filters .search_jobs {
  padding: 24px;
  background: transparent;
}

div.job_listings .search_jobs input[type="text"],
div.job_listings .search_jobs select {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #b7c5cb;
  border-radius: 8px;
  background: white;
  color: #28333d;
  font: inherit;
}

div.job_listings .search_jobs input[type="submit"] {
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 8px;
  background: var(--hub-teal);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

div.job_listings .search_jobs input[type="submit"]:hover {
  background: #106572;
}

div.job_listings .job_filters .job_types {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 24px;
  background: white;
  border-top: 1px solid #dce5e8;
}

div.job_listings .job_filters .job_types li {
  float: none;
  margin: 0;
  padding: 0;
  border: 0;
}

div.job_listings .job_types label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #dce5e8;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

div.job_listings input[type="checkbox"] {
  accent-color: var(--hub-teal);
}

/* Opportunity cards */
div.job_listings ul.job_listings {
  border: 0;
  padding: 0;
}

div.job_listings ul.job_listings li.job_listing {
  margin: 0 0 16px;
  border: 1px solid #dce5e8;
  border-radius: 14px;
  overflow: hidden;
  background: white;
  box-shadow: 0 3px 12px rgba(40, 51, 61, 0.06);
}

div.job_listings ul.job_listings li.job_listing > a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px 18px;
  padding: 24px;
  text-decoration: none;
}

div.job_listings ul.job_listings li.job_listing > a:hover {
  background: #f3f9fa;
}

div.job_listings ul.job_listings li.job_listing a img.company_logo {
  position: static;
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin: 0;
}

div.job_listings ul.job_listings li.job_listing a .position,
div.job_listings ul.job_listings li.job_listing a .location,
div.job_listings ul.job_listings li.job_listing a .meta {
  float: none;
  width: auto;
  padding: 0;
  margin: 0;
  text-align: left;
}

div.job_listings ul.job_listings li.job_listing a .position h3 {
  margin: 0 0 6px;
  color: var(--hub-purple);
  font-size: 21px;
  line-height: 1.35;
}

div.job_listings ul.job_listings li.job_listing a .company {
  color: #52616b;
  font-size: 16px;
}

div.job_listings ul.job_listings li.job_listing a .location,
div.job_listings ul.job_listings li.job_listing a .meta {
  grid-column: 2;
  color: #52616b;
  font-size: 15px;
}

div.job_listings ul.job_listings li.job_listing a .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

div.job_listings ul.job_listings li.job_listing a .meta .job-type {
  padding: 5px 12px;
  border-radius: 20px;
  background: #edf8f8;
  color: #116b76;
  font-weight: 700;
}

div.job_listings a:focus-visible,
div.job_listings input:focus-visible,
div.job_listings select:focus-visible {
  outline: 3px solid var(--hub-purple);
  outline-offset: 3px;
}

/* Smaller screens */
@media (max-width: 600px) {
  div.job_listings .job_filters .search_jobs {
    padding: 16px;
  }

  div.job_listings .search_jobs > div {
    float: none;
    width: 100%;
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 12px;
  }

  div.job_listings ul.job_listings li.job_listing > a {
    padding: 18px;
    gap: 10px 12px;
  }

  div.job_listings ul.job_listings li.job_listing a .position h3 {
    font-size: 18px;
  }
}
/* Match the website font */
div.job_listings,
div.job_listings input,
div.job_listings select,
div.job_listings button {
  font-family: inherit;
}

/* Size the enhanced category dropdown */
div.job_listings .search_categories .chosen-container,
div.job_listings .search_categories .select2-container {
  width: 100% !important;
  font-size: 16px;
}

div.job_listings .chosen-container-single .chosen-single {
  height: 48px;
  padding: 0 14px;
  line-height: 46px;
  border: 1px solid #b7c5cb;
  border-radius: 8px;
  background: white;
  box-shadow: none;
}

div.job_listings .chosen-container-single .chosen-single div {
  top: 12px;
}

div.job_listings .select2-container .select2-selection--single {
  min-height: 48px;
  border: 1px solid #b7c5cb;
  border-radius: 8px;
}

div.job_listings .select2-container--default
.select2-selection--single .select2-selection__rendered {
  line-height: 46px;
  padding-left: 14px;
}

div.job_listings .select2-container--default
.select2-selection--single .select2-selection__arrow {
  height: 46px;
}
/* Opportunity Apply button */
.single-job_listing .job_application .application_button {
  appearance: none;
  background: #16818e;
  color: #fff;
  border: 2px solid #16818e;
  border-radius: 8px;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: none;
}

.single-job_listing .job_application .application_button:hover {
  background: #106572;
  border-color: #106572;
}

/* Back to Hub button */
.single-job_listing .hub-back-button .wp-block-button__link {
  background: transparent;
  color: #49358b;
  border: 2px solid #49358b;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.single-job_listing .hub-back-button .wp-block-button__link:hover {
  background: #49358b;
  color: #fff;
}

.single-job_listing .application_button:focus-visible,
.single-job_listing .hub-back-button .wp-block-button__link:focus-visible {
  outline: 3px solid #49358b;
  outline-offset: 4px;
}
/* Solid purple Back to Opportunity Hub button */
.single-job_listing .hub-back-button .wp-block-button__link {
  background: #49358b;
  color: #fff;
  border: 2px solid #49358b;
  padding: 14px 24px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: none;
}

.single-job_listing .hub-back-button .wp-block-button__link:hover {
  background: #38286d;
  border-color: #38286d;
  color: #fff;
}
/* Highland Thrive events */
.tribe-events {
  --tec-color-accent-primary: #16818e;
  --tec-color-accent-primary-hover: #106572;
  --tec-color-button-primary: #16818e;
  --tec-color-button-primary-hover: #106572;
  --tec-color-button-primary-active: #106572;
  --tec-color-link-accent: #49358b;
}

/* Reduce space around the calendar */
.tribe-events .tribe-events-l-container {
  padding-top: 32px !important;
  padding-bottom: 48px !important;
}

/* Purple event headings */
.tribe-events .tribe-events-calendar-list__event-title a {
  color: #49358b !important;
}

.tribe-events .tribe-events-calendar-list__event-title a:hover {
  color: #16818e !important;
}

/* Rounded search button */
.tribe-events .tribe-events-c-search__button {
  border-radius: 8px !important;
}

/* Smaller posters, displayed without cropping */
.tribe-events .tribe-events-calendar-list__event-featured-image {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 220px;
  display: block;
  margin-left: auto;
  border-radius: 8px;
}

/* Space between events */
.tribe-events .tribe-events-calendar-list__event-row {
  margin-bottom: 32px !important;
}

@media (max-width: 767px) {
  .tribe-events .tribe-events-calendar-list__event-featured-image {
    margin-left: 0;
    max-height: 180px;
  }
}
.tribe-events .tribe-events-c-search__button {
  background: #16818e !important;
  border-color: #16818e !important;
  color: #fff !important;
}

.tribe-events .tribe-events-c-search__button:hover {
  background: #106572 !important;
  border-color: #106572 !important;
}
.ht-events-intro {
  max-width: 1176px;
  margin: 0 auto 24px;
  padding: 24px 24px 0;
  box-sizing: border-box;
}

.ht-events-intro h1 {
  color: #49358b;
  font-size: clamp(28px, 4vw, 36px);
  margin: 0 0 18px;
}

.ht-events-intro p {
  color: #49358b;
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 16px;
}
.ht-events-intro {
  font-family: var(--wp--preset--font-family--body, Arial, sans-serif);
  margin-bottom: 32px !important;
}

.ht-events-intro h1 {
  font-family: inherit;
  font-weight: 700;
  margin-bottom: 16px !important;
}

.ht-events-intro p {
  font-family: inherit;
  margin-bottom: 16px !important;
}
/* Hide the calendar introduction on individual events */
.single-tribe_events .ht-events-intro {
  display: none;
}

/* Purple event title */
.single-tribe_events .tribe-events-single-event-title {
  color: #49358b !important;
}

/* Style the All Events link */
.single-tribe_events .tribe-events-back a {
  display: inline-block;
  background: #49358b;
  color: #fff !important;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
}

.single-tribe_events .tribe-events-back a:hover {
  background: #38286d;
}

/* Keep the event poster manageable without cropping */
.single-tribe_events .tribe-events-event-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 480px;
  border-radius: 8px;
}
/* Event description */
.single-tribe_events .tribe-events-single-event-description {
  font-family: Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #49358b;
}

.single-tribe_events .tribe-events-single-event-description li {
  margin-bottom: 6px;
}

/* Clearer date and time */
.single-tribe_events .tribe-events-schedule {
  font-family: Arial, sans-serif;
  color: #49358b;
  margin-bottom: 28px;
}

/* Details, organiser and venue panels */
.single-tribe_events .tribe-events-event-meta {
  clear: both;
  background: #f3f7f8;
  border: 1px solid #dce7eb;
  border-radius: 12px;
  padding: 24px;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.single-tribe_events .tribe-events-single-section-title {
  color: #49358b;
}

.single-tribe_events .tribe-events-event-meta a {
  color: #49358b;
}

/* Poster beside the description on larger screens */
@media (min-width: 900px) {
  .single-tribe_events .tribe-events-event-image {
    float: right;
    width: 34%;
    max-width: 360px;
    margin: 0 0 28px 40px;
  }

  .single-tribe_events .tribe-events-event-image img {
    width: 100%;
    height: auto;
    max-height: none;
  }

  .single-tribe_events .tribe-events-single-event-description {
    width: auto;
    float: none;
  }

  .single-tribe_events .tribe-events-cal-links {
    clear: both;
    padding-top: 20px;
  }
}

/* Keep the poster manageable on phones */
@media (max-width: 899px) {
  .single-tribe_events .tribe-events-event-image {
    float: none;
    margin-bottom: 24px;
  }
}
/* Match paragraph colours */
.single-tribe_events .tribe-events-single-event-description p {
  color: #49358b !important;
}

/* Give both details panels a pale background */
.single-tribe_events .tribe-events-event-meta {
  background: #f3f7f8 !important;
}

/* Allow the poster and description to sit together */
@media (min-width: 900px) {
  .single-tribe_events #tribe-events-content > .tribe_events {
    display: block !important;
  }

  .single-tribe_events .tribe-events-event-image {
    float: right !important;
    width: 34% !important;
    max-width: 360px;
    margin: 0 0 28px 40px !important;
  }

  .single-tribe_events .tribe-events-single-event-description {
    display: block !important;
    clear: none !important;
    width: auto !important;
  }
}