/**
 * @file
 * Drupal Overrides
 *
 * This file is to override Drupal defaults for the Lyndon Theme.
 */

@import "../../lyndon_build/2.0.0-dev.14/dist/urban/urban.css";

/*
 * Root CSS variables
 */

:root {
  --donate-btn-hover-color: #12719E;
}

/*
 * Root CSS variables
 */

:root {
  --donate-btn-hover-color: #12719E;
}

/*
 * Drupal Core Overrides
 */

/* UI Dialog Overrides */
.lyndon .search-api-autocomplete-search {
  z-index: 999999;
  background: #fff;
}

.lyndon .search-api-autocomplete-search .ui-menu-item .ui-menu-item-wrapper{
  padding:0;
}

.lyndon .search-api-autocomplete-search .ui-menu-item-wrapper.ui-state-active .search-api-autocomplete-suggestion {
  background: #1696D2;
}

#toolbar-administration {
  z-index: 9999 !important;
}

/*
 * Drupal Module Overrides
 */

/* Social Sharing Icons */
.social-sharing-buttons a {
  margin: 0 8px;
}

.social-sharing-buttons svg {
  fill: white;
  background: black;
}



/* Bar flow in News Topic Block */
.headline-news {
  max-width: 150px;
}
.inline-list-overflow {
  width: calc(100% - 150px);
}

/* Alerts */
div[role=alert] {
  color: #C53030;
  animation-duration: 1200ms;
  animation-name: blink;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  -webkit-animation:blink 1200ms infinite; /* Safari and Chrome */
}

@keyframes blink {
  from {
    color:red;
  }
  to {
    color:#C53030;
  }
}
@-webkit-keyframes blink {
  from {
    color:red;
  }
  to {
    color:#C53030;
  }
}


/* BEF */

input[data-bef-auto-submit-click] {
  position: absolute;
  left: -99999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Teaser List -- Highlight picture sizing issue */

.title-fix-override {
  flex-shrink: 24;
}

/* Single Image Block custom block type */
/* See block.theme.inc */
.full-width-img img {
  width: 100vw;
}

/* Media Image Hero width */
/* See media.theme.inc */
.hero-img img {
  width: 100%;
}

/* Media Image square xl used in critical value basic block. */
/* See media.theme.inc */
.square-xl-img img {
  margin: auto;
}
/* Input form for Author filter on publication listing */
input[name="field_authors_name_target_id"] {
  height: 2.5rem;
  padding-left: 0.75rem;
  padding-right: 1.5rem;
}

/* Input Placeholder for Popular Tags views block */
input[name="popular_tags"] {
  font-style: italic;
  font-size: 18px;
  color: #696969;
}

/* Customize select2 library style */
.selection {
  position: relative;
}

.select2 {
  height: 2.5rem;
  display: block;
  border: 1px solid #d2d2d2;
  font-size: 1rem;
  line-height: 1.5rem;
  appearance: none;
  color: #696969;
}

.select2-selection__rendered {
  margin-top: 7px;
}

.select2-dropdown {
  border: 1px solid #d2d2d2;
}

/* Copy from select2/dist/css/select2.css */
.select2-container--lyndon .select2-results > .select2-results__options {
  max-height: 200px;
  overflow-y: auto;
}

.select2-search--dropdown {
  display: block;
  padding: 4px;
}
.select2-search--dropdown .select2-search__field {
  padding: 4px;
  width: 100%;
  box-sizing: border-box;
}
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.select2-search--dropdown.select2-search--hide {
  display: none;
}
.select2-container--lyndon .select2-search--dropdown .select2-search__field {
  border: 1px solid #aaa;
}

.select2-container--lyndon .select2-search--inline .select2-search__field {
  background: transparent;
  border: none;
  outline: 0;
  box-shadow: none;
  -webkit-appearance: textfield;
}

.select2-container--lyndon .select2-results__option--highlighted[aria-selected] {
  background-color: #1696D2;
  color: white;
}
/* end of copy from select2/dist/css/select2.css */

ul.select2-results__options {
  padding: 0;
  margin: 0;
  list-style: none;
  line-height: 1.625;

}

.select2-results__options > li {
  line-height: 1.5;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
}

/* node--list title attributes */
.node-lede-title > a {
  color: black;
}

/* Safari Only CSS  */
/* See layout.html.twig */
@media not all and (min-resolution:.001dpcm) {
  @supports (-webkit-appearance:none) and (display:flow-root) {
    .breakout-slot {
      width: 100%;
    }
    .full-width-img img {
      width: 100%;
    }
  }
}

/* Latest Features and Blogs views block title */
.latest-features-blogs-title > a {
  color: black;


}
.latest-features-blogs-title {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 700;
    line-height: 24px;
    text-transform: none;
}

@media (min-width: 768px) {
  .latest-features-blogs-title {
    font-size: 1.25rem;
    line-height: 30px;
  }
}

@media (min-width: 1024px) {
  .latest-features-blogs-title {
    font-size: 1.5rem;
    line-height: 33px;
  }
}

/* Style override for exposed form filters */
@media (min-width: 768px) {
  .exposed-form-positioned-left {
    margin-left: auto;
    max-width: 460px;
  }
}

.links-list {
  margin-bottom: 26px;
  padding-bottom: 10px;
}

/* Override Tailwind Component */
@media (max-width: 764px) {
  .container {
    max-width: 100%;
  }
}
/* Style override field address */
.address-map-link {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

/* Facet Dropdowns */
.facets-widget-dropdown {
  max-width: 20rem;
  position: relative;
}
div:not(.facet-empty) > .facets-widget-dropdown::after {
  content: '';
  background: var(--dropdown-blue);
  position: absolute;
  --text-opacity: 1;
  color: #1696D2;
  color: rgba(22, 150, 210, var(--text-opacity));
  height: 1rem;
  width: 1rem;
  --transform-translate-x: 0;
  --transform-translate-y: 0;
  --transform-rotate: 0;
  --transform-skew-x: 0;
  --transform-skew-y: 0;
  --transform-scale-x: 1;
  --transform-scale-y: 1;
  transform: translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));
  --transform-translate-y: -0.5rem;
  pointer-events: none;
  right: 0.75rem;
  top: 1.25rem;
}

