/* =========================================================
   TikTok Section
   ========================================================= */

.tiktok{
  padding-bottom: 96px;
}


/* =========================================================
   Grid
   ========================================================= */

.tiktok-row{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 18px;
}


/* =========================================================
   Card
   ========================================================= */

.tiktok-card{
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(141,197,227,.14);
  backdrop-filter: blur(6px);
}


/* =========================================================
   Thumbnail
   ========================================================= */

.tiktok-thumb{
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 30% 20%, rgba(255,174,238,.25), rgba(255,174,238,0) 60%),
    radial-gradient(600px 300px at 70% 25%, rgba(249,197,67,.18), rgba(249,197,67,0) 62%),
    linear-gradient(180deg, rgba(141,197,227,.12), rgba(255,255,255,0));
}

.tiktok-thumb img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  filter: saturate(1.05) contrast(1.03);
}


/* =========================================================
   Thumb Overlay
   ========================================================= */

.tiktok-thumb::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at left top,
      rgba(37,244,238,.55) 0%,
      rgba(37,244,238,.30) 5%,
      transparent 65%
    ),
    radial-gradient(
      circle at right bottom,
      rgba(254,44,85,.55) 0%,
      rgba(254,44,85,.30) 5%,
      transparent 55%
    ),
    rgba(0,0,0,.48);
  pointer-events: none;
  transition: opacity .25s ease;
  opacity: 1;
}


/* =========================================================
   Play Button
   ========================================================= */

.tiktok-play{
  position: absolute;
  inset: 0;
  margin: auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: calc(14px * var(--official-font-scale, 1));
  color: #fff;
  background: #111;
  box-shadow:
    -4px 0 0 #25F4EE,
     4px 0 0 #FE2C55,
     0 8px 18px rgba(0,0,0,.35);
  z-index: 99;
  transition: transform .18s ease, box-shadow .25s ease;
}


/* =========================================================
   Caption
   ========================================================= */

.tiktok-cap{
  padding: 10px 10px 12px;
  text-align: center;
}

.tiktok-name{
  font-size: calc(11px * var(--official-font-scale, 1));
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
}


/* =========================================================
   Hover
   ========================================================= */

@media (hover:hover){

  .tiktok-play:hover{
    transform: scale(1.12);
    box-shadow:
      -6px 0 0 #25F4EE,
       6px 0 0 #FE2C55,
       0 10px 24px rgba(0,0,0,.45);
  }

  .tiktok-card{
    transition: transform .2s ease, box-shadow .2s ease;
  }

  .tiktok-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(141,197,227,.18);
  }

  .tiktok-card:hover .tiktok-thumb::after{
    opacity: .55;
  }
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 767px){

  .tiktok-row{
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 0 auto;
    width: min(96%, 2400px);
  }

}

@media (max-width: 767px){

  .tiktok-row{
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    width: min(96%, 960px);
  }

}


/* =========================================================
   Modal
   ========================================================= */

.tk-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.tk-modal.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}


/* =========================================================
   Overlay
   ========================================================= */

.tk-overlay{
  position: absolute;
  inset: 0;
  background: rgba(10,18,24,.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .22s ease;
}

.tk-modal.is-open .tk-overlay{
  opacity: 1;
}


/* =========================================================
   Panel
   ========================================================= */

.tk-panel{
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100vw, 460px);
  height: 100vh;
  height: 100dvh;
  transform: translate(-50%, -48%) scale(.985);
  opacity: 0;
  transition: transform .28s cubic-bezier(.2,.9,.2,1.12), opacity .22s ease;

  display: flex;
  flex-direction: column;
  overflow: hidden;

  background-color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
}

.tk-modal.is-open .tk-panel{
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}


/* =========================================================
   Actions
   ========================================================= */

.tk-actions{
  flex: 0 0 auto;
  justify-content: center;
  width: 100%;
  display: block;
  padding: 14px 12px 18px;
  position: fixed;
  bottom: 10px;
  left: 0;
}

.tk-open,
.tk-profile{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: #fff;
  background: #000 !important;
  border: 1px solid rgba(255,255,255,.7);
  text-decoration: none;
  font-size: calc(12px * var(--official-font-scale, 1));
  letter-spacing: .08em;
  box-shadow:
    -4px 0 0 #25F4EE,
     4px 0 0 #FE2C55,
     0 8px 18px rgba(0,0,0,.35);
}

@media (max-width: 767px){

   .tk-inner{
      overflow:hidden;
   }

   .tk-inner blockquote.tiktok-embed{
   transform: scale(1.08);
   transform-origin: top center;
   }

  .tk-actions{
    display: block;
    position: static;
    width: 100%;
    padding: 14px 8% 18px;
    margin-top: 10px;
  }

  .tk-open,
  .tk-profile{
    display: flex;
    width: 100%;
    height: 32px !important;
    line-height: 32px !important;
    padding: 6px 0 !important;
    font-size: calc(11px * var(--official-font-scale, 1));
    letter-spacing: .06em;
    gap: 0;
  }

  .tk-open + .tk-profile{
    margin-top: 10px;
  }

}


/* =========================================================
   Close
   ========================================================= */

.tk-close{
  position: absolute;
  right: 10px;
  top: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.9);
  cursor: pointer;
  font-size: calc(18px * var(--official-font-scale, 1));
  line-height: 1;
  z-index: 2;
}

@media (max-width: 767px){
  /* close */
  .tk-close{
    right: 0;
    top: 50%;
    transform: translateY(-50%);

    border-radius: 0;
  }
}

/* =========================================================
   Embed
   ========================================================= */

.tk-inner{
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 56px 10px 18px;
}

.tk-inner blockquote.tiktok-embed{
  margin: 0 !important;
  width: 100% !important;
  max-width: 440px !important;
}

@media (max-width: 640px){

  .tk-inner{
    padding: 56px 8px 16px;
  }

  .tk-inner blockquote.tiktok-embed{
    max-width: 360px !important;
  }

}

@media (max-width: 767px){

  .tk-inner{
    padding: 56px 8px 80px;
  }

}


/* =========================================================
   Profile Section
   ========================================================= */

.profile_tk{
  margin: 0 auto 60px;
  padding-bottom: 96px;
}

@media (min-width: 768px){

  .profile_tk{
    padding-right: 5%;
    padding-left: 5%;
  }

}

.profile_tk .ig-row a{
  position: relative;
  display: block;
  overflow: hidden;
}