/* Jooking V2.5.19 - compact responsive layout + smaller report cards */

/* HEADER */
.topbar {
  gap: 14px !important;
  padding-left: 34px !important;
  padding-right: 28px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.topbar .brand {
  flex: 0 0 auto !important;
  margin-right: 0 !important;
}

.topbar .brand-logo {
  height: 104px !important;
  max-width: 162px !important;
}

.topbar .nav {
  flex: 1 1 auto !important;
  justify-content: flex-start !important;
  gap: clamp(16px, 1.6vw, 32px) !important;
  min-width: 0 !important;
}

.topbar .nav a {
  white-space: nowrap !important;
}

.topbar .report-cta {
  flex: 0 0 auto !important;
  margin-left: 6px !important;
  padding: 18px 22px !important;
  max-width: 220px !important;
  white-space: normal !important;
}

/* CATEGORY CARDS */
.category-strip {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(118px, 1fr)) !important;
  gap: 14px !important;
  align-items: stretch !important;
  margin-bottom: 48px !important;
}

.category-card {
  min-height: 132px !important;
  padding: 14px 10px !important;
  border-radius: 16px !important;
}

.category-card .category-icon,
.category-card img,
.category-card svg {
  max-width: 68px !important;
  max-height: 68px !important;
}

.category-card h3,
.category-card strong,
.category-card span {
  font-size: 16px !important;
  line-height: 1.12 !important;
}

/* SEARCH PANEL */
.search-panel {
  clear: both !important;
  margin-top: 46px !important;
  padding: 28px !important;
}

.search-title h2 {
  font-size: 34px !important;
}

.search-grid {
  gap: 12px !important;
  grid-template-columns: 1fr 1fr 1fr 128px !important;
}

.search-grid .field select,
.search-grid .field input {
  min-height: 64px !important;
}

.search-grid .btn {
  min-height: 64px !important;
}

/* REPORT CARDS */
.results-grid {
  gap: 16px !important;
}

.results-grid > article,
.results-grid > div:not(.empty-state),
.result-card,
.incident-card,
.place-card {
  position: relative !important;
  align-items: stretch !important;
  border-radius: 14px !important;
  min-height: 188px !important;
  max-height: 205px !important;
  overflow: hidden !important;
}

/* left icon panel */
.result-card .card-image,
.incident-card .card-image,
.place-card .card-image,
.result-icon-panel,
.result-image,
.card-left {
  min-height: 188px !important;
  height: 188px !important;
  max-height: 188px !important;
  padding: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.result-card .card-image img,
.incident-card .card-image img,
.place-card .card-image img,
.result-icon-panel img,
.result-image img,
.card-left img,
.result-card svg,
.incident-card svg,
.place-card svg {
  max-width: 88px !important;
  max-height: 88px !important;
}

/* content area */
.result-card .card-body,
.incident-card .card-body,
.place-card .card-body,
.card-content,
.result-content {
  padding-top: 16px !important;
  padding-bottom: 14px !important;
  padding-right: 18px !important;
  min-height: 188px !important;
  box-sizing: border-box !important;
}

.result-card h3,
.incident-card h3,
.place-card h3,
.result-content h3,
.card-content h3 {
  font-size: 24px !important;
  line-height: 1.08 !important;
  margin: 5px 0 8px !important;
}

.result-card p,
.incident-card p,
.place-card p,
.result-content p,
.card-content p {
  margin-top: 5px !important;
  margin-bottom: 7px !important;
  line-height: 1.25 !important;
}

/* right risk column becomes compact */
.result-actions,
.risk-panel,
.card-actions,
.result-side {
  min-width: 145px !important;
  width: 145px !important;
  padding: 12px !important;
  gap: 3px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-content: flex-start !important;
  align-items: center !important;
  justify-content: center !important;
}

.risk-score,
.score-box {
  width: 60px !important;
  height: 54px !important;
  font-size: 24px !important;
  margin: 3px auto 6px !important;
}

/* hide buttons in right column to remove height */
.result-actions .btn,
.risk-panel .btn,
.card-actions .btn,
.result-side .btn {
  display: none !important;
}

.result-actions > h4,
.result-actions > p,
.risk-panel > h4,
.risk-panel > p,
.card-actions > h4,
.card-actions > p,
.result-side > h4,
.result-side > p {
  flex-basis: 100% !important;
  text-align: center !important;
  margin: 3px 0 !important;
}

/* style buttons if search.js places them under the date */
.report-inline-actions,
.card-inline-actions,
.result-inline-actions {
  display: flex !important;
  gap: 10px !important;
  margin-top: 12px !important;
  flex-wrap: wrap !important;
}

.report-inline-actions .btn,
.card-inline-actions .btn,
.result-inline-actions .btn,
.result-card .card-body .btn,
.incident-card .card-body .btn,
.place-card .card-body .btn,
.result-content .btn,
.card-content .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 10px 14px !important;
  margin-top: 8px !important;
  margin-right: 8px !important;
  width: auto !important;
  min-width: 125px !important;
}

