/**
 * Workforce Program Directory
 * Upload to: /_resources-2025/css/workforce-directory.css
 * Used with: /_resources-2025/js/workforce-directory.js
 *
 * Sizes use em, not rem: the site sets html { font-size: 62.5% }, so
 * 1rem = 10px. The content area inherits body's 16px, so 1em = 16px here.
 */

.wf-dir {
  --wf-green: #00703c;
  --wf-green-dark: #034e2b;
  --wf-text: #222;
  --wf-muted: #555;
  --wf-border: #e2e2e2;
  --wf-panel: #f4f4f4;
}

/* ── Filters ── */
.wf-dir-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1em 1.5em;
  background: var(--wf-panel);
  border: 1px solid var(--wf-border);
  border-radius: 8px;
  padding: 1.5em;
  margin-bottom: 2em;
}

@media (min-width: 768px) {
  .wf-dir-filters {
    grid-template-columns: 3fr 2fr;
  }
}

.wf-dir-field label {
  display: block;
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.125em;
  color: var(--wf-green);
  margin-bottom: 0.45em;
}

.wf-dir-field input,
.wf-dir-field select {
  width: 100%;
  height: 3em;
  font-family: "Roboto", sans-serif;
  font-size: 1em;
  color: var(--wf-text);
  background: #fff;
  border: 2px solid var(--wf-text);
  border-radius: 6px;
  padding: 0 1em;
}

/* Same chevron as the main program directory's .sidebar-select */
.wf-dir-field select {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 2.2em;
  background-image: url("data:image/svg+xml,%3Csvg fill='none' height='10' viewBox='0 0 18 10' width='18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m17.5419 2.36978-7.4609 7.14844c-.23437.19531-.46875.27344-.66406.27344-.23437 0-.46875-.07813-.66406-.23438l-7.5-7.1875c-.390627-.35156-.390627-.97656-.03906-1.32812.35156-.390626.97656-.390626 1.32812-.03906l6.875 6.5625 6.83596-6.5625c.3515-.351566.9765-.351566 1.3281.03906.3516.35156.3516.97656-.0391 1.32812z' fill='%23262626'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 0.625em) 50%;
  background-size: 1em;
}

.wf-dir-search-box {
  position: relative;
}

.wf-dir-search-box svg {
  position: absolute;
  left: 1em;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wf-muted);
  pointer-events: none;
}

.wf-dir-search-box input {
  padding-left: 2.75em;
}

.wf-dir-field input:focus,
.wf-dir-field select:focus {
  outline: 3px solid var(--wf-green);
  outline-offset: 2px;
}

/* ── Active filter chips + "Clear all" — inside the filter box, below the
      fields, matching the course directory ── */
.wf-dir-active {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6em;
  margin-top: 0.5em;
}

.wf-dir-active[hidden] {
  display: none;
}

.wf-dir-clear-all {
  font-family: "Roboto", sans-serif;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--wf-green);
  background: transparent;
  border: 1px solid var(--wf-green);
  border-radius: 999px;
  padding: 0.5em 1.1em;
  cursor: pointer;
  transition: all 0.2s;
}

.wf-dir-clear-all:hover {
  color: #fff;
  background: var(--wf-green);
}

.wf-dir-clear-all:focus-visible {
  outline: 3px solid var(--wf-green);
  outline-offset: 2px;
}

/* ── Count ── */
.wf-dir .wf-dir-count {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.25em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wf-text);
  margin: 0 0 1.2em;
}

/* Chips match the main program and course directories */
.wf-dir-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375em;
}

.wf-dir-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-family: "Roboto", sans-serif;
  font-size: 1em;
  font-weight: 400;
  letter-spacing: 0.4px;
  color: #fff;
  background: var(--wf-green);
  border: none;
  border-radius: 20px;
  padding: 0.375em 0.75em;
  cursor: pointer;
  transition: background 0.15s;
}

.wf-dir-chip:hover {
  background: #008949;
}

.wf-dir-chip:focus-visible {
  outline: 3px solid var(--wf-green);
  outline-offset: 2px;
}

.wf-dir-chip-x {
  opacity: 0.7;
}

/* ── Card grid ── */
.wf-dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.25em), 1fr));
  gap: 2.5em 2em;
}

/* .edit-area a underlines every content link — override for cards */
.edit-area a.wf-dir-card,
a.wf-dir-card {
  display: flex;
  flex-direction: column;
  color: var(--wf-text);
  text-decoration: none;
}

.edit-area a.wf-dir-card:hover,
.edit-area a.wf-dir-card:focus {
  color: var(--wf-text);
  text-decoration: none;
}

.wf-dir-card:focus-visible {
  outline: 3px solid var(--wf-green);
  outline-offset: 4px;
  border-radius: 8px;
}

.wf-dir-card-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
  background: var(--wf-panel);
  margin-bottom: 1em;
}

.wf-dir-card-industry {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 0.875em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wf-muted);
  margin-bottom: 0.3em;
}

.wf-dir .wf-dir-card-title {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.5em;
  line-height: 1.2;
  color: var(--wf-text);
  padding: 0;
  margin: 0 0 0.33em;
}

.wf-dir-card:hover .wf-dir-card-title,
.wf-dir-card:focus .wf-dir-card-title {
  color: var(--wf-green);
  text-decoration: underline;
}

p.wf-dir-card-desc {
  font-family: "Roboto", sans-serif;
  font-size: 1.08em;
  line-height: 1.6;
  color: var(--wf-text);
  margin: 0;
}

/* ── Empty / error ── */
.wf-dir-empty {
  text-align: center;
  padding: 2em 1em;
}

.wf-dir-clear {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  font-size: 1em;
  color: #fff;
  background: var(--wf-green);
  border: none;
  border-radius: 999px;
  padding: 0.6em 1.5em;
  cursor: pointer;
}

.wf-dir-clear:hover {
  background: var(--wf-green-dark);
}

.wf-dir-error {
  padding: 1em;
  border-left: 4px solid #dc3545;
  background: #fdf2f2;
}

@media (prefers-reduced-motion: no-preference) {
  .wf-dir-card-img {
    transition: opacity 0.2s ease;
  }

  .wf-dir-card:hover .wf-dir-card-img {
    opacity: 0.9;
  }
}
