$arrow-size: rem(14px);
$visible-portion-of-arrow: rem(5px);
$content-max-height: rem(295px);
$content-max-width: rem(400px);

.p_xn {
  max-width: calc(100vw - #{2 * spacing()});
  margin: $visible-portion-of-arrow spacing(tight) spacing();
  opacity: 1;
  box-shadow: shadow(deep);
  border-radius: border-radius();
  will-change: opacity, left, top;
}

.p_gx {
  margin: 0;
  margin-top: $visible-portion-of-arrow;

  .p_mx {
    max-width: none;
  }
}

.p_xq:not(.p_qz),
.p_qz {
  opacity: 0;
}

.p_xq {
  .p_mx {
    display: block;
  }
}

.p_qz {
  transition-timing-function: easing(out);
}

.p_q1 {
  margin: spacing() spacing() $visible-portion-of-arrow;

  &.p_gx {
    margin: 0 0 $visible-portion-of-arrow;
  }

  .p_k2 {
    top: inherit;
    bottom: 0;
    border-top-left-radius: 0;
    border-bottom-right-radius: border-radius();
  }
}

.p_yj {
  position: relative;
  overflow: hidden;
  background-color: color('white');
  border-radius: border-radius(large);
}

.p_mx {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: border-radius(large);
  max-width: $content-max-width;
  max-height: $content-max-height;

  &:focus {
    outline: none;
  }
}

.p_os {
  max-height: none;
}

.p_k2 {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  height: $arrow-size;
  width: $arrow-size;
  background: color('white');
  border-top-left-radius: border-radius();
  box-shadow: shadow(deep);
}

.p_jl {
  flex: 1 1 0%;
  max-width: 100%;

  + .p_jl {
    border-top: border();
  }
}

.p_ec {
  overflow: visible;
  flex: 0 0 auto;
}

.p_m3 {
  padding: spacing();

  + .p_m3 {
    border-top: border();
  }
}

.p_cn {
  @include visually-hidden;
}
