@import '../../../styles/vars/breakpoints.css';

:global(.d-slide-colored) .personcard  {
  box-shadow: none;
  background-color: rgb(255,255,255,0.05)  !important;
}

.personcard {
  position: relative;
  width: 100%;
  height: 360px;
  max-width: var(--component-max-width);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  /* box-shadow: 0 6px 40px 0  rgba(#50cbe3, 0.4); */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;

  &.right {
    flex-direction: row-reverse;
  }
  
  @media (--ms-and-down) {
    height: auto;
    flex-direction: column;
    min-height: 0px;
  }
}

.autoheight {
  height: auto;
}

.content {
  position: relative;
  box-sizing: border-box;
  padding: 24px 30px;
  z-index: 1;
  color: inherit;
}

.photo {
  flex: 0 0 262px;
  width: 262px;
  height: 360px;
  /* float: left; */
  position: relative;
  /* margin-right: 30px; */
  border-radius: inherit;
  border-top-right-radius: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  

  @media (--ms-and-down) {
    margin: 0;
    border-top-right-radius: inherit;
    border-bottom-left-radius: 0;
  }

  .right & {
    /* float: right; */
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    /* margin-left: 30px;
    margin-right: 0; */

    @media (--ms-and-down) {
      border-top-left-radius: inherit;
      border-bottom-right-radius: 0;
      margin: 0;
    }

    .photomask {
      left: 0;
    }
  }

  @media (--ms-and-down) {
    width: 100%;
    height: auto;
    float: none;
  }
}

.greyBg,
.darkBg {
  color: #fff;
}

.editable.longcard {
  .title,
  .subtitle {
    margin-right: 0;
    margin-left: 260px;
    margin-right: 0;
  }
}
.editable.longcard.right {
  .title,
  .subtitle {
    margin-right: 0;
    margin-left: 0;
    margin-right: 260px;
  }
}

.longcard {
  display: block;
  flex-direction: unset;
  

  &::after {
    content: '';
    display: block;
    float: none;
    clear: both;
  }

  @media (--ms-and-down) {
    display: flex;
    flex-direction: column;
  }

  .photo {
    float: left;
    margin-right: 30px;
  }

  &.right .photo {
    float: right;
    margin-left: 30px;
    margin-right: 0;
  }

  .content {
    min-height: 360px;

    @media (--ms-and-down) {
      min-height: 0;
    }
  }

  /* &.is-expanded { */
    &:not(.transparentPhoto) {
      .photo {
        border-bottom-right-radius: inherit;
      }
    }

    &:not(.transparentPhoto).right .photo {
      border-bottom-right-radius: 0;
      border-bottom-left-radius: inherit;
    }
  /* } */
}

.bgimg {
  &::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    position: absolute;
    background-color: inherit;
    border-radius: inherit;
    opacity: 0.8;
  }
}

.photomask {
  overflow: hidden;

  &::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: inherit;
    opacity: 0.4;
  }
}

.photoimg {
  display: block;
  object-fit: cover;
  width: 100%;
}

.title {
  /* outline: 0; */
  /* text: bold 24px * 0.6px; */
  font-weight: 700;
  font-size: rem(24px);
  letter-spacing: .6px;
}

.subtitle {
  /* outline: 0; */
  /* text: 400 rem(15px) * 0.3px; */
  font-weight: 400;
  font-size: rem(15px);
  letter-spacing: .3px;
  opacity: 0.6;
  margin: 0.5em * 1em;
}

.text {
  /* text: 400 rem(16px) 2em * 0.4px; */
  font-weight: 400;
  font-size: rem(16px);
  line-height: 2em;
  letter-spacing: 0.4px;
  margin-top: 10px;
}

.shortText {
}

.btn {
  display: inline-block;
  position: relative;
  font-size: rem(15px);
  line-height: rem(30px);
  color: #1f1f1f;
  margin-top: 10px;
  border-bottom: 2px solid #8513e8;
  cursor: pointer;
  transition: all 0.2s ease-in;
  .greyBg & {
    color: #fff;
  }
  .darkBg & {
    color: #fff;
    &:after {
      background-color: #fff;
    }
  }
  &:hover {
    opacity: 0.8;
  }
}

.type {
  &--default {
    .photomask {
      position: relative;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: flex-end;
      border-radius: inherit;
      transition: border-radius 0.3s;

      @media (--ms-and-down) {
        border-radius: 0;
      }
    }
  }

  &--rounded {
    .photo {
      @media (--ms-and-down) {
        height: 290px;
      }
    }
    .photomask {
      position: absolute;
      top: 50%;
      right: 0;
      /* circle: 232px; */
      width: 232px;
      height: 232px;
      border-radius: 50%;
      margin-top: -116px;

      @media (--ms-and-down) {
        margin-top: 0;
        top: auto;
        bottom: 0;
        right: 50%;
        margin-right: -116px;
      }
    }
  }
}