/* Touchline full-screen advertising placement, version 2. */
.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;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
  color: #fff;
  background: #6138ff;
  border: 1px solid #6138ff;
  border-radius: 0.5rem;
  cursor: pointer;
}

.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__cta:focus-visible,
.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; }
}

/* The creative itself is one full-area clickable image. */
.tl-ad-modal { padding:0; border:0; background:#101213; overflow:hidden; }
.tl-ad-modal__content { display:block; position:relative; }
.tl-ad-modal__topline { position:absolute; top:8px; left:8px; z-index:2; pointer-events:none; }
.tl-ad-modal__label { background:#fff; color:#111c35; }
.tl-ad-modal h2, .tl-ad-modal p { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.tl-ad-modal__actions { display:block; }
.tl-ad-modal__cta { display:block; width:100%; padding:0; min-height:0; border:0; border-radius:0; background:transparent; }
.tl-ad-modal__banner { display:block; width:100%; height:auto; aspect-ratio:3/1; object-fit:contain; }
.tl-ad-modal__close { position:absolute; bottom:8px; right:8px; z-index:3; }
@media(max-width:600px) { .tl-ad-modal { padding:0; } }

.tl-ad-modal__topline { position:static; min-height:28px; box-sizing:border-box; padding:4px 8px; background:#101213; }
.tl-ad-modal__label { height:20px; min-height:0; box-sizing:border-box; padding:1px 5px; font:700 10px/16px Arial,sans-serif; }

/* Keep the hit target, make only the visible close mark small. */
.tl-ad-modal__topline { display:none; }
.tl-ad-modal__close, .tl-ad-modal__close:hover { background:transparent; border:0; box-shadow:none; }
.tl-ad-modal__close img { width:7.6px; height:7.6px; filter:brightness(0) invert(1) drop-shadow(0 1px 2px #000); }
.tl-ad-modal__close:focus-visible { outline:none; }
.tl-ad-modal__close:focus-visible img { outline:2px solid white; outline-offset:3px; }

/* User-requested marker on the popup only; same size as the visible close icon. */
.tl-ad-modal__content::after { content:''; position:absolute; top:12px; right:12px; width:7.6px; height:7.6px; border-radius:50%; background:#fff; pointer-events:none; z-index:3; }
