/* ============================================================================
   Bad Bets — Post FAB + Modal + GIF picker styles
   ========================================================================== */

/* ----- Floating Action Button ----- */
.bb-post-fab {
  position: fixed;
  right: 16px;
  bottom: 78px;     /* clears bet-slip toggle (~16+44) */
  z-index: 998;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber, #ffaa00);
  color: #18120a;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-display); font-weight: 900;
  font-size: 13px; letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(255,170,0,0.30), 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.14s, box-shadow 0.14s;
}
.bb-post-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(255,170,0,0.40); }
.bb-post-fab:active { transform: translateY(0); }
.bb-post-fab-icon { font-size: 16px; }

@media (max-width: 480px) {
  .bb-post-fab { padding: 10px 12px; }
  .bb-post-fab-label { display: none; }
  .bb-post-fab-icon { font-size: 18px; }
}

/* On /tickets the bet-slip toggle takes the right-corner; move FAB to the left */
body[data-page="tickets"] .bb-post-fab,
body[data-page="feed"] .bb-post-fab {
  /* On the feed page the composer is already at the top — hide the FAB */
  display: none !important;
}

/* ----- Post POPOUT (anchored to FAB, no screen darkening) ------------------
   Sits above the floating Post button bottom-right. Slides up + fades in.
   Click anywhere outside to close (handled by JS). No backdrop overlay so
   the user can see the page underneath — feels like a quick-action menu,
   not a confirmation dialog. */
.bb-post-modal {
  position: fixed;
  right: 16px;
  bottom: 132px;             /* clears the FAB (bottom: 78px) + 44px height + 10px gap */
  width: min(440px, calc(100vw - 32px));
  background: #11141a;
  border: 1px solid rgba(255,170,0,0.40);
  border-radius: 16px;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.65),
    0 0 0 1px rgba(255,170,0,0.08);
  padding: 16px;
  z-index: 1000;
  /* Slide-up + fade-in animation */
  animation: bb-post-modal-in 0.18s ease-out;
  transform-origin: bottom right;
}
@keyframes bb-post-modal-in {
  0%   { opacity: 0; transform: translateY(12px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.bb-post-modal-card { padding: 0; }   /* card wrapper is now the modal itself */
.bb-post-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.bb-post-modal-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--amber, #ffaa00);
}
.bb-post-modal-close {
  background: transparent; color: var(--muted);
  border: 0;
  font-size: 20px; line-height: 1;
  cursor: pointer; padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}
.bb-post-modal-close:hover { color: var(--text); background: rgba(255,255,255,0.08); }

/* Tweak composer styling INSIDE the popout for a tighter feel */
.bb-post-modal .bb-composer {
  background: transparent;
  border: 0;
  padding: 0;
}
.bb-post-modal .bb-composer-input {
  min-height: 88px;
  font-size: 15px;
}
.bb-post-modal .bb-composer-row {
  padding-top: 8px;
}

/* Mobile: full-width sheet from bottom instead of corner popout */
@media (max-width: 480px) {
  .bb-post-modal {
    right: 0; left: 0;
    bottom: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 18px 16px max(18px, env(safe-area-inset-bottom, 18px));
    animation: bb-post-modal-sheet-in 0.22s ease-out;
  }
  @keyframes bb-post-modal-sheet-in {
    0%   { opacity: 0; transform: translateY(100%); }
    100% { opacity: 1; transform: translateY(0); }
  }
}

/* ----- Post-success toast ----- */
.bb-post-toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #11141a;
  border: 1px solid rgba(0,200,90,0.45);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1001;
}
.bb-post-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.bb-post-toast a { color: var(--amber); margin-left: 8px; font-weight: 700; text-decoration: none; }

/* ----- GIF picker modal ----- */
.bb-gif-picker-modal {
  position: fixed; inset: 0;
  background: rgba(8,10,14,0.85);
  z-index: 1002;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.bb-gif-picker {
  background: #11141a;
  border: 1px solid rgba(255,170,0,0.30);
  border-radius: 14px;
  width: min(640px, 100%);
  padding: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.65);
}
.bb-gif-picker-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.bb-gif-picker-head h3 {
  font-family: var(--font-display); font-weight: 900;
  font-size: 14px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text); margin: 0;
}
.bb-gif-picker-close {
  background: transparent; color: var(--muted);
  border: 0; font-size: 22px; cursor: pointer;
  padding: 4px 8px; border-radius: 6px;
}
.bb-gif-picker-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.bb-gif-picker-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font-sans);
  margin-bottom: 12px;
  outline: none;
}
.bb-gif-picker-input:focus { border-color: rgba(255,170,0,0.45); }
.bb-gif-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  min-height: 320px; max-height: 420px;
  overflow-y: auto;
}
.bb-gif-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  color: var(--muted); font-size: 13px;
}
.bb-gif-pick {
  background: transparent; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 0; overflow: hidden;
  cursor: pointer;
  transition: border-color 0.12s, transform 0.12s;
  aspect-ratio: 1;
}
.bb-gif-pick:hover { border-color: rgba(255,170,0,0.45); transform: scale(1.03); }
.bb-gif-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bb-gif-picker-foot {
  margin-top: 12px;
  text-align: right;
  color: var(--muted); font-size: 11px;
  font-style: italic;
}
