.ag-popup-container{
  --_padding: 2rem;
  position: relative;

  width: 350px;
  margin-inline: auto;
  padding: var(--_padding);
  
  border: 1px solid white;
  border-radius: 16px;
}


.ag-popup-icon-container{
  width: 83px;
  margin-inline: auto;
}

.ag-popup-heading{
  font-size: var(--font-xl);
  font-weight: var(--font-bold);
}

.ag-popup-container .ag-btn{
  position: relative;
  width: 100%;
  text-align: center;
  font-weight: var(--font-bold) !important;

  border: 2px solid white;
  box-sizing: border-box;
}

.mfp-close-btn-in .mfp-close{
  --_size: 64px;
  width: var(--_size);
  height: var(--_size);
  color: transparent;
  background-image: url(../assets/images/close-white.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 35%;
  opacity: 1;
}

#popup--invalid-email {
  text-align: center;
}

#popup--invalid-email .ag-popup-container{
  background-color: white;
}

#popup--polling .ag-popup-container{
  height: 400px;
  background-image: url(../assets/images/banner.jpg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

#popup--polling .ag-popup-content{
  position: absolute;
  left: 0;
  bottom: 0;

  display: flex;
  flex-direction: column;
  gap: .8rem;

  width: 100%;
  padding: 0 var(--_padding) var(--_padding);
  background-image: 
    linear-gradient(
      to top, 
      rgba(0,0,0,.75) 60%, 
      transparent);
  color: white;
  border-radius: inherit;
}

#popup--polling .ag-btn--go-polling{
  margin-top: 1.6rem;
  border: none;
}

#popup--polling .ag-btn--go-polling .ag-btn-icon-container{
  position: absolute;
}

#popup--polling .ag-btn--go-polling .ag-btn-icon-container img{
  height: auto;
  object-fit: contain;
}

#popup--polling .ag-btn--go-polling .ag-btn-icon-polling{
  left: 1rem;
  bottom: -5px;
}

#popup--polling .ag-btn--go-polling .ag-btn-icon-finger{
  right: 1.4rem;
  bottom: 0;
  transform: translate(0, 30%);
}

#popup--polling .ag-btn--go-polling .ag-btn-icon-polling img{
  width: 7rem;
}

#popup--polling .ag-btn--go-polling .ag-btn-icon-finger img{
  width: 4.8rem;
}

@media only screen and (min-width: 961px) {
  .mfp-close-btn-in .mfp-close{
    --_offset: 1rem;
    top: var(--_offset);
    right: var(--_offset);
  }
  
  .ag-popup-container{
    --_padding: 3rem;
  }

  .ag-popup-heading{
    font-size: var(--font-4xl);
  }

  #popup--polling .ag-popup-container{
    width: 770px;
    height: 550px;
  }

  #popup--polling .ag-popup-heading br{
    display: none;
  }

  #popup--polling .ag-popup-content{
    padding-top: 6rem;
    background-image: 
    linear-gradient(
      to top, 
      rgba(0,0,0,.75) 30%, 
      transparent);
  }

  #popup--polling .ag-btn--go-polling .ag-btn-icon-polling{
    bottom: auto;
  }
  
  #popup--polling .ag-btn--go-polling .ag-btn-icon-finger{
    transform: translate(0, 40%);
  }
  
  #popup--polling .ag-btn--go-polling .ag-btn-icon-polling img{
    width: 8rem;
  }
  
  #popup--polling .ag-btn--go-polling .ag-btn-icon-finger img{
    width: 6rem;
  }
}

#popup--post .ag-popup-container{
  border: none;
}

#popup--post:not([data-post-type="reel"]) .ag-popup-container{
  background-color: white;
  padding: 0;
  width: 49.6rem;
}

#popup--post[data-post-type="image"] .ag-popup-container,
#popup--post[data-post-type="video"] .ag-popup-container{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  
  width: 840px;
}

#popup--post[data-post-type="reel"] .ag-popup-container{
  width: 45.6rem;
  aspect-ratio: 456/756;
}

.ag-popup--assets-container{
  position: relative;
  border-top-left-radius: inherit;
  border-bottom-left-radius: inherit;
  overflow: hidden;
}

#popup--post .ag-post-main-video-container{
  height: 100%;
  aspect-ratio: unset;
  background: #000;
}

.ag-popup--assets-container .ag-post-icon-container{
  position: absolute;
  top: 3.4rem;
  right: 3rem;
  width: 3.4rem;
}

