@layer ta.components {
  .ta-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .ta-subscribe {
    display: grid;
    gap: 8px;
    margin-top: 14px;
  }

  .ta-subscribe__label {
    color: var(--ta-muted);
    font-size: 12px;
    font-weight: 650;
  }

  .ta-subscribe__input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--ta-line-strong);
    border-radius: var(--ta-radius-xs);
    background: var(--ta-surface);
    color: var(--ta-ink);
    font: inherit;
    font-size: 14px;
  }

  .ta-subscribe__input:focus {
    outline: 3px solid var(--ta-focus);
    outline-offset: 1px;
  }

  .ta-subscribe__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }

  .ta-subscribe__consent {
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 8px;
    align-items: start;
    color: var(--ta-muted);
    font-size: 11px;
    line-height: 1.35;
    cursor: pointer;
  }

  .ta-subscribe__consent input {
    margin-top: 2px;
  }

  .ta-subscribe .ta-follow {
    margin-top: 2px;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
  }

  .ta-subscribe .ta-follow:hover {
    filter: brightness(0.97);
  }

  .ta-subscribe__msg {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
  }

  .ta-subscribe__msg.is-ok {
    color: var(--ta-success);
  }

  .ta-subscribe__msg.is-err {
    color: #a11a2f;
  }

  .ta-exit[hidden] {
    display: none !important;
  }

  .ta-exit {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
  }

  .ta-exit__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 14, 16, 0.55);
    backdrop-filter: blur(2px);
  }

  .ta-exit__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    width: min(860px, 100%);
    max-height: min(92vh, 620px);
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(20, 12, 16, 0.35);
    animation: ta-exit-in 280ms ease-out;
  }

  @keyframes ta-exit-in {
    from {
      opacity: 0;
      transform: translateY(10px) scale(0.985);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .ta-exit__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #c0392b;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
  }

  .ta-exit__media {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background: #2a1c18;
  }

  .ta-exit__media-bg {
    position: absolute;
    inset: -12%;
    background-position: center;
    background-size: cover;
    filter: blur(14px) saturate(1.05);
    transform: scale(1.08);
    opacity: 0.7;
  }

  .ta-exit__media-img {
    position: relative;
    z-index: 1;
    display: block;
    width: min(78%, 280px);
    height: auto;
    margin: 48px auto;
    border: 6px solid #d4af57;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    object-fit: cover;
    aspect-ratio: 3 / 4;
  }

  .ta-exit__form {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 36px 34px 28px;
    overflow: auto;
  }

  .ta-exit__form h2 {
    margin: 0 28px 0 0;
    color: #3a241c;
    font-family: var(--ta-font-serif);
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 700;
    line-height: 1.2;
  }

  .ta-exit__form > p {
    margin: 0;
    color: #6d655f;
    font-size: 14px;
    line-height: 1.45;
  }

  .ta-exit__form input[type="text"],
  .ta-exit__form input[type="email"] {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 2px solid #4a2c22;
    border-radius: 2px;
    background: #fffdf8;
    color: #2a1a14;
    font: inherit;
    font-size: 15px;
    box-shadow: inset 0 0 0 1px rgba(74, 44, 34, 0.06);
  }

  .ta-exit__form input[type="text"]::placeholder,
  .ta-exit__form input[type="email"]::placeholder {
    color: #6f5a50;
    opacity: 1;
  }

  .ta-exit__form input[type="text"]:focus,
  .ta-exit__form input[type="email"]:focus {
    border-color: #2f1710;
    background: #fff;
    outline: 3px solid rgba(212, 168, 75, 0.45);
    outline-offset: 1px;
  }

  .ta-exit__submit {
    min-height: 48px;
    border: 0;
    border-radius: 2px;
    background: linear-gradient(180deg, #f0d38a 0%, #d4a84b 100%);
    color: #3a241c;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .ta-exit__submit:hover {
    filter: brightness(1.03);
  }

  .ta-exit__submit:disabled,
  .ta-subscribe .ta-follow:disabled {
    opacity: 0.65;
    cursor: wait;
  }

  .ta-exit__form .ta-subscribe__consent {
    color: #7a736c;
  }

  body.ta-exit-open {
    overflow: hidden;
  }

  @media (max-width: 760px) {
    .ta-exit__dialog {
      grid-template-columns: 1fr;
      max-height: min(94vh, 720px);
    }

    .ta-exit__media {
      min-height: 160px;
      max-height: 180px;
    }

    .ta-exit__media-img {
      width: 110px;
      margin: 24px auto;
    }

    .ta-exit__form {
      padding: 22px 18px 18px;
    }
  }
}
