%limited-wide {
  width: 100%;
  max-width: 1120px;
  margin: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

%grid-wrap {
  @extend .flexbox;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-left: -1rem;
  margin-right: -1rem;
}
%grid-2-item {
  width: 50%;
  padding: 1rem;
}
%grid-3-item {
  width: 33.33%;
  padding: 1rem;
}
%grid-3-margin-item {
  @extend %grid-3-item;
  width: calc(33.33% - 2rem);
  margin: 1rem;
}
%grid-4-item {
  width: 25%;
  padding: 1rem;
}

%underline-anim-1 {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat !important;
  background-position: left bottom 0.1em;
  background-size: 0 0.1em;
  text-decoration: none;
  -webkit-transition: background-size 0.5s, color 0.5s;
  transition: background-size 0.5s, color 0.5s;
  &:hover {
    color: currentColor;
    animation: underline 0.5s;
    background-size: 100% 0.1em;
    text-decoration: none !important;
    -webkit-transition: color 0.5s;
    transition: color 0.5s;
  }
}

%link-hover-bg {
  transition: background-color 0.5s;
  &:hover {
    background-color: var(--link-hover-bg);
  }
}

%msg-highlighted {
  position: fixed;
  top: 3rem;
  left: -100%;
  right: -100%;
  margin: 0 auto;
  width: calc(100% - 4rem);
  max-width: 60rem;
  max-height: calc(100vh - 4rem);
  border-radius: $radius;
  box-shadow: 0 28px 99px rgba(0,0,0,0.7);
  z-index: 10;
  overflow: auto;
  -webkit-animation: msg-on 0.5s;
  animation: msg-on 0.5s;
  .msg-close {
    display: inline-block;
  }
  &.close {
    margin-top: -100vh;
    visibility: hidden;
    -webkit-transition: all 0.5s;
    transition: all 0.5s;
    * {
      visibility: hidden;
    }
  }
}

%card-surface {
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden;
}

%pill {
  border-radius: 9999px;
}

%float-shadow {
  position: relative;
  -webkit-transform: translateY(0);
  transform: translateY(0);
  -webkit-transition: transform 0.5s;
  transition: transform 0.5s;
  &:before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 100%;
    left: 5%;
    width: 90%;
    height: 10px;
    opacity: 0;
    background: -webkit-radial-gradient(center, ellipse, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 80%);
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 80%);
    -webkit-transition: opacity 0.5s;
    transition: opacity 0.5s;
  }
  &:hover {
    -webkit-transform: translateY(-5px);
    transform: translateY(-5px);
    &:before {
      opacity: 1;
    }
  }
}