.field--name-field-media-oembed-video,
.field--name-field-media-video-file {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */
}

/* Then style the iframe to fit in the container div with full height and width */
.media-oembed-content,
video {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

/*Override search autocomplete style */
.js input.form-autocomplete {
  background-image: none;
}
input:focus, textarea:focus, select:focus{
  outline: none;
}

.js input.form-autocomplete.ui-autocomplete-loading {
  background-image: none;
}

.search-api-autocomplete-search .ui-menu-item {
  list-style: none;
}

.js-form-type-hidden {
  display: none;
}

input[name="site_search"] {
  border-radius: 0.375rem;
  font-size: 1.25rem;
  padding: 0.5rem;
}
@media (min-width: 1024px) {
  input[name="site_search"] {
    font-size: 1.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}


input[type="search" i]::-webkit-search-cancel-button {
  display: none;
}

.input[type="search"]:focus {
  cursor: pointer;
}

.input[type="search"]:placeholder-shown {
  cursor: text;
}

/*Hide action button on search exposed form*/
#edit-actions--3 {
  display: none;
}

/* tailwindCSS 1.9.6 does not have bottom utility class */
/* Remove Whitespace from pubs with primary header */
.publication-node {
  position: relative;
  bottom: 2.5rem; /* 40px */
}

@media (min-width: 768px) {
  .publication-node {
    bottom: 3rem; /* 48px */
  }
}

@media (min-width: 1024px) {
  .publication-node {
    bottom: 5rem; /* 80px */
  }
}

/* Spacing for heading tags in style dropdown */
.heading-1-spacing-top {
  padding-bottom: 1rem; /* 16px */
}
@media (min-width: 1024px) {
  .heading-1-spacing-top {
    padding-bottom: 1.5rem; /* 24px */
  }
}

.heading-2-spacing-top {
  padding-top: 3rem; /* 48px */
  padding-bottom: 0.5rem; /* 8px */
}
@media (min-width: 768px) {
  .heading-2-spacing-top {
    padding-top: 3rem; /* 48px */
    padding-bottom: 0.75rem; /* 12px */
  }
}
@media (min-width: 1024px) {
  .heading-2-spacing-top {
    padding-top: 3rem; /* 48px */
    padding-bottom: 1rem; /* 16px */
  }
}

.heading-3-spacing-top,
.heading-3-alt-spacing-top {
  padding-top: 3rem; /* 48px */
  padding-bottom: 1.25rem; /* 20px */
}
@media (min-width: 768px) {
  .heading-3-spacing-top,
  .heading-3-alt-spacing-top {
    padding-top: 3rem; /* 48px */
    padding-bottom: 2rem; /* 32px */
  }
}
@media (min-width: 1024px) {
  .heading-3-spacing-top,
  .heading-3-alt-spacing-top {
    padding-top: 3rem; /* 48px */
    padding-bottom: 1rem; /* 16px */
  }
}

.heading-4-spacing-top {
  padding-top: 3rem; /* 48px */
  padding-bottom: 1.5rem; /* 24px */
}
@media (min-width: 1024px) {
  .heading-4-spacing-top {
    padding-top: 3rem; /* 48px */
    padding-bottom: 1rem; /* 16px */
  }
}

.heading-5-spacing-top {
  padding-top: 2rem; /* 32px */
  padding-bottom: 0.5rem; /* 8px */
}
@media (min-width: 1024px) {
  .heading-5-spacing-top {
    padding-top: 2rem; /* 32px */
    padding-bottom: 0.5rem; /* 8px */
  }
}

.heading-5-spacing-top {
  padding-top: 2rem; /* 32px */
  padding-bottom: 0.5rem; /* 8px */
}
@media (min-width: 768px) {
  .heading-5-spacing-top {
    padding-top: 2rem; /* 32px */
    padding-bottom: 0.5rem; /* 8px */
  }
}

.heading-6-spacing-top {
  padding-top: 2rem; /* 32px */
  padding-bottom: 0.5rem; /* 8px */
}
@media (min-width: 768px) {
  .heading-6-spacing-top {
    padding-top: 2rem; /* 32px */
    padding-bottom: 0.5rem; /* 8px */
  }
}

.heading-1-spacing {
  padding-bottom: 1rem; /* 16px */
}
@media (min-width: 1024px) {
  .heading-1-spacing {
    padding-bottom: 1.5rem; /* 24px */
  }
}

.heading-2-spacing {
  padding-bottom: 0.5rem; /* 8px */
}
@media (min-width: 768px) {
  .heading-2-spacing {
    padding-bottom: 0.75rem; /* 12px */
  }
}
@media (min-width: 1024px) {
  .heading-2-spacing {
    padding-bottom: 1rem; /* 16px */
  }
}

.heading-3-spacing,
.heading-3-alt-spacing {
  padding-bottom: 1.25rem; /* 20px */
}
@media (min-width: 768px) {
  .heading-3-spacing,
  .heading-3-alt-spacing {
    padding-bottom: 2rem; /* 32px */
  }
}
@media (min-width: 1024px) {
  .heading-3-spacing,
  .heading-3-alt-spacing {
    padding-bottom: 1rem; /* 16px */
  }
}

.heading-4-spacing {
  padding-bottom: 1.5rem; /* 24px */
}
@media (min-width: 1024px) {
  .heading-4-spacing {
    padding-bottom: 1rem; /* 16px */
  }
}

.heading-5-spacing {
  padding-bottom: 0.5rem; /* 8px */
}
@media (min-width: 1024px) {
  .heading-5-spacing {
    padding-bottom: 0.5rem; /* 8px */
  }
}

.heading-6-spacing {
  padding-bottom: 0.5rem; /* 8px */
}
@media (min-width: 768px) {
  .heading-6-spacing {
    padding-bottom: 0.5rem; /* 8px */
  }
}


/* Clickable Eyebrow */
a.eyebrow {
  color: #696969;
}
a.eyebrow:hover {
  text-decoration: underline;
}

.ajax-progress-throbber .throbber {
  padding-right: 6px;
  background-image: url("/themes/custom/lyndon/assets/images/urban-throbber.gif");
}

/* Author profile image initials */
.user-initials {
  background-color: #1696D2;
  width: 10rem;
  height: 10rem;
  overflow: hidden;
  padding: 2.5rem 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  text-align: center;

}
.user-initials > a {
  color: #FFF;
  font-size: 2.5rem;
  font-weight: 300;
}

.user-initials > a:hover {
  text-decoration: none;
}

nav.gin-breadcrumb li {
  display: block;
  line-height: 1.15rem;
  margin-left: 0;
  margin-bottom: 0;
}

.block--color-box {
  height: 100%;
}

.block--color-box-paragraphs p {
  color: #fff;
}

.color-box-full-height {
  height: 100%;
}

.utility-menu-child-links,
.menu-child-links {
  list-style: none !important;

  li {
    break-inside: avoid;
    margin-bottom: 0.5rem;
  }

  &.-mobile {
    background-color: #F5F5F5;
    padding: 1rem;
    margin-top: .5rem;
  }
}

.utility-menu-dropdown {
  background-color: white;
  padding: 1rem;
  min-width: 240px;
  width: fit-content;
  box-shadow: 0px 8px 24px 0px rgba(0, 0, 0, 0.10);
  border: 1px solid #e3e3e3;
  z-index: 1;
}

.menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  background-color: white;
  text-align: left;
  width: 100%;
  padding: 2.5rem;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  border: 1px solid #e3e3e3;
  opacity: 0;
  transition: .1s ease-in-out;
  pointer-events: none;
  visibility: hidden;

  &[aria-hidden='false'] {
    pointer-events: all;
    visibility: visible;
    opacity: 1;
  }

  p {
    font-weight: 700;
    margin-bottom: 1.25rem;
  }
}

