/* Visual resize preset browser and YouTube banner composer. */

.resize-preset-browser {
  display: grid;
  gap: 1rem;
  margin-bottom: .9rem;
}

.resize-preset-browser__intro,
.resize-preset-group__heading,
.resize-preset-composer__copy,
.resize-custom-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.resize-preset-browser h5,
.resize-preset-group h5,
.resize-preset-composer h5,
.resize-custom-heading h5 {
  margin: .15rem 0 0;
  color: #fff;
  font-size: .95rem;
}

.resize-preset-browser__intro {
  padding-bottom: .75rem;
  border-bottom: 1px solid rgba(111, 155, 255, .14);
}

.resize-custom-link {
  padding: .35rem 0;
  border: 0;
  background: transparent;
  color: #7bf9c8;
  font: inherit;
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
}

.resize-custom-link:hover,
.resize-custom-link:focus-visible {
  color: #fff;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resize-preset-group {
  display: grid;
  gap: .65rem;
}

.resize-preset-group__heading span,
.resize-custom-heading span {
  color: #8f9dbc;
  font-size: .7rem;
}

.resize-preset-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
}

.resize-preset-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  min-width: 0;
  min-height: 88px;
  padding: .65rem;
  border: 1px solid rgba(111, 155, 255, .16);
  border-radius: 12px;
  background: rgba(12, 21, 49, .54);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.resize-preset-card:hover,
.resize-preset-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(123, 249, 200, .55);
  background: rgba(21, 39, 76, .62);
  outline: none;
}

.resize-preset-card.is-selected {
  border-color: #7bf9c8;
  background: rgba(123, 249, 200, .08);
  box-shadow: inset 0 -3px 0 #7bf9c8;
}

.resize-preset-card.is-featured {
  border-color: rgba(143, 127, 255, .36);
}

.resize-preset-card.is-featured.is-selected {
  border-color: #7bf9c8;
}

.resize-preset-card__copy {
  display: grid;
  min-width: 0;
  gap: .1rem;
}

.resize-preset-card__copy strong {
  overflow: hidden;
  color: #fff;
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resize-preset-card__copy small {
  color: #7bf9c8;
  font-size: .66rem;
  font-variant-numeric: tabular-nums;
}

.resize-preset-card__copy em {
  overflow: hidden;
  color: #9eabc9;
  font-size: .62rem;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resize-preset-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 54px;
  overflow: hidden;
  color: #7bf9c8;
}

.resize-preset-visual__glow {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: rgba(79, 140, 255, .18);
  filter: blur(10px);
}

.resize-preset-visual i,
.resize-preset-visual b {
  position: relative;
  z-index: 1;
  display: block;
  border: 2px solid currentColor;
  background: rgba(123, 249, 200, .06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}

.resize-preset-visual b {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #dbe4ff;
  font-size: .55rem;
  font-weight: 800;
}

.resize-preset-visual.is-phone i {
  width: 22px;
  height: 42px;
  border-radius: 6px;
}

.resize-preset-visual.is-phone i::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 5px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
}

.resize-preset-visual.is-portrait i {
  width: 28px;
  height: 38px;
  border-radius: 4px;
}

.resize-preset-visual.is-square i {
  width: 35px;
  height: 35px;
  border-radius: 5px;
}

.resize-preset-visual.is-banner i,
.resize-preset-visual.is-web i {
  width: 54px;
  height: 24px;
  border-radius: 4px;
}

.resize-preset-visual.is-banner i.safe {
  position: absolute;
  width: 32px;
  height: 8px;
  border: 1px dashed #fff;
  background: rgba(255,255,255,.08);
}

.resize-preset-visual.is-web i {
  height: 18px;
}

.resize-preset-visual.is-desktop i {
  width: 46px;
  height: 28px;
  border-radius: 4px;
}

.resize-preset-visual.is-desktop b {
  position: absolute;
  bottom: 5px;
  width: 24px;
  height: 2px;
  background: currentColor;
}

.resize-preset-visual.is-desktop b::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: 7px;
  background: currentColor;
  transform: translateX(-50%);
}

.resize-preset-visual.is-thumbnail i,
.resize-preset-visual.is-video i {
  width: 50px;
  height: 28px;
  border-radius: 5px;
}

