/*
 * tcbl.ca's adidas 50% off popup (2026-11-27 r10 B1; design-popup-mobile.png, design-popup-desktop.png), loaded while the promotion is on
 * (header-js-css.jsp). Phone layout up to the burger's breakpoint (900px), desktop above. Its three fonts are served from our own server
 * (../fonts, licence in ../fonts/OFL.txt); the browser downloads them only once the popup is shown. Anton for "TCBL" and "50% OFF",
 * Oswald for the labels, buttons and text, Inter for the pass code and "Not valid at other adidas stores".
 *
 * Layers: the fixed header 900, the popup and its backdrop 2000, the cookie banner (CookieChimp's #cc-main) above both, so its buttons
 * stay usable while the popup is open; its height is added under the popup's content (--tp-cc, promo-tcbl-*.js) so nothing stays hidden
 * behind it.
 */

@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/anton-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/oswald-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* the page behind does not scroll while the popup is open */
html.tp-open, html.tp-open body { overflow: hidden; }

/* the cookie banner over the popup and its backdrop (B1 item 13) */
#cc-main { z-index: 2147483000 !important; }

.tp { --tp-green: #1D4D37; --tp-black: #111; --tp-grey: #5E5E5E; --tp-line: #DADADA; --tp-cc: 0px;
      position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 14px; }
.tp[hidden] { display: none; }
.tp *, .tp *::before, .tp *::after { box-sizing: border-box; }
.tp-backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, 0.6); }
.tp-dialog { position: relative; width: 100%; max-width: 440px; max-height: 100%; display: flex; flex-direction: column; background: #FFF; color: var(--tp-black);
             border-radius: 20px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); font-family: 'Oswald', 'Arial Narrow', sans-serif; outline: none; }
