/* Create ECL default font class */
.arial-font-family {
  font-family: Arial, sans-serif;
}

/* Browse by country exandable */
.browse_by_country .ecl-button__label,
.browse_by_country .ecl-icon {
  color: #004494 !important;
  fill: #004494 !important;
}

/* K4P Visualisations */
#chart_container_global {
  background-color: #eeeeee;
  padding: 1em;
}
#chart_data_set {
  text-align: center;
  padding-top: 1em;
}
.tableauPlaceholder {
  width: 100%;
  height: 1024px;
}
.tableauViz {
  display: none;
}

/* K4P search blocks */
.k4p-search-block .ecl-form-group__search-text {
  flex-basis: 80%;
}
.k4p-search-block .ecl-form-group__search-options {
  flex-basis: 100%;
}
.k4p-search-block {
  display: block;
}

/* Layout module bug */
.layout-builder-configure-block .ecl-select__container .chosen-container-active {
  z-index: 1000;
}

/* KS Page header background */
.page-header--image {
  background: #004494 url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP//yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) 50%/cover no-repeat;
}
.page-header--image .ecl-breadcrumb {
  background-color: unset !important;
}

/* ECL button */
.ecl-editor .ecl-button {
  text-decoration: unset !important;
}
.ecl-editor .ecl-button--primary {
  color: #fff !important;
}
.ecl-editor .ecl-button--primary:hover {
  color: #fff !important;
}
.ecl-editor .ecl-button--secondary {
  background-color: #fff !important;
  border: 2px solid #004494 !important;
  color: #004494;
}
.ecl-editor .ecl-button--secondary:active,
.ecl-editor .ecl-button--secondary:hover {
  background-color: #fff !important;
  color: #002f67;
}
.ecl-editor .ecl-button--call {
  color: #000 !important;
}
.ecl-editor .ecl-button--call:active,
.ecl-editor .ecl-button--call:hover {
  border: 2px solid #000 !important;
}

.ecl-file__translation-toggle {
  color: #004494 !important;
  background-color: #fff !important;
  font-weight: 400 !important;
  margin-bottom: .25rem !important;
  margin-right: -1rem !important;
  margin-top: .25rem !important;
}

/* Image default style */
img {
  height: auto;
  max-width: 100%;
}c

/* Layout css improvement */
.layout__region.layout__region--second {
  max-width: 48%;
  padding: 0 1%;
}

/* Recommended reading tabs */
#quicktabs-recommended_reading {
  border: none;
}

#quicktabs-recommended_reading .ui-tabs-nav {
  background: #fff;
  border: none;
  border-bottom: 2px solid #9f9f9f;
  padding: 0 0 0 0;
}

#quicktabs-recommended_reading .ui-tabs-nav li {
  border: none;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  background: #fff !important;
  margin-bottom: -2px;
}

#quicktabs-recommended_reading .ui-tabs-panel {
  padding: 0 0 0 0;
}

#quicktabs-recommended_reading .ui-tabs-nav li.ui-state-active {
  border: 2px solid #9f9f9f;
  border-bottom: 2px solid transparent;
}

#quicktabs-recommended_reading .ui-tabs-nav li a:hover {
  text-decoration: underline;
}

#quicktabs-recommended_reading .ui-tabs-nav a:focus {
  background: #ffd617 !important;
}

#quicktabs-recommended_reading .ui-tabs-nav li a {
  color: #404040;
  font-size: 18px;
  font-weight: 700;
  padding: .89rem 1rem;
}

#quicktabs-recommended_reading .ecl-content-item-block a {
  color: #004494;
}

.recommended-reading-button {
  float: right;
  color: white !important;
}

/* Improve the table  */
td[data-ecl-table-header="Label"] {
  width: 25%;
}

/* Improve the Social share block */
#block-socialshare-2 {
  margin-top: 20px;
}

/* Bug in Webtools with ECL In-page Navigation */
@media (min-width: 992px) {
  .ecl-inpage-navigation__list {
    display: block !important;
  }
}

/* Highlight content type */
.highlighted-item {
  padding: 0 !important;
}
.highlighted-item__content {
  margin: 0.5rem 0.5rem 0 0;
}
.highlighted-item a {
  text-decoration: none;
}
.highlighted-item__text,
.highlighted-item__text h3 {
  font-size: 1.125rem;
  margin: 0;
  padding: 0;
  height: 45px;
}
.highlighted-item:hover .highlighted-item__text h3 {
  color: #404040;
  text-decoration: underline;
}
.highlighted-item__image {
  text-align: center;
}

