/* ============================================================
   recruiter-bios.css - "View Bio" buttons and bio lightbox on
   talk-to-a-recruiter.html. Namespaced with .bio-* so nothing
   collides with the Webflow stylesheets.
   Figma: 26-0904 LMPD Bios for Talk to a Recruit
   ============================================================ */

:root {
  --bio-navy: #021b43;
  --bio-indigo: #6d2ed7;
  --bio-image-border: #5340ca;
  --bio-overlay: rgba(18, 20, 25, 0.8);
  --bio-text: #fff;
}

/* ---------- Card button ---------- */
/* Reuses .button.is-alternate; only sizing is adjusted to the design */
.button.is-alternate.bio-open {
  align-self: center;
  margin-top: 1rem; /* title's mb-8 + 16px = 24px gap in the design */
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.5;
  cursor: pointer;
}

.button.is-alternate.bio-open {
  white-space: nowrap;
}

/* Webflow's 2-column 1fr tracks can't shrink below the longest name, which
   left the columns uneven; minmax(0, 1fr) keeps them equal. Below 560px two
   columns get cramped, so drop to one column (as in the Figma mobile cards). */
@media screen and (max-width: 991px) {
  .grid-3-col.bio-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 559px) {
  .grid-3-col.bio-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Dialog shell ---------- */
/* The dialog itself is transparent and unpadded so a click whose target
   is the dialog element can only have landed on the backdrop. */
.bio-dialog {
  width: min(1035px, calc(100% - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bio-text);
  overflow: visible;
}

.bio-dialog::backdrop {
  background: var(--bio-overlay);
  -webkit-backdrop-filter: blur(9.3px);
  backdrop-filter: blur(9.3px);
}

html.bio-scroll-lock {
  overflow: hidden;
}

.bio-dialog__panel {
  position: relative;
  box-sizing: border-box;
  min-height: 431px;
  max-height: calc(100dvh - 48px);
  padding: 38px 41px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  background: var(--bio-navy);
  border: 1px solid var(--bio-indigo);
  border-radius: 8px;
}

/* ---------- Slides ---------- */
.bio-slide {
  display: flex;
  align-items: stretch;
  gap: 51px;
  width: 100%;
}

.bio-slide[hidden] {
  display: none;
}

.bio-slide__media {
  flex: 0 0 357px;
  height: 354px;
  box-sizing: border-box;
  border: 0.544px solid var(--bio-image-border);
  border-radius: 2.177px;
  overflow: hidden;
}

.bio-slide__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-slide__body {
  flex: 0 1 544px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.bio-slide__name {
  margin: 0;
  font-family: var(--font-family--button);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--bio-text);
}

.bio-slide__text {
  margin: 0;
  font-family: var(--font-family--text);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bio-text);
}

/* ---------- Controls ---------- */
.bio-dialog__close,
.bio-dialog__arrow,
.bio-dialog__dot {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.bio-dialog__close:focus-visible,
.bio-dialog__arrow:focus-visible,
.bio-dialog__dot:focus-visible {
  outline: 2px solid #e9fb43;
  outline-offset: 2px;
}

.bio-dialog__close {
  position: absolute;
  top: 9px;
  right: 7px;
  z-index: 1;
  display: flex;
}

.bio-dialog__close img {
  display: block;
}

.bio-dialog__close-mobile {
  display: none !important;
}

.bio-dialog__nav {
  position: absolute;
  right: 15px;
  bottom: 16px;
  display: flex;
  gap: 6px;
}

/* 30px arrows padded to a 44px hit area; 6px + 2 x 7px = the 20px gap in the design */
.bio-dialog__arrow {
  display: flex;
  padding: 7px;
  transition: opacity .2s;
}

.bio-dialog__arrow img {
  display: block;
}

/* One white arrow asset, mirrored for prev */
.bio-dialog__arrow--prev img {
  transform: scaleX(-1);
}

.bio-dialog__arrow:hover {
  opacity: .75;
}

/* No slide in that direction: grayed out at the design's 40% */
.bio-dialog__arrow[aria-disabled="true"] {
  opacity: .4;
  cursor: default;
}

.bio-dialog__dots {
  display: none;
}

/* ---------- Tablet ---------- */
/* Between the 1035px design and the mobile layout: shrink the photo and
   pad the panel so the name clears the close icon and the text clears the arrows */
@media screen and (max-width: 1100px) {
  .bio-dialog__panel {
    padding: 60px 48px 72px;
  }

  .bio-slide {
    gap: 32px;
  }

  .bio-slide__media {
    flex: 0 1 357px;
    align-self: flex-start;
    height: auto;
    aspect-ratio: 357 / 354;
  }
}

/* ---------- Mobile ---------- */
@media screen and (max-width: 767px) {
  .bio-dialog {
    width: calc(100% - 40px);
    max-height: calc(100dvh - 40px);
  }

  .bio-dialog__panel {
    display: block;
    min-height: 0;
    max-height: calc(100dvh - 40px);
    padding: 24px;
    border-width: 2px;
    box-shadow:
      0 17px 37px rgba(0, 0, 0, .2),
      0 67px 67px rgba(0, 0, 0, .17),
      0 150px 90px rgba(0, 0, 0, .1),
      0 267px 107px rgba(0, 0, 0, .03);
  }

  /* Swipe carousel: the current slide follows the finger and the neighbor
     rides alongside it; pan-y leaves vertical scrolling to the browser */
  .bio-dialog__slides {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
  }

  .bio-slide {
    flex-direction: column;
    gap: 20px;
    padding-top: 39.74px; /* close icon (20.74px) + 19px gap */
  }

  .bio-slide.is-peek {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
  }

  .bio-slide__media img {
    -webkit-user-drag: none;
  }

  .bio-slide__media {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 287 / 286;
  }

  .bio-slide__body {
    flex: none;
  }

  .bio-slide__name {
    font-size: 18px;
  }

  .bio-slide__text {
    font-size: 16px;
  }

  .bio-dialog__close {
    top: 14px;
    right: 14px;
    padding: 10px; /* 20.74px icon padded to a 40px hit area */
  }

  .bio-dialog__close-desktop {
    display: none !important;
  }

  .bio-dialog__close-mobile {
    display: block !important;
  }

  .bio-dialog__nav {
    display: none;
  }

  .bio-dialog__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
  }

  .bio-dialog__dot {
    display: flex;
  }

  .bio-dialog__dot img {
    display: block;
  }

  .bio-dialog__dot .bio-dot-active,
  .bio-dialog__dot[aria-current="true"] .bio-dot-idle {
    display: none;
  }

  .bio-dialog__dot[aria-current="true"] .bio-dot-active {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bio-dialog__arrow {
    transition: none;
  }
}