/* the close button stays in the corner while the content scrolls under it */
.tp-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--tp-line); background: #FFF;
            color: var(--tp-black); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tp-close:hover { background: #F2F2F2; }
.tp-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.tp-body { padding: 0 20px calc(16px + var(--tp-cc)); text-align: center; }
.tp p { margin: 0; }
.tp a { color: inherit; }
.tp :focus-visible { outline: 3px solid #2F6FEB; outline-offset: 2px; }

/* adidas | Exclusively for TCBL */
.tp-brand { display: flex; align-items: center; justify-content: center; gap: 15px; padding: 16px 40px 12px; }
.tp-logo { width: 62px; height: auto; display: block; }
.tp-rule { width: 1px; align-self: stretch; background: var(--tp-line); }
.tp-excl { display: flex; flex-direction: column; align-items: flex-start; text-align: left; line-height: 1; }
.tp-excl-for { font-weight: 500; font-size: 15px; letter-spacing: 0.005em; }
.tp-tcbl { font-family: 'Anton', 'Impact', sans-serif; font-size: 57px; line-height: 0.92; letter-spacing: 0.005em; margin-top: 4px; }

/* the photo, as wide as the popup, never cropped: all three people from head to toe */
.tp-photo { display: block; width: calc(100% + 40px); max-width: none; height: auto; margin: 0 -20px; }

.tp-offer { padding-top: 6px; }
.tp-off { font-family: 'Anton', 'Impact', sans-serif; font-size: 62px; line-height: 1; color: var(--tp-green); letter-spacing: 0.005em; }
.tp-only { margin-top: 4px !important; font-weight: 500; font-size: 17px; line-height: 1.2; letter-spacing: 0.02em; text-transform: uppercase; color: var(--tp-green); }
.tp-addr { margin-top: 2px !important; font-weight: 500; font-size: 19px; line-height: 1.3; }
.tp-postal { display: none; }
.tp-note { font-family: 'Inter', system-ui, sans-serif; font-size: 12.5px; line-height: 1.4; color: var(--tp-grey); }

/* the pass: adidas' QR code as received, with a white margin, then its code */
.tp-pass { display: flex; flex-direction: column; align-items: center; margin-top: 8px; }
.tp-qr { display: block; width: 161px; height: 161px; border: 1px solid #9A9A9A; background: #FFF; }
.tp-qr img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.tp-code { margin-top: 6px; font-family: 'Inter', system-ui, sans-serif; font-size: 13px; letter-spacing: 0.24em; padding-left: 0.24em; }
.tp-show { margin-top: 1px; font-size: 15px; }

.tp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.tp-btn { display: flex; align-items: center; justify-content: center; height: 44px; font-weight: 500; font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase;
          text-decoration: none; border: 1.5px solid var(--tp-black); cursor: pointer; }
.tp-btn-dark { background: var(--tp-black); color: #FFF !important; }
.tp-btn-light { background: #FFF; color: var(--tp-black) !important; }
.tp-btn:hover { opacity: .85; }

.tp-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; text-align: left; }
.tp-label { font-weight: 500; font-size: 15px; line-height: 1.25; letter-spacing: 0.03em; text-transform: uppercase; color: var(--tp-green); }
.tp-value { margin-top: 1px !important; font-size: 16.5px; line-height: 1.3; }
.tp-hours .tp-value span:not(.tp-dot) { display: block; }
.tp-dot, .tp-holiday, .tp-contact { display: none; }
.tp-holiday { font-weight: 500; font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--tp-green); margin-top: 2px !important; }
.tp-contact a { text-decoration: none; }

.tp-foot { margin-top: 12px; border-top: 1px solid var(--tp-line); padding-top: 4px; display: flex; flex-direction: column; align-items: center; }
.tp-ig { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 6px; width: 100%; min-height: 40px; padding: 4px 0; font-weight: 500;
         font-size: 14.5px; letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none; }
.tp-ig-handle { color: var(--tp-green); white-space: nowrap; }
.tp-arrow { font-family: system-ui, sans-serif; font-size: 16px; margin-left: 6px; }
.tp-terms-btn { font: inherit; font-size: 11.5px; letter-spacing: 0.02em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 2px; color: var(--tp-black);
                background: none; border: 0; padding: 4px 6px; cursor: pointer; }
.tp-terms { margin-top: 8px; text-align: left; font-family: 'Inter', system-ui, sans-serif; font-size: 11.5px; line-height: 1.5; color: var(--tp-grey); }
.tp-terms[hidden] { display: none; }

/* very short phone screens: a little tighter, still scrolling inside when taller than the screen */
@media (max-width: 900px) and (max-height: 700px) {
    .tp-off { font-size: 54px; }
    .tp-tcbl { font-size: 50px; }
}
@media (max-width: 359px) {
    .tp-body { padding-left: 14px; padding-right: 14px; }
    .tp-photo { width: calc(100% + 28px); margin: 0 -14px; }
    .tp-brand { padding-left: 30px; padding-right: 30px; }
    .tp-btn { font-size: 15px; }
}

/* ------------------------------------------------------------------ desktop: three rows, as design-popup-desktop.png */
@media (min-width: 901px) {
    .tp { padding: 20px; }
    .tp-dialog { max-width: 900px; border-radius: 22px; }
    .tp-close { top: 12px; right: 12px; }
    .tp-body { display: grid; grid-template-columns: 300px minmax(0, 1fr) 152px; column-gap: 32px; padding: 0 40px calc(14px + var(--tp-cc)); text-align: left;
               grid-template-areas: "brand offer offer" "photo photo photo" "info contact pass" "info actions pass" "foot foot foot" "terms terms terms"; }
    .tp-brand { grid-area: brand; justify-content: flex-start; padding: 24px 24px 24px 0; gap: 16px; border-right: 1px solid var(--tp-line); margin: 24px 0; padding-top: 0; padding-bottom: 0; }
    .tp-logo { width: 84px; }
    .tp-rule { margin: 0 2px; }
    .tp-excl-for { font-size: 16px; }
    .tp-tcbl { font-size: 70px; }
    .tp-offer { grid-area: offer; padding: 12px 0 14px; }
    .tp-off { font-size: 96px; line-height: 0.98; }
    .tp-only { font-size: 19px; margin-top: 4px !important; }
    .tp-addr { font-size: 22px; }
    .tp-postal { display: inline; }
    .tp-note { font-size: 12.5px; }
    /* 3:1 as the design: the picture loses about 4% at the top and 9% at the bottom, short of the man's head and the shoes */
    .tp-photo { grid-area: photo; width: calc(100% + 80px); margin: 0 -40px; aspect-ratio: 3 / 1; object-fit: cover; object-position: 50% 30%; }
    .tp-info { grid-area: info; display: block; margin-top: 18px; }
    .tp-hours { margin-top: 12px; }
    .tp-hours .tp-value span:not(.tp-dot) { display: inline; }
    .tp-dot, .tp-holiday { display: inline; }
    .tp-holiday { display: block; }
    .tp-contact { grid-area: contact; display: block; margin-top: 18px; }
    .tp-actions { grid-area: actions; margin-top: 16px; align-self: start; }
    .tp-pass { grid-area: pass; margin-top: 18px; }
    .tp-qr { width: 150px; height: 150px; }
    .tp-code { font-size: 12.5px; }
    .tp-show { font-size: 14.5px; }
    .tp-foot { grid-area: foot; margin-top: 10px; padding-top: 6px; flex-direction: row; justify-content: space-between; }
    .tp-ig { width: auto; flex-wrap: nowrap; justify-content: flex-start; column-gap: 8px; font-size: 17px; letter-spacing: 0.04em; white-space: nowrap; }
    .tp-terms { grid-area: terms; }
}