.tags {
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  border-top: 1px solid #d2d2d2;

  .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
  }

  .tag-title {
    text-transform: uppercase;
    margin-bottom: 0.75rem;
  }
}

lbj-header[sticky] {
  .utility-links {
    display: none;
  }
}

.utility-menu-item {
  position: relative;
}

.mobile-menu-description {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.mobile-links {

  lbj-list {
    li:last-child {
      margin-bottom: 2rem;
    }
  }
}

lbj-link[variant='sub-nav-secondary'] {
  position: relative;
  border-bottom: 1px solid #d2d2d2;

  &::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 2px;
    background-color: #fdbf11;
    transition: .5s ease-in-out;
  }

  &:hover {
    &::before {
      width: 100%;
    }
  }
}

.mobile-utility-buttons {
  display: flex;
  max-width: 400px;
  margin-top: 1rem;
}

.mobile-utility-links {
  margin-top: 1.5rem;
}

#searchbox {
  display: flex;
}

.form-item-site-search {
  flex: 1;

  input[type="search"] {
    border-radius: 0;
  }
}

input[type="submit"] {
  cursor: pointer;
  height: 100%;
}

.special-utility-link {
  border-left: 1px solid #d2d2d2;
  padding-left: 1.25rem;
}


/*Override css forlayout_builder_tabs*/
.tabs-region .tabs__tab {
  display: inline-block;
}
.tabs-region .tabs a {
  color: inherit;
  text-decoration: none;
}

