/* -----------------------------------------------
  LOGO GRID

  The partner and sponsor logo tiles, and the
  Bootstrap popover that opens when a tile is
  clicked.
------------------------------------------------ */

.logo-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 140px;
  border: 0;
  border-radius: 1rem;
  outline: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.logo-tile:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.35);
}

/* Every logo gets the same height box, so the labels line up */
.logo-tile-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 80px;
  margin-bottom: 0.35rem;
}

.logo-tile-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.logo-tile:hover .logo-tile-image,
.logo-tile:focus .logo-tile-image {
  transform: scale(1.03);
}

.logo-tile-label {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  line-height: 1.2;
}

/* -----------------------------------------------
  POPOVER

  Colored through Bootstrap's popover variables.
------------------------------------------------ */

.logo-popover {
  --bs-popover-max-width: 320px;
  --bs-popover-bg: var(--rbm-white);
  --bs-popover-border-color: transparent;
  --bs-popover-border-radius: 1rem;
  --bs-popover-body-color: var(--rbm-black);
  --bs-popover-body-padding-x: 1rem;
  --bs-popover-body-padding-y: 0.85rem;

  /* Bootstrap resets popovers to its own font, so this switches it back */
  font-family: var(--rbm-font-body);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.logo-popover-title {
  margin-bottom: 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.logo-popover-description {
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.logo-popover-link {
  text-decoration: none;
}

.logo-popover-link:hover,
.logo-popover-link:focus {
  text-decoration: underline;
}
