/* TMC Live player. Everything under .tmcl* (no other selector of the site is touched). Below the site's consent banner (2147483000). */
.tmcl {
  --tmcl-red: #ff334a;
  --tmcl-blue: #147cff;
  --tmcl-fb: #1877f2;
  --tmcl-ink: #f5f7fb;
  --tmcl-muted: #aab3c5;
  --tmcl-glass: rgba(11, 14, 22, 0.94);
  --tmcl-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --tmcl-gap: 16px;
  --tmcl-ratio: 1;                           /* the picture's width / height, set by the script (square by default) */
  position: fixed;
  right: max(var(--tmcl-gap), env(safe-area-inset-right));
  bottom: max(var(--tmcl-gap), env(safe-area-inset-bottom));
  z-index: 2147482000;
  width: min(380px, calc(240px * var(--tmcl-ratio) + 60px), calc(100vw - 2 * var(--tmcl-gap)));
  font-family: inherit;
  color: var(--tmcl-ink);
  -webkit-font-smoothing: antialiased;
}
.tmcl *, .tmcl *::before, .tmcl *::after { box-sizing: border-box; }
.tmcl[data-mode="big"] {                    /* centred a little low, sized to the screen's height: it always sits whole under the site's header */
  right: 50%;
  bottom: auto;
  top: calc(50% + 40px);
  width: min(1280px, calc(100vw - 2 * var(--tmcl-gap)), calc((100vh - 290px) * var(--tmcl-ratio) + 20px));
  width: min(1280px, calc(100vw - 2 * var(--tmcl-gap)), calc((100dvh - 290px) * var(--tmcl-ratio) + 20px));
  transform: translate(50%, -50%);
}
.tmcl:fullscreen { width: 100vw; height: 100vh; inset: 0; transform: none; background: #000; display: flex; align-items: center; justify-content: center; }
.tmcl:fullscreen .tmcl__frame { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; border-radius: 0; background: #000; }
.tmcl:fullscreen .tmcl__frame::before { display: none; }
/* full screen: the picture is as big as the screen's shorter side allows, whole and centred (a square fills a phone's width) */
.tmcl:fullscreen .tmcl__stage {
  width: min(calc(100vw - 20px), calc((100vh - 130px) * var(--tmcl-ratio)));
  width: min(calc(100vw - 20px), calc((100dvh - 130px) * var(--tmcl-ratio)));
  height: auto;
  margin: 0 auto;
  flex: none;
}

.tmcl-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147481999;
  background: rgba(6, 8, 14, 0.58);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s var(--tmcl-ease, ease);
}
.tmcl-backdrop.is-on { opacity: 1; pointer-events: auto; }

/* the frame: glass, a thin red-to-blue edge, depth */
.tmcl__frame {
  position: relative;
  overflow: hidden;
  overflow: clip;                            /* clipped, not scrollable: a focus inside can never shift the picture sideways */
  border-radius: 20px;
  background: var(--tmcl-glass);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.55), 0 8px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  isolation: isolate;
}
.tmcl__frame::before {                       /* the edge */
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--tmcl-red), rgba(255, 51, 74, 0.15) 38%, rgba(20, 124, 255, 0.15) 62%, var(--tmcl-blue));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
.tmcl__frame::after {                        /* one sheen across the frame when it arrives */
  content: "";
  position: absolute;
  inset: -40% auto -40% -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: translateX(-120%) rotate(8deg);
  pointer-events: none;
  z-index: 3;
}
.tmcl.is-in .tmcl__frame::after { animation: tmcl-sheen 1.1s 0.2s var(--tmcl-ease) both; }
@keyframes tmcl-sheen { to { transform: translateX(520%) rotate(8deg); } }