.ag-popup--assets-container img, 
.ag-popup--assets-container video{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#popup--post .ag-popup-content{
  padding: 3.8rem;
}

#popup--post .ag-post-content-header{
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

#popup--post .ag-post-content-header .ag-post-like-container{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

#popup--post:not([data-post-type="reel"]) .ag-post-content{
  display: flex;
  flex-direction: column;
  height: 100%;
}

#popup--post .ag-post-content-header{
  margin-bottom: 1.4rem;
}

#popup--post .ag-post-content-body{
  margin-bottom: 2.4rem;
}

#popup--post .ag-post-content-body > * + *{
  margin-top: 2rem;
}
#popup--post .ag-post-content-body > .ag-post-title{
  margin-top: 0;
}

#popup--post .ag-post-content-body .ag-post-title{
  font-size: 2.4rem;
  font-weight: var(--font-bold);
  color: var(--color-primary);
}
#popup--post .ag-post-content-body .ag-post-title .ag-post-open-text{
  font-size: 80%;
  color:#adb1b5;
  cursor: pointer;
}

#popup--post .ag-post-content-body .ag-post-text{
  max-height: 180px;
  overflow-y: auto;
}

#popup--post .ag-post-tags{
}

#popup--post .ag-post-tags li{
  display: inline-block;
  white-space: nowrap;
  cursor: pointer;
}

#popup--post .ag-post-content > .ag-post-btns{
  margin-top: auto;
}

#popup--post:not([data-post-type="reel"]) .ag-post-content > .ag-post-btns > * + *{
  margin-top: 1.2rem;
}

@media only screen and (min-width: 961px) {
  #popup--post .mfp-close{
    --_size: 56px;
    --_offset: 0;
    transform: translate(calc(100% + 1rem), 0);
    background-image: 
      url(../assets/images/close-white.svg),
      linear-gradient(
        to bottom, 
        #951E6F, 
        #D7006B, 
        #EC7A4C);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 35%, 100%;
    border-radius: 50%;
  }
}

#popup--post .ag-post-video-bg-container{
  overflow: hidden;
  border-radius: 16px;
}

#popup--post .ag-post-video-bg-container video{
  width: 100%;
  height: 100%;
  object-fit: cover;
}


#popup--post[data-post-type="reel"] .ag-post-content{
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 2.8rem 3.2rem;
  background-image: linear-gradient(to top, rgba(0,0,0,1), transparent);
  color: white;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  font-size:14px;
  display: flex;
  flex-direction: row;
  gap: 10px;
}
#popup--post[data-post-type="reel"] .ag-post-content-left{
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: end;
}
#popup--post[data-post-type="reel"] .ag-post-content-right{
  flex-shrink: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 10px;
}
#popup--post[data-post-type="reel"] .ag-post-content-header,
#popup--post[data-post-type="reel"] .ag-post-content-body {
  margin-bottom: 0.4rem;
}

#popup--post[data-post-type="reel"] .ag-post-content-body > * + *{
  margin-top: 0.4rem;
}

#popup--post[data-post-type="reel"] .ag-popup-container .ag-btn{
  border:0;
  font-weight: normal !important;
}

#popup--post[data-post-type="reel"]  .ag-post-content-body .ag-post-title{
  color: white;
  font-size:16px;
}

#popup--post[data-post-type="reel"]  .ag-post-content-body .ag-post-text{
  max-height: 45vh;
}

#popup--post[data-post-type="reel"]  .ag-post-content-body .ag-post-text{
  display: none;
}
#popup--post[data-post-type="reel"]  .ag-post-content-body[data-state="show"] .ag-post-text{
  display: block;
}
#popup--post[data-post-type="reel"]  .ag-post-content-body[data-state="show"] .ag-post-title .ag-post-open-text{
  display: none;
}
#popup--post[data-post-type="reel"]  .ag-post-like-container{
  display: inline-block;
  text-align: center;
}
#popup--post[data-post-type="reel"]  .ag-more-video{
  display: inline-block;
  text-align: center;
}
#popup--post[data-post-type="reel"]  .ag-more-video img{
  width: 27px;
  margin: 0 auto;
  object-fit: none;
  height: auto;
}

#popup--post[data-post-type="reel"] .ag-post-content > .ag-post-btns {
  display: flex;
  align-items: center;
  gap: 1rem;
}
