:root {
  --marker-size: 24px;
}

/* Projects + LTMs archive shared layout
 *
 * The scope class comes from post_class() on the article element wrapping
 * each archive — `ltm-projects` on the projects archive, `ltms` on the LTMs
 * archive. Both archives share the same filter-bar shape (search input + a
 * button on the right, optional select in the middle on projects only).
 */

.ltm-projects input,
.ltms input {
  border-radius: var(--border-radius);
}

.ltm-projects .filter-bar,
.ltms .filter-bar {
  display: flex;
  flex-direction: column;
}

.ltm-projects .filter-bar > *,
.ltms .filter-bar > * {
  height: 40px;
}

.ltm-projects .filter-bar > *:not(:last-child),
.ltms .filter-bar > *:not(:last-child) {
  margin-bottom: 0.5em;
}

@media (min-width: 768px) {
  .ltm-projects .filter-bar,
  .ltms .filter-bar {
    flex-direction: row;
  }

  .ltm-projects .filter-bar > *:not(:last-child),
  .ltms .filter-bar > *:not(:last-child) {
    margin-bottom: 0;
    margin-right: 0.5em;
  }
}

.ltm-projects .filter-bar .select2-selection {
  min-height: 100% !important;
  max-height: 100% !important;
  height: 100% !important;
  border-radius: var(--border-radius);
  border: 1px solid #e5e5e5; /* Color following UI-Kit */
  display: flex;
  align-items: center;
  padding: 0;
}

.ltm-projects .filter-bar .select2-selection:focus-within {
  border: 1px solid #1e87f0; /* Color following UI-Kit */
}

.ltm-projects .filter-bar .select2-search--inline {
  padding: 0 10px;
  display: flex;
  align-items: center;
}

.ltm-projects .filter-bar .select2-search--inline input {
  margin: 0;
}

.ltm-projects .filter-bar .select2-search__field {
  padding: 0;
  margin: 0;
  height: 32px;
  width: 100%;
}

.ltm-projects .filter-bar .select2-search__field::placeholder {
  color: #999999; /* Color following UI-Kit */
}

.ltm-projects .filter-bar .select2-selection__rendered {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.ltm-projects .filter-bar .select2-selection__choice {
  display: inline-flex;
  align-items: center;
  margin: 2px;
}

.ltm-projects .filter-bar .select2-selection__choice__remove {
  display: flex;
  align-items: center;
}

.ltm-projects .hidden-label {
  display: none;
}

/* LTMs map */

#map-ltms-main {
  height: 500px;
}

#map-ltms-main.leaflet-container {
  border-radius: var(--border-radius-large);
}

.ltm-map-marker {
  display: block;
  border: 1px solid var(--color-white);
  background-color: var(--color-mint);
  border-radius: 50%;
  width: 100%;
  height: 100%;
}

/* Municipalities map  */

.map-municipalities-wrapper {
  width: 100%;
  height: 200px;
}

.map-municipalities {
  height: 100%;
}

.map-municipalities-main {
  height: 500px;
}

.map-municipalities-main .leaflet-container {
  border-radius: var(--border-radius-large);
}

.map-municipalities-projects-single {
  height: 200px;
}

.map-municipalities-projects-loop {
  height: 100px;
}

.municipalities-map-marker {
  width: 100%;
  height: 100%;
  display: block;
  /* top: calc(var(--marker-size) / 2 * -1); */
  position: relative;
  border-radius: 50%;
  /* border-radius: var(--marker-size) var(--marker-size) 0; */
  /* transform: rotate(45deg); */
  border: 1px solid var(--color-white);
  background-color: var(--color-orange);
}

.marker-popup h1,
.marker-popup h2,
.marker-popup ul {
  margin: 0;
}

.marker-popup h1,
.marker-popup h2 {
  font-weight: 600;
}

.marker-popup h1 {
  font-size: 16px;
  margin-bottom: 6px;
}

.marker-popup h2 {
  font-size: 12px;
  margin-bottom: 4px;
}

.marker-popup .projects-list {
  list-style: square;
  padding-left: 1em !important;
}

.tags button,
.tags a {
  margin-bottom: 0.25em;
}

/* Project loop cards  */

.projects-placeholder {
  border-radius: var(--border-radius-large);
}

.proj-card a:hover {
  text-decoration: none;
}

.proj-card a .header-wrapper {
  position: relative;
  width: 100%;
}

.proj-card a h3:before {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 4px;
  left: 0;
  background-color: var(--color-text);
  visibility: hidden;
  transition: all 0.5s ease-in-out;
}

.proj-card a:hover h3:before {
  visibility: visible;
  width: 100%;
}

.proj-card .uk-card-header,
.dataset-card .uk-card-header {
  font-weight: bolder;
  color: var(--color-gray-dark);
}

.proj-card .uk-card-body,
.dataset-card .uk-card-body {
  flex-grow: 1;
}

.proj-card .proj-logo,
.proj-logo-placeholder {
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.proj-card .proj-logo {
  object-fit: cover;
  border: 2px solid var(--color-orange);
}

.proj-card .proj-logo-placeholder {
  background: var(--color-orange);
}

.proj-card .project-ltm-list {
  list-style: none;
  padding-left: 0;
}

.proj-card .project-ltm-list a:hover {
  color: var(--color-purple);
  transition: all 0.2s ease-in-out;
}

/* Ltm loop card */

.ltm-card .proj-logo-placeholder {
  background: var(--color-mint);
}

/* Dataset card */

.dataset-card .proj-logo-placeholder {
  background: var(--color-purple-light);
}

/* Single project */

.single-project .overview-content {
  display: flex;
  flex-direction: column;
  font-size: 0.9em;
}

.single-project .overview-content .project-logo {
  float: left;
  flex-grow: 1;
}

.single-project .overview-content .project-logo img {
  width: 100px;
  height: 100px;
  border-radius: var(--border-radius-large);
  object-fit: cover;
}

.single-project .map-municipalities-project-single .leaflet-container {
  border-radius: var(--border-radius-large);
}

.dataset-card,
.news-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--border-radius-large);
}

.dataset-card .uk-card-header,
.news-card .uk-card-header {
  border-top-left-radius: var(--border-radius-large);
  border-top-right-radius: var(--border-radius-large);
  background-color: var(--color-gray-light);
}

.dataset-card .uk-card-footer,
.news-card .uk-card-footer {
  border-bottom-left-radius: var(--border-radius-large);
  border-bottom-right-radius: var(--border-radius-large);
}

.project-funder {
  border-radius: var(--border-radius-large);
  background-color: var(--color-gray-lightest);
  min-height: 85px;
  max-width: 400px;
}

.project-funder a {
  text-decoration: none;
  color: var(--color-text);
}

.project-funder .uk-card-body img {
  float: left;
  margin-right: 1em;
}

.project-funder .uk-card-body p {
  margin: 0;
}