.resize-preset-visual.is-thumbnail b,
.resize-preset-visual.is-video b {
  position: absolute;
}

.resize-preset-composer {
  display: grid;
  gap: .85rem;
  padding: .9rem;
  border: 1px solid rgba(123, 249, 200, .2);
  border-radius: 14px;
  background: rgba(6, 12, 29, .72);
}

.resize-preset-composer.hidden,
.resize-banner-guide.hidden,
.resize-banner-position.hidden {
  display: none !important;
}

.resize-preset-composer__copy p:last-child {
  margin: .28rem 0 0;
  color: #9eabc9;
  font-size: .72rem;
}

.resize-preset-composer__copy > strong {
  color: #7bf9c8;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.resize-preset-controls,
.resize-banner-position {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
}

.resize-preset-controls label,
.resize-banner-position label {
  display: grid;
  gap: .38rem;
  color: #dfe7fb;
  font-size: .72rem;
  font-weight: 750;
}

.resize-preset-controls select {
  width: 100%;
  min-height: 42px;
  padding: .58rem .65rem;
  border: 1px solid rgba(111, 155, 255, .2);
  border-radius: 9px;
  background: rgba(14, 24, 55, .94);
  color: #fff;
  font: inherit;
}

.resize-banner-position {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resize-banner-position output {
  justify-self: end;
  color: #7bf9c8;
  font-size: .67rem;
}

.resize-banner-position input[type="range"] {
  width: 100%;
}

.resize-banner-guide {
  display: grid;
  gap: .55rem;
}

.resize-banner-guide__canvas {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(111, 155, 255, .24);
  border-radius: 10px;
  background: #040817;
  box-shadow: inset 0 0 30px rgba(0,0,0,.28);
}

.resize-banner-guide__image {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  transform-origin: center;
  transition: transform .12s ease, background-position .12s ease, background-size .12s ease;
}

.resize-banner-guide__shade {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  height: 35.33%;
  background: rgba(2, 5, 15, .58);
  pointer-events: none;
}

.resize-banner-guide__shade.is-top { top: 0; }
.resize-banner-guide__shade.is-bottom { bottom: 0; }

.resize-banner-guide__safe {
  position: absolute;
  z-index: 2;
  left: 19.85%;
  top: 35.33%;
  width: 60.3%;
  height: 29.34%;
  display: grid;
  place-content: center;
  padding: .35rem;
  border: 2px dashed #7bf9c8;
  background: rgba(123, 249, 200, .07);
  color: #fff;
  text-align: center;
  pointer-events: none;
}

.resize-banner-guide__safe strong {
  font-size: clamp(.65rem, 1.4vw, .9rem);
}

.resize-banner-guide__safe small {
  color: #d8fff1;
  font-size: clamp(.48rem, 1vw, .65rem);
}

.resize-banner-guide__canvas-label {
  position: absolute;
  z-index: 3;
  right: .45rem;
  bottom: .38rem;
  padding: .2rem .38rem;
  border-radius: 999px;
  background: rgba(2, 5, 15, .72);
  color: #dbe4ff;
  font-size: .55rem;
  pointer-events: none;
}

.resize-banner-guide__note {
  margin: 0;
  color: #a8b4d1;
  font-size: .7rem;
  line-height: 1.45;
}

.resize-custom-heading {
  margin-top: .1rem;
  padding-top: .85rem;
  border-top: 1px solid rgba(111, 155, 255, .14);
}

@media (max-width: 1050px) {
  .resize-preset-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .resize-preset-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resize-preset-controls,
  .resize-banner-position {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .resize-preset-browser__intro,
  .resize-preset-group__heading,
  .resize-preset-composer__copy,
  .resize-custom-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: .25rem;
  }

  .resize-preset-gallery {
    display: flex;
    margin-right: -.85rem;
    padding-right: .85rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .resize-preset-card {
    flex: 0 0 225px;
    scroll-snap-align: start;
  }

  .resize-preset-card__copy strong,
  .resize-preset-card__copy em {
    white-space: normal;
  }

  .resize-banner-guide__safe small {
    display: none;
  }
}

@media (max-width: 390px) {
  .resize-preset-card {
    flex-basis: 205px;
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .resize-preset-visual {
    width: 50px;
  }
}
