@charset "UTF-8";

/* Styles specific to projekte/werkliste.html - project table with filters */

div.jah_werkliste {
  margin: 0;
  padding: 40px 20px 0 20px;
  text-align: left;
}

/* ---------- filter bar ---------- */

div.jah_werkliste_filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  padding: 0 0 30px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 14px;
  line-height: 18px;
}

div.jah_werkliste_filter select {
  font-family: var(--font_family_main);
  font-size: 14px;
  line-height: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--font_main_color);
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23000'/%3E%3C/svg%3E") no-repeat right 4px center;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 2px 22px 2px 6px;
  margin: 0;
  cursor: pointer;
  field-sizing: content;
  max-width: 320px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

div.jah_werkliste_filter select:hover,
div.jah_werkliste_filter select:focus {
  outline: none;
  border-bottom: 2px solid var(--font_main_color);
}

div.jah_werkliste_filter select.jah_werkliste_filter_active {
  background-color: var(--highlight_color);
}

a.jah_werkliste_reset {
  color: var(--font_main_color);
  text-decoration: none;
  padding: 2px 0;
  border-bottom: 2px solid transparent;
  display: none;
}

a.jah_werkliste_reset.jah_werkliste_reset_visible {
  display: inline;
}

a.jah_werkliste_reset:hover {
  border-bottom: 2px solid var(--font_main_color);
}

span.jah_werkliste_count {
  margin-left: auto;
}

/* ---------- table (desktop) ---------- */

table.jah_werkliste_table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.4;
  font-weight: 400;
}

table.jah_werkliste_table th {
  text-align: left;
  font-size: 14px;
  line-height: 18px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0 10px 8px 6px;
  border-bottom: 2px solid var(--font_main_color);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

table.jah_werkliste_table th:hover {
  text-decoration: underline;
}

table.jah_werkliste_table th.jah_sort_asc::after {
  content: " \2191";
}

table.jah_werkliste_table th.jah_sort_desc::after {
  content: " \2193";
}

table.jah_werkliste_table td {
  padding: 9px 10px 9px 6px;
  border-bottom: 1px solid #c4c4c4;
  vertical-align: top;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

table.jah_werkliste_table tbody tr {
  cursor: pointer;
}

table.jah_werkliste_table tbody tr:hover td {
  background-color: var(--highlight_color);
}

table.jah_werkliste_table a {
  color: var(--font_main_color);
  text-decoration: none;
}

table.jah_werkliste_table tr.jah_werkliste_hidden {
  display: none;
}

col.jah_wl_col_year { width: 7%; }
col.jah_wl_col_project { width: 25%; }
col.jah_wl_col_place { width: 14%; }
col.jah_wl_col_cat { width: 12%; }
col.jah_wl_col_proc { width: 21%; }
col.jah_wl_col_lph { width: 9%; }
col.jah_wl_col_area { width: 12%; }

td.jah_wl_lph,
td.jah_wl_area {
  white-space: nowrap;
}

p.jah_werkliste_empty {
  display: none;
  padding: 30px 6px;
  font-size: 16px;
}

p.jah_werkliste_empty.jah_werkliste_empty_visible {
  display: block;
}

/* ---------- mobile: rows become stacked blocks ---------- */
/* switches together with the rest of the site (desktop menu -> mobile menu) */

@media all and (max-width: 1024px) {
  div.jah_werkliste {
    padding: 30px 20px 0 20px;
  }

  div.jah_werkliste_filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px 20px;
    padding: 0 0 25px 0;
  }

  div.jah_werkliste_filter select {
    width: 100%;
    min-width: 0;
    padding-left: 0;
  }

  table.jah_werkliste_table tbody tr,
  table.jah_werkliste_table td {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  td.jah_wl_lph,
  td.jah_wl_area {
    white-space: normal;
  }

  span.jah_werkliste_count {
    margin-left: 0;
  }

  table.jah_werkliste_table,
  table.jah_werkliste_table tbody {
    display: block;
    width: 100%;
  }

  table.jah_werkliste_table colgroup,
  table.jah_werkliste_table thead {
    display: none;
  }

  table.jah_werkliste_table tbody {
    border-top: 2px solid var(--font_main_color);
  }

  table.jah_werkliste_table tbody tr {
    display: flex;
    flex-wrap: wrap;
    padding: 12px 4px;
    border-bottom: 1px solid #c4c4c4;
  }

  table.jah_werkliste_table tbody tr:hover,
  table.jah_werkliste_table tbody tr:active {
    background-color: var(--highlight_color);
  }

  table.jah_werkliste_table tbody tr:hover td {
    background-color: transparent;
  }

  table.jah_werkliste_table tr.jah_werkliste_hidden {
    display: none;
  }

  table.jah_werkliste_table td {
    display: block;
    padding: 0;
    border: none;
    font-size: 14px;
    line-height: 1.4;
  }

  /* line 1: JAHR · KATEGORIE */
  td.jah_wl_year,
  td.jah_wl_cat {
    order: 1;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 2px;
  }

  td.jah_wl_cat::before {
    content: "\00a0\00b7\00a0";
  }

  /* line 2: project name */
  table.jah_werkliste_table td.jah_wl_project {
    order: 2;
    width: 100%;
    font-size: 16px !important;
    padding: 3px 0 3px 0 !important;
  }

  /* line 3: Ort · Verfahren · LPH · BGF */
  td.jah_wl_place,
  td.jah_wl_proc,
  td.jah_wl_lph,
  td.jah_wl_area {
    order: 3;
    color: #555555;
  }

  /* separator at the END of an item, so a wrapped line never starts with "·" */
  td.jah_wl_place::after,
  td.jah_wl_proc::after,
  td.jah_wl_lph::after {
    content: "\00a0\00b7\00a0";
  }

  td.jah_wl_lph:has(+ td.jah_wl_none)::after,
  td.jah_wl_proc:has(+ td.jah_wl_none + td.jah_wl_none)::after {
    content: none;
  }

  table.jah_werkliste_table td.jah_wl_none {
    display: none;
  }
}

@media all and (max-width: 400px) {
  div.jah_werkliste_filter {
    grid-template-columns: minmax(0, 1fr);
  }
}