.tmcl__test {
  padding: 6px 14px;
  background: linear-gradient(90deg, #f6b73c, #ffd27a);
  color: #3b2a05;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* the bar: LIVE, title, controls */
.tmcl__bar { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; }
.tmcl__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 5px 10px 5px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff4b60, var(--tmcl-red));
  box-shadow: 0 6px 16px -6px rgba(255, 51, 74, 0.85);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
}
/* the badge pops in, but is visible even if the animation never runs (a background tab, an old browser) */
.tmcl.is-in .tmcl__badge { animation: tmcl-pop 0.5s 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; }
@keyframes tmcl-pop { from { transform: scale(0.6); opacity: 0; } }
.tmcl__dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.tmcl__dot::after {                          /* status pulse: it is on air */
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  animation: tmcl-ring 1.6s ease-out infinite;
}
@keyframes tmcl-ring { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.tmcl__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tmcl[data-mode="big"] .tmcl__title { font-size: clamp(16px, 2vw, 22px); }
.tmcl__ctrls { display: flex; gap: 6px; flex: none; }
.tmcl__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--tmcl-ink);
  cursor: pointer;
  transition: transform 0.16s var(--tmcl-ease), background 0.16s ease, border-color 0.16s ease;
}
.tmcl__btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tmcl__btn:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.2); transform: translateY(-1px); }
.tmcl__btn:active { transform: scale(0.94); }
.tmcl__btn:focus-visible, .tmcl__fb:focus-visible, .tmcl__sound:focus-visible, .tmcl__go:focus-visible { outline: 3px solid #8fc1ff; outline-offset: 2px; }

/* the picture */
.tmcl__stage { position: relative; aspect-ratio: var(--tmcl-ratio); margin: 0 10px; border-radius: 14px; overflow: hidden; background: #000; }
.tmcl__media { display: block; width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }   /* never cropped; the frame has the picture's shape, so no bars either */

.tmcl__gate {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  text-align: center;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255, 51, 74, 0.45), transparent 60%),
    radial-gradient(120% 90% at 100% 100%, rgba(20, 124, 255, 0.5), transparent 60%),
    #0b0e16;
}
.tmcl__go {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0b0e16;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s var(--tmcl-ease), box-shadow 0.18s ease;
}
.tmcl__go svg { width: 18px; height: 18px; fill: currentColor; }
.tmcl__go:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.tmcl__go:active { transform: scale(0.97); }
.tmcl__why { margin: 0; max-width: 34ch; color: var(--tmcl-muted); font-size: 12px; line-height: 1.45; }
.tmcl__ended { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; text-align: center; font-weight: 800; background: #0b0e16; }

/* the line under the picture and the Facebook button */
.tmcl__foot { display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px; }
.tmcl__note { flex: 1; min-width: 0; margin: 0; color: var(--tmcl-muted); font-size: 13px; line-height: 1.35; }
.tmcl__note:empty { display: none; }
.tmcl__fb {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  margin-left: auto;
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2d8bff, var(--tmcl-fb));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 10px 24px -8px rgba(24, 119, 242, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.18s var(--tmcl-ease), box-shadow 0.18s ease;
}
.tmcl__fb svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.tmcl__frame { container-type: inline-size; }
@container (max-width: 259px) { .tmcl__fbpre { display: none; } }
.tmcl__fb::after {                           /* a light runs across on hover */
  content: "";
  position: absolute;
  inset: 0 auto 0 -40%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s var(--tmcl-ease);
}
.tmcl__fb:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 30px -8px rgba(24, 119, 242, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.tmcl__fb:hover::after { transform: translateX(380%); }
.tmcl__fb:active { transform: scale(0.97); }
.tmcl[data-mode="big"] .tmcl__fb { padding: 11px 20px 11px 14px; font-size: 15px; }
.tmcl[data-mode="mini"] .tmcl__note { display: none; }

/* the folded player: a pulsing LIVE badge, bottom right, small enough never to be in the way */
.tmcl-dock {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2147482000;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 17px 0 15px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff5a6d, #ff334a 55%, #e5233a);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  box-shadow: 0 12px 26px -8px rgba(255, 51, 74, 0.85), 0 3px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s cubic-bezier(0.32, 0.72, 0, 1);
}
.tmcl-dock[hidden] { display: none; }
.tmcl-dock::before {                         /* the on-air ring: it breathes out from the badge */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(255, 51, 74, 0.75);
  animation: tmcl-dock-ring 2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  pointer-events: none;
}
.tmcl-dock .tmcl__dot { width: 8px; height: 8px; }
.tmcl-dock__word { animation: tmcl-dock-blink 2s ease-in-out infinite; }
.tmcl-dock:hover { transform: translateY(-2px) scale(1.04); }
.tmcl-dock:active { transform: scale(0.95); }
.tmcl-dock:focus-visible { outline: 3px solid #8fc1ff; outline-offset: 3px; }
@keyframes tmcl-dock-ring { 0% { transform: scale(1); opacity: 0.95; } 100% { transform: scale(1.32, 1.6); opacity: 0; } }
@keyframes tmcl-dock-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* computers, folded small: a square of the picture (80 % of a competition card), LIVE in the corner, open / close on hover */
.tmcl__tile { display: none; }
@media (min-width: 641px) and (min-height: 521px), (min-width: 641px) and (orientation: portrait) {
  .tmcl[data-mode="mini"] { width: min(var(--tmcl-tile, 232px), calc(46vh * var(--tmcl-ratio) + 8px)); }   /* a tall video stays a small window */
  .tmcl[data-mode="mini"] .tmcl__frame { padding: 4px; border-radius: 16px; }
  .tmcl[data-mode="mini"] .tmcl__bar, .tmcl[data-mode="mini"] .tmcl__foot, .tmcl[data-mode="mini"] .tmcl__test, .tmcl[data-mode="mini"] .tmcl__sound { display: none; }
  .tmcl[data-mode="mini"] .tmcl__stage { margin: 0; border-radius: 12px; }
  .tmcl[data-mode="mini"] .tmcl__tile { display: block; position: absolute; inset: 4px; z-index: 4; border-radius: 12px; }
}
.tmcl__open { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; cursor: zoom-in; }
.tmcl__open:focus-visible { outline: 3px solid #8fc1ff; outline-offset: -3px; }
.tmcl__tag {
  position: absolute;
  left: 8px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff4b60, var(--tmcl-red));
  box-shadow: 0 4px 12px -4px rgba(255, 51, 74, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  pointer-events: none;
}
.tmcl__tag .tmcl__dot { width: 6px; height: 6px; }
.tmcl__x {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(8, 10, 16, 0.72);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.32, 0.72, 0, 1);
}
.tmcl__x svg { width: 14px; height: 14px; }
.tmcl[data-mode="mini"]:hover .tmcl__x, .tmcl__x:focus-visible { opacity: 1; transform: scale(1); }
.tmcl[data-mode="mini"]:hover .tmcl__frame { box-shadow: 0 28px 64px -12px rgba(0, 0, 0, 0.6), 0 10px 22px rgba(0, 0, 0, 0.32); }
.tmcl__sound, .tmcl__mute {                 /* a round speaker: red and crossed out = silent, green with waves = sound on */
  --tmcl-snd: var(--tmcl-red);
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(8, 10, 16, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.7);
  color: var(--tmcl-snd);
  cursor: pointer;
  transition: transform 0.16s var(--tmcl-ease), color 0.2s ease;
}
.tmcl__sound { top: 10px; right: 10px; }
.tmcl__mute { left: 8px; bottom: 8px; width: 36px; height: 36px; }
.tmcl__sound.is-on, .tmcl__mute.is-on { --tmcl-snd: #2bd673; }
.tmcl__sound svg, .tmcl__mute svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tmcl__sound svg, .tmcl__mute svg { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--tmcl-snd) 60%, transparent)); }
.tmcl__mute svg { width: 18px; height: 18px; }
.tmcl__sound::after, .tmcl__mute::after {   /* while silent: three soft rings say "tap me", then it holds still */
  content: '';
  position: absolute;
  inset: -1px;
  border: 2px solid var(--tmcl-snd);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.tmcl__sound:not(.is-on)::after, .tmcl__mute:not(.is-on)::after { animation: tmcl-snd-ring 1.6s ease-out 0.8s 3; }
@keyframes tmcl-snd-ring { 0% { opacity: 0.75; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }
.tmcl__sound:hover, .tmcl__mute:hover { transform: scale(1.08); }
.tmcl__sound:active, .tmcl__mute:active { transform: scale(0.94); }
.tmcl__mute:focus-visible { outline: 3px solid #8fc1ff; outline-offset: 2px; }

.tmcl__sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* phones: the window is the picture itself (no margins); the bar, the Facebook button and the speaker float on it.
   Folding = the LIVE badge, so there is no "make smaller" button (it would only repeat Close). */
@media (max-width: 640px) {
  .tmcl { --tmcl-gap: 10px; width: calc(100vw - 2 * var(--tmcl-gap)); }
  .tmcl__size { display: none; }
  .tmcl[data-mode="big"] {
    top: calc(50% + 30px);
    width: max(min(256px, calc(100vw - 2 * var(--tmcl-gap))), min(320px, calc(100vw - 2 * var(--tmcl-gap)), calc(58vh * var(--tmcl-ratio))));
    width: max(min(256px, calc(100vw - 2 * var(--tmcl-gap))), min(320px, calc(100vw - 2 * var(--tmcl-gap)), calc(58dvh * var(--tmcl-ratio))));
  }
  .tmcl[data-mode="big"] .tmcl__frame { border-radius: 22px; background: #000; }
  .tmcl[data-mode="big"] .tmcl__stage { margin: 0; border-radius: 0; }
  .tmcl[data-mode="big"] .tmcl__bar {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 4;
    gap: 8px;
    padding: 10px 10px 28px 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.26) 62%, transparent);
  }
  .tmcl[data-mode="big"] .tmcl__title { font-size: 14px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
  .tmcl[data-mode="big"] .tmcl__btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(8, 10, 16, 0.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .tmcl[data-mode="big"] .tmcl__test {
    position: absolute;
    top: 54px;
    left: 50%;
    z-index: 4;
    transform: translateX(-50%);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    white-space: nowrap;
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6);
  }
  .tmcl[data-mode="big"] .tmcl__foot {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 3;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 44px 64px 12px 12px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.28) 62%, transparent);
    pointer-events: none;                    /* only the button and the speaker take taps; the picture stays the picture */
  }
  .tmcl[data-mode="big"] .tmcl__foot > * { pointer-events: auto; }
  .tmcl[data-mode="big"] .tmcl__note { max-width: 100%; color: rgba(255, 255, 255, 0.9); font-size: 12px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tmcl[data-mode="big"] .tmcl__fb { margin-left: 0; padding: 10px 15px 10px 12px; font-size: 13px; }
  .tmcl[data-mode="big"] .tmcl__sound { top: auto; bottom: 12px; right: 12px; z-index: 5; width: 40px; height: 40px; }
}

/* low screens (a phone on its side, a short window): big = as tall as the space under the header allows; small = narrower */
@media (max-height: 520px) and (orientation: landscape) {
  .tmcl { width: min(280px, 44vw); --tmcl-gap: 10px; }
  .tmcl__size { display: none; }
  .tmcl[data-mode="big"] {
    top: calc(50% + 28px);
    width: min(calc(100vw - 2 * var(--tmcl-gap)), calc((100vh - 168px) * var(--tmcl-ratio) + 20px));
    width: min(calc(100vw - 2 * var(--tmcl-gap)), calc((100dvh - 168px) * var(--tmcl-ratio) + 20px));
  }
  .tmcl__bar { padding: 6px 8px; gap: 8px; }
  .tmcl__btn { width: 30px; height: 30px; border-radius: 9px; }
  .tmcl__title { font-size: 13px; }
  .tmcl[data-mode="big"] .tmcl__title { font-size: 15px; }
  .tmcl__foot { padding: 6px 10px 8px; }
  .tmcl__note { display: none; }
  .tmcl__fb, .tmcl[data-mode="big"] .tmcl__fb { padding: 7px 14px 7px 10px; font-size: 13px; }
  .tmcl__sound { width: 34px; height: 34px; top: 6px; right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .tmcl.is-in .tmcl__badge, .tmcl.is-in .tmcl__frame::after, .tmcl__sound::after, .tmcl__mute::after, .tmcl__dot::after, .tmcl-dock::before, .tmcl-dock__word { animation: none; }
  .tmcl-dock { transition: none; }
  .tmcl-backdrop, .tmcl__btn, .tmcl__fb, .tmcl__go { transition: none; }
}
