﻿/* Basketball Slingshot Upload Styling for isupload */
:root, [data-bs-theme="light"] {
  --bb-panel: rgba(241, 245, 249, 0.85);
  --bb-card: #ffffff;
  --bb-ink: #0f172a;
  --bb-muted: #64748b;
  --bb-line: #cbd5e1;
  --bb-chip: #e2e8f0;
  --bb-orange: #f97316;
  --bb-orange-deep: #ea580c;
  --bb-tint: #ffedd5;
  --bb-net: #94a3b8;
  --bb-ok: #16a34a;
  --bb-paper: #ffffff;
  --bb-fold: #e2e8f0;
  --bb-fileline: #cbd5e1;
  --bb-pdf: #ef4444;
  --bb-shadow: rgba(15, 23, 42, 0.2);
}

[data-bs-theme="dark"] {
  --bb-panel: rgba(15, 23, 42, 0.7);
  --bb-card: #1e293b;
  --bb-ink: #f8fafc;
  --bb-muted: #94a3b8;
  --bb-line: #334155;
  --bb-chip: #334155;
  --bb-orange: #fb923c;
  --bb-orange-deep: #f97316;
  --bb-tint: #431407;
  --bb-net: #64748b;
  --bb-ok: #22c55e;
  --bb-paper: #334155;
  --bb-fold: #1e293b;
  --bb-fileline: #475569;
  --bb-pdf: #f87171;
  --bb-shadow: rgba(0, 0, 0, 0.45);
}

#basketball-court {
  position: relative;
  width: 100%;
  height: 480px;
  min-height: 440px;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--bb-panel);
  border: 2px dashed var(--bb-line);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: border-color .2s ease;
}

#basketball-court.drag-over {
  border-color: var(--bb-orange);
  background: var(--bb-tint);
}

.bb-world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  z-index: 5;
}

/* top bar actions */
.bb-topbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 20;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.bb-topbar > * {
  pointer-events: auto;
}

.bb-badge {
  background: var(--bb-card);
  color: var(--bb-muted);
  border: 1px solid var(--bb-line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}
.bb-badge b {
  color: var(--bb-orange-deep);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* hoop components */
.bb-hoopg {
  position: absolute;
  width: 400px;
  height: 260px;
}

.bb-zone {
  position: absolute;
  left: 84px;
  top: 10px;
  width: 232px;
  height: 150px;
  z-index: 1;
  background: var(--bb-card);
  border: 1.5px dashed var(--bb-line);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background .18s, border-color .18s;
  pointer-events: none;
}
.bb-zone svg {
  width: 26px;
  height: 26px;
  color: var(--bb-muted);
}
.bb-zt {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--bb-ink);
}
.bb-zs {
  font-size: 12px;
  color: var(--bb-muted);
  margin-top: 2px;
}
.bb-zone.hot {
  background: var(--bb-tint);
  border-color: var(--bb-orange);
}

.bb-hoop {
  position: absolute;
  left: 0;
  top: 0;
  width: 400px;
  height: 260px;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}
.bb-hoop .board {
  fill: none;
  stroke: var(--bb-orange);
  stroke-width: 2.6;
}
.bb-hoop .rim {
  fill: none;
  stroke: var(--bb-orange);
  stroke-width: 5;
}
.bb-hoop .bracket {
  fill: var(--bb-orange-deep);
}
.bb-hoop .meshline {
  fill: none;
  stroke: var(--bb-net);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.bb-net {
  transform-origin: 200px 166px;
}
.bb-net.swish {
  animation: bb-swish .55s ease-out;
}
@keyframes bb-swish {
  0% { transform: scale(1, 1); }
  30% { transform: scale(.9, 1.15); }
  60% { transform: scale(1.05, .95); }
  100% { transform: scale(1, 1); }
}

.bb-pop {
  position: absolute;
  left: 256px;
  top: 80px;
  z-index: 6;
  font-size: 32px;
  font-weight: 800;
  color: var(--bb-orange);
  opacity: 0;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.bb-pop.go {
  animation: bb-pop .95s ease-out;
}
@keyframes bb-pop {
  0% { opacity: 0; transform: translateY(10px) scale(.6); }
  25% { opacity: 1; transform: translateY(-4px) scale(1.2); }
  70% { opacity: 1; transform: translateY(-12px) scale(1); }
  100% { opacity: 0; transform: translateY(-22px) scale(1); }
}

/* aiming */
.bb-dot {
  position: absolute;
  left: -3px;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bb-orange);
  z-index: 4;
  pointer-events: none;
}
.bb-aim {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}
.bb-aim line.arrow {
  stroke: var(--bb-orange);
  stroke-width: 5;
  stroke-linecap: round;
}
.bb-aim path {
  fill: var(--bb-orange);
}
.bb-aim line.band {
  stroke: var(--bb-muted);
  stroke-width: 2;
  stroke-dasharray: 3 7;
  stroke-linecap: round;
  opacity: .8;
}
.bb-aim.on line.arrow {
  stroke: var(--bb-ok);
}
.bb-aim.on path {
  fill: var(--bb-ok);
}

/* the draggable slingshot file */
.bb-file {
  position: absolute;
  left: -28px;
  top: -34px;
  width: 56px;
  height: 68px;
  z-index: 5;
  cursor: grab;
  touch-action: none;
  will-change: transform;
  transition: opacity .3s;
  border-radius: 10px;
}
.bb-file::after {
  content: "";
  position: absolute;
  inset: -25px;
}
.bb-file.grab {
  cursor: grabbing;
}
.bb-file.gone {
  opacity: 0;
}
.bb-file:focus-visible {
  outline: 2px solid var(--bb-orange);
  outline-offset: 6px;
}
.bb-file .inner {
  width: 100%;
  height: 100%;
}
.bb-file svg {
  display: block;
  width: 56px;
  height: 68px;
  filter: drop-shadow(0 6px 10px var(--bb-shadow));
}
.bb-file.idle .inner {
  animation: bb-bob 2.5s ease-in-out infinite;
}
.bb-file.idle.enter .inner {
  animation: bb-enter .35s ease-out, bb-bob 2.5s ease-in-out .35s infinite;
}
@keyframes bb-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes bb-enter {
  from { transform: scale(.55); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.bb-cap {
  position: absolute;
  transform: translateX(-50%);
  width: 180px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--bb-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .2s;
  z-index: 1;
  pointer-events: none;
}

/* bottom dock inside court */
.bb-bottombar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 10px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}
.bb-status {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--bb-muted);
  background: var(--bb-card);
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--bb-line);
  box-shadow: 0 2px 8px var(--bb-shadow);
}

@media (prefers-reduced-motion: reduce) {
  .bb-file.idle .inner, .bb-file.idle.enter .inner, .bb-net.swish, .bb-pop.go {
    animation: none;
  }
  .bb-pop.go {
    opacity: 1;
  }
}