/* Cookie banner (see js/consent.js). Same look on the studio site, the games and the SpanTime page.
   Accept and Reject are deliberately identical in size and style. Links have no underline (our CI). */
.smc {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9100;
  width: min(370px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 16px 18px;
  background: #181818;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}
.smc[hidden] { display: none; }
.smc.smc-in { opacity: 1; transform: none; }

.smc *, .smc *::before, .smc *::after { box-sizing: border-box; }
.smc h2.smc-title { margin: 0 0 6px; font-size: 15px; font-weight: 500; line-height: 1.3; letter-spacing: normal; text-wrap: wrap; color: #ffffff; }
.smc p { margin: 0 0 12px; max-width: none; color: #a8a8a8; }
.smc a { color: #f08932; text-decoration: none; transition: color 0.2s ease; }
.smc a:hover { color: #ffffff; text-decoration: none; }
.smc a:focus-visible, .smc button:focus-visible, .smc input:focus-visible + .smc-track { outline: 2px solid #f08932; outline-offset: 2px; }

.smc-btns { display: flex; gap: 8px; margin: 0 0 10px; }
.smc-btn {
  flex: 1;
  min-height: 40px;
  padding: 9px 12px;
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.smc-btn:hover { border-color: #f08932; background: rgba(240, 137, 50, 0.08); }
/* "Save choice" while the statistics switch is on */
.smc-btn.smc-btn-on { background: #f08932; border-color: #f08932; color: #181818; }
.smc-btn.smc-btn-on:hover { background: #f59a4d; border-color: #f59a4d; }
.smc-links { margin: 0; font-size: 12px; color: #8e8e8e; }
.smc .smc-links { margin-bottom: 0; }

.smc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.smc-head .smc-title { margin: 0; }
.smc-x { width: 32px; height: 32px; padding: 0; background: none; border: 0; border-radius: 8px; color: #8e8e8e; font-size: 22px; line-height: 1; }
.smc-x:hover { color: #ffffff; background: rgba(255, 255, 255, 0.07); }

.smc-row { padding: 10px 0 2px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.smc-rowhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.smc-name { color: #ffffff; font-weight: 500; font-size: 13px; }
.smc-state { color: #8e8e8e; font-size: 12px; }
.smc-row .smc-text { margin: 0 0 10px; font-size: 12px; line-height: 1.5; }
.smc-foot { margin: 2px 0 0; font-size: 11px; color: #8e8e8e; }

.smc-switch { position: relative; flex: none; width: 36px; height: 20px; }
.smc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 1; }
.smc-track { position: absolute; inset: 0; background: #4a4a4a; border-radius: 10px; transition: background 0.2s ease; }
.smc-track::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #ffffff; transition: transform 0.2s ease; }
.smc-switch input:checked + .smc-track { background: #f08932; }
.smc-switch input:checked + .smc-track::after { transform: translateX(16px); }

/* the legal page's own button */
.smc-btn-inline { flex: none; display: inline-block; min-height: 40px; padding: 9px 18px; margin: 4px 0 8px; color: #ffffff; background: transparent; }

/* phones: bottom sheet */
@media (max-width: 640px) {
  .smc {
    left: 0; right: 0; bottom: 0;
    width: auto;
    border-radius: 14px 14px 0 0;
    border-left: 0; border-right: 0; border-bottom: 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    max-height: 88vh;
    overflow-y: auto;
  }
  .smc-btn { min-height: 44px; }
}

/* while the banner is open the floating play button stays out of the way */
html.smc-open .smp-launch { display: none !important; }

/* native pointer where the site has no custom cursor (games, SpanTime page) */
html:not(:has(#cursor)) .smc-btn, html:not(:has(#cursor)) .smc-x, html:not(:has(#cursor)) .smc a, html:not(:has(#cursor)) .smc-switch { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .smc, .smc-btn, .smc-track, .smc-track::after { transition: none; }
}
