/* Application styles on top of Tabler. Keep component styling in Tabler classes. */

:root,
[data-bs-theme] {
  --tblr-font-sans-serif: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", sans-serif;
}

/* Navy + orange of the LetsEmploy.org brand, shared with the publisher.
   Navy is the primary color (buttons, links); on dark a lighter navy keeps contrast.
   Orange is the accent (logo, "new" badge, hero). On dark the logo ink follows the text. */
:root {
  --app-brand: #184668;
  --app-accent: #f47b20;
  --app-logo-ink: var(--app-brand);
  --app-logo-accent: var(--app-accent);
}

:root,
[data-bs-theme="light"] {
  --tblr-primary: #184668;
  --tblr-primary-rgb: 24, 70, 104;
}

[data-bs-theme="dark"] {
  --tblr-primary: #3a78ad;
  --tblr-primary-rgb: 58, 120, 173;
  --app-logo-ink: currentColor;
}

.app-logo-ink {
  stroke: var(--app-logo-ink);
}

.app-logo-accent {
  stroke: var(--app-logo-accent);
}

.app-logo-dot {
  color: var(--app-logo-accent);
}

.avatar-gradient {
  background-image: linear-gradient(135deg, var(--tblr-primary) 0%, var(--tblr-azure) 100%);
  color: var(--tblr-white);
  font-weight: var(--tblr-font-weight-bold);
}

/* Employer website icon: on white, since many icons assume a light background */
.avatar-icon {
  background: #fff;
  padding: 0.35rem;
}

.avatar-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Facet option without hits in the current search */
.facet-empty {
  opacity: 0.5;
}

.facet-scroll {
  max-height: 12.5rem;
  overflow-y: auto;
}

/* Card teaser: first lines of the description or page excerpt */
.job-teaser {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.job-description {
  white-space: pre-wrap;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .sidebar-sticky {
    position: sticky;
    top: 5rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
  }
}

/* Landing hero: navy band with an orange glow, white text in both themes */
.hero {
  position: relative;
  padding: 3rem 0 2.5rem;
  color: #fff;
  background:
    radial-gradient(60rem 22rem at 85% -20%, rgb(244 123 32 / 0.28), transparent 70%),
    linear-gradient(135deg, #184668 0%, #0f2e46 100%);
}

.hero-title {
  color: inherit;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: var(--tblr-font-weight-bold);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-title .app-logo-dot,
.hero-stat-value {
  color: var(--app-accent);
}

.hero-lead {
  font-size: 1.125rem;
  opacity: 0.85;
  max-width: 40rem;
}

.hero-search {
  max-width: 44rem;
}

.hero-search .form-control {
  border: 0;
}

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: var(--tblr-font-weight-bold);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 999px;
  color: #fff;
  background: rgb(255 255 255 / 0.08);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background-color 0.15s;
}

.hero-chip:hover,
.hero-chip:focus-visible {
  color: #fff;
  background: rgb(255 255 255 / 0.2);
  text-decoration: none;
}

.hero-chip-count {
  opacity: 0.7;
}

/* Recently listed job: solid orange, dark text for contrast */
.badge-new {
  background: var(--app-accent);
  color: #2b1503;
}

/* Server-rendered bar charts (macros/charts.html): label and count, the bar below */
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.75rem;
  row-gap: 0.2rem;
  align-items: center;
  padding: 0.3rem 0.375rem;
  border-radius: var(--tblr-border-radius);
  color: inherit;
  text-decoration: none;
}

.bar-row:hover,
.bar-row:focus-visible {
  color: inherit;
  text-decoration: none;
  background: var(--tblr-bg-surface-secondary);
}

.bar-track {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 0.375rem;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in oklab, var(--tblr-primary) 12%, transparent);
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tblr-primary);
}

.bar-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--tblr-secondary);
}

/* Main navigation: the current section is underlined in the accent color */
.navbar .nav-link.active {
  box-shadow: inset 0 -2px 0 var(--app-accent);
}

/* Column chart (macros/charts.html) */
/* Fills the rest of a flex-column card body, at least 14rem */
.column-chart {
  display: flex;
  flex: 1 0 14rem;
  align-items: stretch;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.column-chart-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.column-chart-track {
  display: flex;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
}

.column-chart-bar {
  width: 100%;
  max-width: 2.5rem;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: var(--tblr-primary);
}

.column-chart-item:last-child .column-chart-bar {
  background: var(--app-accent);
}

.column-chart-count,
.column-chart-label {
  font-size: 0.75rem;
  color: var(--tblr-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.column-chart-label {
  margin-top: 0.25rem;
}

/* Narrow screens: label every other week */
@media (max-width: 575.98px) {
  .column-chart-item:nth-child(even) .column-chart-label {
    visibility: hidden;
  }
}

/* Controls that need JavaScript (saved jobs); theme.js adds .js to <html> */
html:not(.js) .js-only {
  display: none !important;
}

.save-job[aria-pressed="true"] {
  border-color: var(--app-accent);
  background: var(--app-accent);
  color: #2b1503;
}