/* ECL Media */
.ecl-media-container__media {
  cursor: pointer;
}
.ecl-editor a.ecl-media-colorbox {
  text-decoration: unset !important;
}

/* ECL Menu */
.ecl-menu-legacy__mega {
  z-index: 100;
}

.ecl-menu-legacy__mega:before {
  background-color: #d9d9d9 !important;
}

.ecl-menu-legacy__subitem a {
  padding-left: 1rem;
}

/* Remove the ECL main content padding */
#main-content {
  padding-top: 1rem !important;
}

/* Bioeconomy glossary */
.bioeconomy-glossary-letters a {
  display: block;
  float: left;
  width: 70px;
  margin-left: 5px;
  margin-top: 5px;
  text-align: center;
  font-size: 2em;
  font-weight: 600;
  color: white;
  text-decoration: none !important;
  padding: 10px;
  background-color: #004494;
  border-radius: 10px;
}

.bioeconomy-glossary-letters a:hover {
  text-decoration: underline !important;
}

.ecl-footer__site-identity {
  background-color: #bfd0e4;
}
.ecl-footer__site-identity a {
  color: #012b58;
  text-decoration: none;
}
.ecl-footer__site-identity a:hover {
  text-decoration: underline;
}

.subfooter-menu {
  list-style: none;
  margin-left: 0px;
  max-width: none;
  padding-left: 0;
}

.subfooter-menu a {
  text-decoration: underline;
}

/* Red background for unpublished content */
.path-node .unpublished .node {
  background: #fcf4f2;
}
.path-node .unpublished #block-k4p-theme-main-page-content {
  background: #fcf4f2;
}

/* ECL Link */
.ecl-link {
  word-wrap: break-word;
}

/* Views - Latest knowledge button */
#organisation-latest-knowledge-button,
#organisation-related-knowledge-service-button,
#topic-relevant-resources-button {
  float: right;
}

/* What-we-do and Brief-me image/video */
/* Then we override the mobile style, if needed */
@media (max-width: 768px) {
  .what-we-do-image-video,
  .brief-me-image-video {
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center;
  }
}
@media (min-width: 769px) {
  .what-we-do-image-video,
  .brief-me-image-video {
    width: 50%;
  }
}

.facet-search-list-item {
  list-style-type: none;
  line-height: 24px;
}

.related-knowledge-service-button {
  width: 100%;
  float: right;
  clear: both;
}

.k4p-clear {
  clear: both;
}

/* Fixing font for embedded entities and links. */
.ecl-editor figcaption,
.ecl-editor .embedded-entity,
.ecl-expandable .ecl-container,
.ecl-editor .about-ks-link,
#block-subfooterblock,
.facets-soft-limit-link,
.organisation-url-title {
  font: normal normal 400 1rem/1.5rem Arial,sans-serif !important;
  color: #404040;
}

/* Policy layer */
/* First we define the mobile style */
.ks-topics-view .ecl-container {
  padding: 0;
}
.ks-topics-view .ecl-row,
.ks-tools-view .ecl-row {
  margin: 0;
  padding: 0;
  list-style-type: none;
}
.ks-topics-view .ecl-row .featured,
.ks-tools-view .ecl-row .featured {
  font-weight: bold;
  background-color: #eee;
}
.ks-topics-view .ecl-row .ecl-content-item__image__before,
.ks-tools-view .ecl-row .ecl-content-item__image__before {
  float: unset;
  width: 100%;
  margin: unset;
}
.ks-topics-view .ecl-row .featured .ecl-content-item__description p,
.ks-tools-view .ecl-row .featured .ecl-content-item__description p {
  font-weight: bold !important;
}

/* Then we override the mobile style, if needed */
@media (min-width: 992px) {
  .ks-topics-view .ecl-row,
  .ks-tools-view .ecl-row {
    display: grid;
    grid-template-columns: repeat(3, 33%);
    grid-gap: 1rem;
    width: calc(100% - 1.75rem);
  }
  .ks-topics-view .ecl-row .featured,
  .ks-tools-view .ecl-row .featured {
    grid-row-end: span 2;
  }
}

