/* Картка на 3/4 статті та бічний бігунок від 1/3 до 3/4. */

#nac-card,
#nac-next-handle {
  display: none;
}

@media (max-width: 768px) {
  #nac-next-handle {
    --nac-drag-x: 0px;
    position: fixed;
    top: 44%;
    right: 0;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 62px;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, .06);
    border-right: 0;
    border-radius: 32px 0 0 32px;
    background: rgba(245, 245, 245, .96);
    box-shadow: 0 3px 14px rgba(0, 0, 0, .12);
    color: #222;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-y;
    opacity: 0;
    transform: translate3d(calc(100% + var(--nac-drag-x)), -50%, 0);
    transition: transform .25s ease, opacity .2s ease, background-color .2s ease;
    pointer-events: none;
  }

  #nac-next-handle.is-visible {
    opacity: 1;
    transform: translate3d(var(--nac-drag-x), -50%, 0);
    pointer-events: auto;
  }

  #nac-next-handle.is-dragging {
    transition: none;
  }

  #nac-next-handle:active {
    background: #e9e9e9;
  }

  #nac-next-handle .nac-chevrons {
    display: block;
    margin-left: 4px;
    font-family: Arial, sans-serif;
    font-size: 31px;
    font-weight: 400;
    line-height: 1;
  }

  #nac-card {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: block;
    box-sizing: border-box;
    min-height: 96px;
    padding: 16px 44px 16px 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    background: #111 center / cover no-repeat;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .25);
    color: #fff;
    transform: translateY(120%);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  }

  #nac-card.is-visible {
    transform: translateY(0);
  }

  #nac-card::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, .88) 42%, rgba(0, 0, 0, .42));
    content: "";
  }

  #nac-card .nac-link {
    position: relative;
    z-index: 1;
    display: block;
    color: inherit;
    text-decoration: none;
  }

  #nac-card .nac-eyebrow,
  #nac-card .nac-title {
    display: block;
  }

  #nac-card .nac-eyebrow {
    margin-bottom: 4px;
    color: #e63946;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
  }

  #nac-card .nac-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
  }

  #nac-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  #nac-next-handle:focus-visible,
  #nac-card .nac-link:focus-visible,
  #nac-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
  }

  @media (prefers-reduced-motion: reduce) {
    #nac-card,
    #nac-next-handle {
      transition: none;
    }
  }
}