/* RESPONSIVE */
@media (max-width: 1280px) {
  .topbar {
    gap: 12px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .topbar .brand-logo {
    height: 94px !important;
    max-width: 148px !important;
  }

  .topbar .nav {
    gap: 16px !important;
  }

  .topbar .nav a {
    font-size: 18px !important;
  }

  .topbar .report-cta {
    padding: 16px 18px !important;
    max-width: 205px !important;
  }

  .category-strip {
    grid-template-columns: repeat(4, minmax(135px, 1fr)) !important;
  }
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap !important;
    justify-content: center !important;
    overflow: visible !important;
    padding: 18px !important;
  }

  .topbar .brand-logo {
    height: 82px !important;
    max-width: 142px !important;
  }

  .topbar .nav {
    order: 3 !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    justify-content: center !important;
    gap: 18px !important;
    flex-wrap: wrap !important;
  }

  .topbar .report-cta {
    margin-left: auto !important;
    max-width: 210px !important;
    padding: 15px 18px !important;
  }

  .category-strip {
    grid-template-columns: repeat(2, minmax(140px, 1fr)) !important;
  }

  .search-grid {
    grid-template-columns: 1fr !important;
  }

  .search-grid .btn {
    width: 100% !important;
  }

  .results-grid > article,
  .results-grid > div:not(.empty-state),
  .result-card,
  .incident-card,
  .place-card {
    grid-template-columns: 1fr !important;
    max-height: none !important;
  }

  .result-actions,
  .risk-panel,
  .card-actions,
  .result-side {
    border-left: 0 !important;
    border-top: 1px solid #d9e2ee !important;
    width: 100% !important;
    min-width: 100% !important;
    align-content: center !important;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 14px 12px !important;
  }

  .topbar .brand-logo {
    height: 70px !important;
    max-width: 120px !important;
  }

  .topbar .report-cta {
    width: auto !important;
    max-width: 170px !important;
    font-size: 16px !important;
  }

  .topbar .nav {
    font-size: 15px !important;
    gap: 12px !important;
  }

  .category-strip {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .category-card {
    min-height: 128px !important;
  }

  .category-card .category-icon,
  .category-card img,
  .category-card svg {
    max-width: 64px !important;
    max-height: 64px !important;
  }

  .search-panel {
    padding: 22px !important;
    margin-top: 28px !important;
  }

  .search-title h2 {
    font-size: 28px !important;
  }

  .report-inline-actions .btn,
  .card-inline-actions .btn,
  .result-inline-actions .btn,
  .result-card .card-body .btn,
  .incident-card .card-body .btn,
  .place-card .card-body .btn,
  .result-content .btn,
  .card-content .btn {
    width: 100% !important;
    margin-right: 0 !important;
  }
}