/* ApacheSolr image style */
.apachesolr-view .ecl-content-item__image {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.apachesolr-view .ecl-content-item__image img {
  max-width: 100%;
  height: auto;
}

/* ApacheSolr checkbox facet margin */
.js-facets-checkbox-links .facets-checkbox {
  margin-right: .25rem !important;
}

/* Remove the padding of the text on landing pages */
.field--name-field-ks-visual-summary p:first-child {
  margin-top: 0;
}
.field--name-field-ks-visual-summary ul {
  padding-left: 0;
}

.facets-widget-k4p_group_taxonomy_facet_checkbox_widget li {
  list-style-type: none;
}

.facets-widget-k4p_group_taxonomy_facet_checkbox_widget .vocabulary_name {
  margin-left: -20px;
  font-weight: bold;
}

.ecl-content-item__description a {
  color: #004494;
}

.ecl-links-area a:not(.ecl-tag) {
  color: #004494;
  text-decoration: none;
}

.ecl-links-area a:not(.ecl-tag):hover {
  text-decoration: underline;
}

.ecl-table__cell.empty_th:before {
  display: none !important;
}

/* IE10+ display KS fix */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) and (min-width: 480px) {
  .ks-topics-view .ecl-row .ecl-u-d-sm-flex {
    max-width: 238px;
    margin-right: 15px !important;
  }
  .ks-topics-view .ecl-row .featured,
  .ks-tools-view .ecl-row .featured {
    margin-right: 15px;
    margin-bottom: 15px;
    max-width: 218px;
  }
  .ecl-search-form .ecl-form-group {
    display: block;
  }
}
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) and (min-width: 769px) {
  .what-we-do .field--name-field-ks-visual-summary ul {
    list-style-position: inside !important;
    text-indent: -20px;
  }
}

/* About & Newsletter buttons */
.what-we-do .k4p-about-nl {
  text-align: right;
}

.what-we-do .field--name-field-ks-visual-summary p,
.what-we-do ul li {
  max-width: unset;
}

.what-we-do .k4p-about-nl .ecl-button {
  margin-top: .33em;
}

.ecl-footer__site-identity {
  background-color: #004494;
}
.ecl-footer__site-identity a {
  color: white;
  text-decoration: none;
}
.ecl-footer__site-identity a:hover {
  text-decoration: underline;
}

.subfooter-menu {
  list-style: none;
  margin-left: 0px;
  max-width: none;
  padding-left: 0;
}

.subfooter-menu a {
  text-decoration: underline;
}

.sitewide-footer {
  background-color: #e5e5e5;
}
.sitewide-footer a {
  color: #004494;
}

.sitewide-footer a:hover {
  color: #004494;
}

.sitewide-footer a.ecl-link--external::after {
  content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKAgMAAADwXCcuAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAxQTFRFAAAAAESUAESUAESUf5/8iAAAAAR0Uk5TAP9gIFOYGRgAAAAqSURBVHicY2BgDWAIZQpgcOCcwOCgJsDgMIOBwTmBgcHhgAMDDIaGOgAAgeUG8UonVw4AAAAASUVORK5CYII=)!important;
  margin: 0px 3px 0px 5px;
}

.ecl-footer__site-identity {
  color: white;
}

.ecl-footer__site-identity .footer-middle-menu {
  padding: 0px;
  padding-left: 1em;
}

.contextual .trigger {
  background-image: url("../../../../core/themes/stable/images/core/icons/bebebe/pencil.svg") !important;
  background-color: transparent !important;;
  background-repeat: no-repeat !important;;
  background-position: center center !important;;
  background-size: 16px 16px !important;;
  top: -6px !important;;
}

.contextual .trigger:hover {
  background-color: transparent !important;
}

.ecl-u-bg-yellow-75 .ecl-menu__list {
  background-color: #ffde39 !important;
}

.ecl-u-bg-yellow-75 .ecl-menu__list:hover {
  background-color: #ffde39 !important;
}

.ecl-u-bg-yellow-75 a.ecl-menu__link {
  color: #004494 !important;
}

.ecl-u-bg-yellow-75 a.ecl-menu__link:hover {
  color: #004494;
}

@media (max-width: 996px) {
  .skip-prefil-header .ecl-table__cell:last-of-type {
    margin-bottom: 0px;
    border-bottom: 0px;
  }

  .skip-prefil-header .ecl-table__cell:nth-of-type(2n) {
    background-color: white;
  }
}

@media (min-width: 996px) {
  td.ecl-u-d-lg-block {
    display: table-cell !important;
  }
}
