/* Hammehr Bullhorn mobile fixes, minimal and targeted */

html, body {
  overflow-x: hidden;
}

body {
  overflow-y: auto !important;
}

@media only screen and (max-width: 768px) {
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .col-xs-12,
  .col-sm-12,
  .col-md-12,
  .col-lg-12 {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  novo-search {
    padding: 12px !important;
  }

  novo-list .job-card {
    margin: 12px 8px !important;
  }

  novo-list .job-card novo-list-item {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Stack the header vertically */
  novo-list .job-card novo-list-item item-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* Title gets a full row */
  novo-list .job-card novo-list-item item-title,
  novo-list .job-card novo-list-item item-title a,
  novo-list .job-card novo-list-item item-title h1,
  novo-list .job-card novo-list-item item-title h2,
  novo-list .job-card novo-list-item item-title h3,
  novo-list .job-card novo-list-item item-title h4,
  novo-list .job-card novo-list-item item-title h5,
  novo-list .job-card novo-list-item item-title h6 {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    line-height: 1.3 !important;
  }

  /* Keep the metadata row stable */
  novo-list .job-card novo-list-item item-header-end {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    row-gap: 8px !important;
    column-gap: 8px !important;
    width: 100% !important;
    margin-top: 6px !important;
    overflow: hidden !important;
  }

  /* Keep pills single-line */
  novo-list .job-card novo-list-item item-header-end > * {
    flex: 0 0 auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    margin: 0 !important;
  }

  /* Put the last pill, usually the date, on its own row */
  novo-list .job-card novo-list-item item-header-end > *:last-child {
    flex-basis: 100% !important;
    width: auto !important;
  }

  /* Body copy spacing */
  novo-list .job-card novo-list-item item-content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 8px !important;
  }

  novo-list .job-card novo-list-item item-content p,
  novo-list .job-card novo-list-item item-content span,
  novo-list .job-card novo-list-item item-content div {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
}

@media only screen and (max-width: 768px) {
  /* Detail page metadata chips */
  .job-info-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    margin-top: 8px !important;
  }

  .job-info-container app-info-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .job-info-container app-info-chips .chip {
    display: inline-flex !important;
    align-items: center !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    margin: 0 !important;
  }

  /* Put the last chip, the date, on its own row */
  .job-info-container app-info-chips .chip:last-child {
    flex-basis: 100% !important;
    width: auto !important;
  }
}
