/* ==========================================================================
   Parlay Analyze – Panel & Button Styles
   Modeled after the Customize Build modal (buildLogic.css)
   ========================================================================== */

/* ── Analyze Button (temporarily disabled) ── */
.pf-btn-analyze {
  display: none !important;
}

/* Original styles (restore display when re-enabling)
.pf-btn-analyze {
  flex: 1;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(var(--theme-accent-rgb, 0, 211, 189), 0.45);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--theme-accent-bright, #00F5D4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  min-width: 80px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.pf-btn-analyze:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pf-btn-analyze:active {
  transform: scale(0.98);
}

.pf-btn-analyze svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

Sidebar compact
#your-parlay-column .pf-btn-analyze {
  padding: 12px 14px;
  font-size: 13px;
}
*/

/* ── Overlay ── */
.pa-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  background: rgba(3, 22, 37, 0.90);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pa-overlay.pa-active {
  opacity: 1;
  pointer-events: all;
}

/* Lock page scroll when modal is open */
body.pa-lock {
  overflow: hidden !important;
  overscroll-behavior: contain;
}

/* ── Modal Root (positioning wrapper) ── */
.pa-modal-root {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
  z-index: 2147483646;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pa-modal-root.pa-active {
  opacity: 1;
  pointer-events: all;
}

/* ── Panel ── */
.pa-panel {
  width: min(520px, 96vw);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  color: #e8ffe9;
  background: var(--theme-bg-base, #0a1628);
  border: 1px solid rgba(147, 130, 255, 0.22);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pa-active .pa-panel {
  transform: translateY(0);
}

@supports (height: 100dvh) {
  .pa-panel { max-height: calc(100dvh - 48px); }
}

/* ── Header ── */
.pa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  padding-right: 56px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.0));
  position: relative;
  flex-shrink: 0;
}

.pa-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.pa-header-title svg {
  flex-shrink: 0;
}

.pa-close {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #d6fffa;
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 18px;
  transition: background 0.15s ease;
}

.pa-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Body ── */
.pa-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Loading */
.pa-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 0;
  color: rgba(214, 255, 250, 0.6);
  font-size: 14px;
}

.pa-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(147, 130, 255, 0.2);
  border-top-color: #9382FF;
  border-radius: 50%;
  animation: pa-spin 0.8s linear infinite;
}

@keyframes pa-spin {
  to { transform: rotate(360deg); }
}

/* Error */
.pa-error {
  color: #ff6b6b;
  font-size: 14px;
  text-align: center;
  padding: 30px 0;
}

/* Legs summary */
.pa-legs {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(147, 130, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pa-leg {
  font-size: 13px;
  color: rgba(214, 255, 250, 0.7);
  line-height: 1.4;
}

.pa-leg-player {
  color: #fff;
  font-weight: 600;
}

.pa-leg-pick {
  color: var(--theme-accent-bright, #00F5D4);
}

.pa-leg-odds {
  color: rgba(214, 255, 250, 0.45);
  font-size: 12px;
}

/* Content */
.pa-content {
  color: rgba(214, 255, 250, 0.88);
  font-size: 14px;
  line-height: 1.7;
}

.pa-content p {
  margin: 0 0 14px;
}

.pa-content p:last-child {
  margin-bottom: 0;
}

/* ── Mobile (≤ 1000px) — match Customize Build modal scaling ── */
@media (max-width: 1000px) {

  /* Button */
  .pf-btn-analyze {
    padding: 18px 20px !important;
    font-size: 20px !important;
  }

  .pf-btn-analyze {
    gap: 8px !important;
  }

  .pf-btn-analyze svg {
    width: 24px !important;
    height: 24px !important;
  }

  /* Modal root */
  .pa-modal-root {
    padding: 12px 10px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .pa-panel {
    margin: 8px 0;
    width: min(980px, 96vw);
  }

  /* Header — larger text matching Customize */
  .pa-header {
    padding-right: 88px;
  }

  .pa-header-title {
    font-size: 36px;
    gap: 14px;
  }

  .pa-header-title svg {
    width: 40px;
    height: 40px;
  }

  .pa-close {
    top: 12px;
    right: 14px;
    width: 56px;
    height: 56px;
    font-size: 28px;
    border-radius: 30px;
    font-weight: bold;
  }

  /* Body — larger text */
  .pa-body {
    padding: 24px 20px;
  }

  .pa-loading {
    gap: 20px;
    padding: 50px 0;
    font-size: 24px;
  }

  .pa-spinner {
    width: 44px;
    height: 44px;
    border-width: 4px;
  }

  .pa-error {
    font-size: 24px;
    padding: 40px 0;
  }

  .pa-legs {
    padding-bottom: 20px;
    margin-bottom: 20px;
    gap: 10px;
  }

  .pa-leg {
    font-size: 20px;
  }

  .pa-leg-odds {
    font-size: 18px;
  }

  .pa-content {
    font-size: 22px;
    line-height: 1.65;
  }

  .pa-content p {
    margin: 0 0 20px;
  }
}