/* Homepage Hero Overwrites */
lbj-homepage-hero lbj-card[variant="research"]:not(:last-child ) {
  border-bottom: 1px solid #adabac;
}

@media screen and (min-width: 765px) {
  lbj-homepage-hero lbj-card[variant="research"]:not(:last-child ) {
    border-bottom: none;
  }
}
.pager__item a[state="active"] {
  color: var(--primary-b-900);
  border: 1px solid var(--primary-b-300);
  padding: 4px 8px;
}

/* Ensures that the font size of the <p> tag within media rendered in the default view mode
inherits the font size of its closest parent element. This allows the <p> tag to match the
font size defined by the "caption" class, specifically for media attribution fields. */
.default-media-attribution div p {
  font-size: inherit;
}

lbj-media-wrapper div[slot="notes"] p, lbj-media-wrapper div[slot="sources"] p {
  font-size: inherit
}

/* Ensure any text within the lbj-term-detail-hero-body is white
@see taxonomy-term--hero.html.twig */
.lbj-term-detail-hero-body * {
  color: #fff;
}

/* Ensure links within the lbj-term-detail-hero-body are white and underlined */
.lbj-term-detail-hero-body a {
  text-decoration: underline;
}

/* Remove underline on hover for links within the lbj-term-detail-hero-body */
.lbj-term-detail-hero-body a:hover {
  text-decoration: none;
}

/* Style override for Outside Affiliations view
@see urban.org/outside-affiliations-list
@see /admin/structure/views/view/outside_affiliations_list
*/
.view-outside-affliations td, th {
  text-align: left;
}

.view-outside-affliations #edit-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Style override for lbj-title vertical stripe variant.
   Adding margin-left will offset the stripe from the edge of the container
 */
lbj-title[vertical_stripe] {
  margin-left: 25px;
}

/* Set the margin top of action buttons to 0. @see urban.org/urban-ground */
#views-exposed-form-latest-research-list-geo-filtered-content-block {
  [data-drupal-selector="edit-actions"] > div {
    margin-top: 0;
  }
}
