/* Touchline full-screen advertising placement, version 1. */
.tl-ad-modal {
  box-sizing: border-box;
  width: min(32.5rem, calc(100vw - 3rem));
  max-width: calc(100vw - 3rem);
  margin: auto;
  padding: 1rem;
  color: #111c35;
  background: #fff;
  border: 1px solid #c9d1e5;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 2rem rgb(17 28 53 / 15%);
}

.tl-ad-modal::backdrop {
  background: rgb(7 12 24 / 72%);
}

.tl-ad-modal__content {
  display: grid;
  gap: 0.75rem;
}

.tl-ad-modal__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tl-ad-modal__label {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.125rem 0.4375rem;
  color: #58658b;
  font: 700 0.75rem/1.125rem Arial, Helvetica, sans-serif;
  border: 1px solid #dae0ee;
  border-radius: 0.25rem;
}

.tl-ad-modal h2,
.tl-ad-modal p {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}

.tl-ad-modal h2 {
  font-size: 1.25rem;
  line-height: 1.35;
}

.tl-ad-modal p {
  color: #58658b;
  font-size: 0.875rem;
  line-height: 1.45;
}

.tl-ad-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tl-ad-modal__cta,
.tl-ad-modal__close {
  font: 700 0.875rem/1.25rem Arial, Helvetica, sans-serif;
}

.tl-ad-modal__cta {
  min-height: 3rem;
  padding: 0.625rem 1rem;
  color: #645a84;
  background: #eeebfa;
  border: 1px solid #d8d0f5;
  border-radius: 0.5rem;
  cursor: not-allowed;
}

.tl-ad-modal__close {
  display: grid;
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  padding: 0;
  place-items: center;
  background: #fff;
  border: 1px solid #bdc7dc;
  border-radius: 0.5rem;
  cursor: pointer;
}

.tl-ad-modal__close:hover {
  background: #edf0f8;
}

.tl-ad-modal__close:focus-visible {
  outline: 3px solid #6138ff;
  outline-offset: 3px;
}

.tl-ad-modal__close img {
  width: 1.5rem;
  height: 1.5rem;
}

html.tl-ad-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (prefers-reduced-motion: no-preference) {
  .tl-ad-modal[open] {
    animation: tl-ad-modal-arrive 160ms ease-out;
  }
}

@keyframes tl-ad-modal-arrive {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .tl-ad-modal {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    max-height: 25dvh;
    padding: 0.75rem;
    overflow: hidden;
  }

  .tl-ad-modal__content {
    gap: 0.5rem;
  }

  .tl-ad-modal h2 {
    font-size: 1rem;
    line-height: 1.3;
  }

  .tl-ad-modal p {
    font-size: 0.8125rem;
    line-height: 1.35;
  }
}

@media (max-width: 600px) and (max-height: 640px) {
  .tl-ad-modal { padding: 0.625rem; }
  .tl-ad-modal__content { gap: 0.375rem; }
  .tl-ad-modal p { display: none; }
}
