/* Mobile-only partner controls. Desktop layout remains untouched. */
.sbo-mobile-action-dock {
  display: none;
}

@media (max-width: 640px) {
  body {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  /* Compact the existing rotating promotion and anchor it at middle-right. */
  .sportsbook-promo-rail.mobile-floating-ready {
    top: 50% !important;
    right: 7px !important;
    bottom: auto !important;
    left: auto !important;
    width: min(146px, 37vw) !important;
    transform: translateY(-50%) !important;
  }

  .sportsbook-promo-rail.mobile-floating-ready .mobile-promo-float {
    width: 100%;
    border-radius: 12px;
    box-shadow:
      0 12px 30px rgba(0, 0, 0, 0.62),
      0 0 16px rgba(0, 255, 145, 0.2);
  }

  .sportsbook-promo-rail.mobile-floating-ready .mobile-floating-close {
    top: 5px;
    right: 5px;
    width: 23px;
    height: 23px;
    font-size: 0.88rem;
  }

  .sportsbook-promo-rail.mobile-floating-ready .mobile-promo-cta {
    top: 50%;
    right: 7px;
    bottom: auto;
    left: 7px;
    min-height: 56px;
    padding: 7px 6px;
    transform: translateY(-50%);
    border-radius: 8px;
    font-size: 0.57rem;
    line-height: 1.2;
  }

  /* New mobile-only futuristic action dock. */
  .sbo-mobile-action-dock {
    position: fixed;
    left: 50%;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 96;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: min(430px, calc(100vw - 18px));
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid rgba(72, 255, 166, 0.62);
    border-radius: 16px;
    background:
      linear-gradient(145deg, rgba(3, 32, 19, 0.97), rgba(1, 17, 10, 0.98));
    box-shadow:
      0 14px 34px rgba(0, 0, 0, 0.62),
      0 0 22px rgba(0, 255, 145, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    isolation: isolate;
    contain: layout paint;
    transform: translate3d(-50%, 0, 0);
    animation: sbo-dock-enter 0.42s cubic-bezier(0.2, 0.78, 0.2, 1) both;
  }

  .sbo-mobile-action-dock::before {
    content: "";
    position: absolute;
    inset: -70% -20%;
    z-index: -2;
    background: conic-gradient(
      from 0deg,
      transparent 0 28%,
      rgba(252, 209, 22, 0.7) 34%,
      rgba(0, 255, 145, 0.9) 42%,
      transparent 50% 100%
    );
    animation: sbo-dock-orbit 5.8s linear infinite;
  }

  .sbo-mobile-action-dock::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: 14px;
    background:
      linear-gradient(90deg, transparent, rgba(56, 255, 164, 0.08), transparent),
      linear-gradient(145deg, #052718, #03170e 72%);
  }

  .sbo-mobile-action-dock__button {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 46px;
    box-sizing: border-box;
    border: 1px solid rgba(92, 255, 179, 0.72);
    border-radius: 11px;
    padding: 9px 12px;
    color: #00170c;
    background: linear-gradient(110deg, #fcd116, #25ed91 62%, #83ffc4);
    box-shadow:
      0 7px 18px rgba(0, 0, 0, 0.38),
      0 0 14px rgba(0, 255, 145, 0.18);
    font: 900 0.82rem/1.1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    text-decoration: none;
    touch-action: manipulation;
    overflow: hidden;
  }

  .sbo-mobile-action-dock__button::after {
    content: "";
    position: absolute;
    top: -80%;
    bottom: -80%;
    left: -45%;
    width: 24%;
    background: rgba(255, 255, 255, 0.48);
    transform: skewX(-22deg) translate3d(-220%, 0, 0);
    animation: sbo-button-scan 3.6s ease-in-out infinite;
  }

  .sbo-mobile-action-dock__button--register {
    color: #eafff3;
    border-color: rgba(45, 238, 145, 0.6);
    background: linear-gradient(120deg, #075a35, #0a8b50 58%, #0fcf76);
  }

  .sbo-mobile-action-dock__button:hover,
  .sbo-mobile-action-dock__button:focus-visible {
    color: #00170c;
    background: linear-gradient(110deg, #fff09a, #67ffb7 68%);
    outline: 2px solid #fff;
    outline-offset: 2px;
  }

  @keyframes sbo-dock-enter {
    from {
      opacity: 0;
      transform: translate3d(-50%, 18px, 0) scale(0.97);
    }
    to {
      opacity: 1;
      transform: translate3d(-50%, 0, 0) scale(1);
    }
  }

  @keyframes sbo-dock-orbit {
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes sbo-button-scan {
    0%, 64% {
      transform: skewX(-22deg) translate3d(-220%, 0, 0);
    }
    82%, 100% {
      transform: skewX(-22deg) translate3d(760%, 0, 0);
    }
  }
}

@media (max-width: 360px) {
  .sportsbook-promo-rail.mobile-floating-ready {
    right: 5px !important;
    width: min(134px, 38vw) !important;
  }

  .sportsbook-promo-rail.mobile-floating-ready .mobile-promo-cta {
    right: 6px;
    left: 6px;
    font-size: 0.52rem;
  }

  .sbo-mobile-action-dock {
    gap: 6px;
    width: calc(100vw - 12px);
    padding: 7px;
  }

  .sbo-mobile-action-dock__button {
    min-height: 44px;
    padding: 8px 9px;
    font-size: 0.76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sbo-mobile-action-dock,
  .sbo-mobile-action-dock::before,
  .sbo-mobile-action-dock__button::after {
    animation: none !important;
  }
}
