/* BGP Quinella -- scoped styles
 * All rules are prefixed with #bgp-quinella-app and use higher specificity
 * / !important on layout-critical properties (padding, gap, display) so the
 * active WordPress theme's button/link resets can't collapse them.
 */

/* -- Reset / wrapper --------------------------------------------------------- */
#bgp-quinella-app *,
#bgp-quinella-app *::before,
#bgp-quinella-app *::after { box-sizing: border-box; margin: 0; padding: 0; }

#bgp-quinella-app {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: #1a1a1a;
  line-height: 1.5;
}

#bgp-quinella-app .bgp-wrap { max-width: 640px; margin: 0 auto; padding: 1rem; }

/* -- Header ------------------------------------------------------------------ */
#bgp-quinella-app .bgp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 12px;
  flex-wrap: wrap;
}
#bgp-quinella-app .bgp-store-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 3px;
}
#bgp-quinella-app .bgp-title {
  font-size: 22px;
  font-weight: 700;
  color: #111;
}
#bgp-quinella-app .bgp-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-top: 4px;
  flex-wrap: wrap;
}
#bgp-quinella-app .bgp-badge {
  font-size: 12px;
  background: #eaf3de;
  color: #3b6d11;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
}
#bgp-quinella-app .bgp-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #444;
}
#bgp-quinella-app .bgp-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
#bgp-quinella-app .bgp-logout-link {
  font-size: 12px;
  color: #999;
  text-decoration: underline;
  margin-left: 2px;
}

/* -- Tabs (hardened against theme button/link resets) ------------------------ */
#bgp-quinella-app .bgp-tabs {
  display: flex !important;
  align-items: center;
  gap: 4px !important;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 1.5rem !important;
  flex-wrap: wrap;
}
#bgp-quinella-app button.bgp-tab {
  display: inline-flex !important;
  align-items: center;
  background: none !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  padding: 11px 18px !important;
  margin: 0 0 -1px 0 !important;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 500;
  color: #777;
  font-family: inherit;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  box-shadow: none !important;
}
#bgp-quinella-app button.bgp-tab:hover { color: #333; }
#bgp-quinella-app button.bgp-tab.on {
  border-bottom-color: #1a1a1a !important;
  color: #1a1a1a;
  font-weight: 700;
}

/* -- Cards --------------------------------------------------------------- */
#bgp-quinella-app .bgp-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

/* -- Match card ----------------------------------------------------------- */
#bgp-quinella-app .bgp-match-meta {
  font-size: 12px;
  color: #777;
  margin-bottom: 14px;
}
#bgp-quinella-app .bgp-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
}
#bgp-quinella-app .bgp-team { text-align: center; flex: 1; }
#bgp-quinella-app .bgp-flag { font-size: 44px; line-height: 1; margin-bottom: 6px; }
#bgp-quinella-app .bgp-tname { font-size: 16px; font-weight: 700; }
#bgp-quinella-app .bgp-vs { font-size: 13px; color: #aaa; font-weight: 700; padding: 0 10px; }
#bgp-quinella-app .bgp-result-bar {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  background: #eaf3de;
  color: #0f6e56;
  padding: 9px 16px;
  border-radius: 8px;
}
#bgp-quinella-app .bgp-live-tag {
  background: #faeeda;
  color: #ba7517;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  white-space: nowrap;
}
#bgp-quinella-app .bgp-lock-note {
  font-size: 11px;
  color: #bbb;
  text-align: center;
  margin-top: 10px;
}

/* -- Inline auth (register / login) --------------------------------------- */
#bgp-quinella-app .bgp-auth-card { text-align: center; padding: 2rem 1.5rem; }
#bgp-quinella-app .bgp-auth-icon { font-size: 38px; margin-bottom: 10px; }
#bgp-quinella-app .bgp-auth-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
#bgp-quinella-app .bgp-auth-sub   { color: #666; font-size: 13.5px; margin-bottom: 18px; line-height: 1.5; }
#bgp-quinella-app .bgp-auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  max-width: 320px;
  margin: 0 auto;
}
#bgp-quinella-app .bgp-auth-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14.5px;
  font-family: inherit;
}
#bgp-quinella-app .bgp-auth-form input:focus {
  outline: none;
  border-color: #1d9e75;
  box-shadow: 0 0 0 3px rgba(29,158,117,.12);
}
#bgp-quinella-app .bgp-auth-toggle { font-size: 13px; color: #888; margin-top: 16px; }
#bgp-quinella-app .bgp-auth-toggle a { color: #1d9e75; font-weight: 600; text-decoration: none; }
#bgp-quinella-app .bgp-auth-toggle a:hover { text-decoration: underline; }
#bgp-quinella-app .bgp-login-note { font-size: 12px; color: #aaa; margin-top: 14px; }

/* -- Already predicted ------------------------------------------------------ */
#bgp-quinella-app .bgp-predicted { text-align: center; padding: 1.5rem; }
#bgp-quinella-app .bgp-predicted-check {
  width: 44px; height: 44px;
  background: #e1f5ee;
  color: #0f6e56;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
#bgp-quinella-app .bgp-predicted p  { color: #444; margin-top: 6px; }
#bgp-quinella-app .bgp-result-line  { color: #1d9e75; font-weight: 700; }
#bgp-quinella-app .bgp-waiting      { color: #888; }
#bgp-quinella-app .bgp-pts-earned   { color: #1d9e75; font-size: 18px; }

/* -- Prediction form -------------------------------------------------------- */
#bgp-quinella-app .bgp-form-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
#bgp-quinella-app .bgp-pts-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
#bgp-quinella-app .bgp-pts-tile   { padding: 10px 12px; border-radius: 8px; border: 1px solid #e8e8e8; background: #fafafa; }
#bgp-quinella-app .bgp-pts-tile.bgp-pts-hi { border-color: #9fe1cb; background: #f0fbf7; }
#bgp-quinella-app .bgp-pts-num    { font-size: 20px; font-weight: 700; color: #1d9e75; margin-bottom: 2px; }
#bgp-quinella-app .bgp-pts-desc   { font-size: 12px; color: #666; }
#bgp-quinella-app .bgp-field-label { font-size: 13px; color: #555; margin-bottom: 9px; }
#bgp-quinella-app .bgp-optional    { color: #aaa; font-size: 12px; }

#bgp-quinella-app .bgp-picks {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
#bgp-quinella-app button.bgp-pick {
  padding: 13px 8px !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 10px !important;
  cursor: pointer;
  background: #fafafa !important;
  text-align: center;
  font-family: inherit;
  transition: border-color .1s, background .1s;
  box-shadow: none !important;
}
#bgp-quinella-app button.bgp-pick:hover  { border-color: #bbb !important; }
#bgp-quinella-app button.bgp-pick.sel    { border: 2px solid #1d9e75 !important; background: #e1f5ee !important; color: #0f6e56; }
#bgp-quinella-app .bgp-pick-icon   { font-size: 26px; line-height: 1; margin-bottom: 5px; }
#bgp-quinella-app .bgp-pick-lbl    { font-size: 13px; }
#bgp-quinella-app button.bgp-pick.sel .bgp-pick-lbl { font-weight: 700; }

#bgp-quinella-app .bgp-score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: #fafafa;
  border-radius: 8px;
  margin-bottom: 14px;
}
#bgp-quinella-app .bgp-sc-lbl { font-size: 11px; color: #888; text-align: center; margin-bottom: 4px; }
#bgp-quinella-app .bgp-sc-inp {
  width: 56px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  padding: 6px 4px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  display: block;
}
#bgp-quinella-app .bgp-sc-sep { font-size: 22px; color: #aaa; font-weight: 700; }

#bgp-quinella-app button.bgp-submit-btn {
  width: 100% !important;
  padding: 12px !important;
  background: #1d9e75 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
  box-shadow: none !important;
}
#bgp-quinella-app button.bgp-submit-btn:hover:not(:disabled) { background: #178a65 !important; }
#bgp-quinella-app button.bgp-submit-btn:disabled { opacity: .45; cursor: default; }

#bgp-quinella-app .bgp-msg { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-top: 4px; }
#bgp-quinella-app .bgp-ok  { background: #e1f5ee; color: #0f6e56; }
#bgp-quinella-app .bgp-err { background: #fcebeb; color: #a32d2d; }

#bgp-quinella-app .bgp-hints {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: #aaa;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* -- Schedule -------------------------------------------------------------- */
#bgp-quinella-app .bgp-filter-row {
  display: flex !important;
  gap: 8px !important;
  margin-bottom: 1.25rem !important;
  flex-wrap: wrap;
}
#bgp-quinella-app button.bgp-f-btn {
  padding: 7px 16px !important;
  font-size: 13px;
  border: 1px solid #e0e0e0 !important;
  border-radius: 99px !important;
  background: #fff !important;
  cursor: pointer;
  font-family: inherit;
  color: #666;
  font-weight: 500;
  transition: background .12s, border-color .12s, color .12s;
  box-shadow: none !important;
}
#bgp-quinella-app button.bgp-f-btn:hover { border-color: #ccc !important; }
#bgp-quinella-app button.bgp-f-btn.on {
  background: #1a1a1a !important;
  color: #fff !important;
  border-color: #1a1a1a !important;
  font-weight: 700;
}

#bgp-quinella-app .bgp-date-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 18px 0 10px;
}
#bgp-quinella-app .bgp-date-hdr:first-child { padding-top: 0; }
#bgp-quinella-app .bgp-date-hdr.today { color: #1d9e75; }
#bgp-quinella-app .bgp-date-line { flex: 1; height: 1px; background: #ececec; }

#bgp-quinella-app .bgp-srow {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 6px;
  gap: 10px;
  border: 1px solid #ececec;
  background: #fff;
  transition: transform .12s, box-shadow .12s;
}
#bgp-quinella-app .bgp-srow--done {
  background: #fbfbfb;
  border-color: #f0f0f0;
}
#bgp-quinella-app .bgp-srow--upcoming {
  background: #fff;
  border-color: #e8e8e8;
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
#bgp-quinella-app .bgp-srow--upcoming:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,.06);
  transform: translateY(-1px);
}
#bgp-quinella-app .bgp-srow--live {
  background: #fff8ec;
  border-color: #fac775;
  box-shadow: 0 1px 6px rgba(250,199,117,.25);
}

#bgp-quinella-app .bgp-side     { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
#bgp-quinella-app .bgp-side--r  { flex-direction: row-reverse; }
#bgp-quinella-app .bgp-sflag    { font-size: 21px; flex-shrink: 0; }
#bgp-quinella-app .bgp-sname    { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #333; }
#bgp-quinella-app .bgp-sname.winner { font-weight: 700; color: #1d9e75; }
#bgp-quinella-app .bgp-sname.loser  { color: #b3b3b3; }

#bgp-quinella-app .bgp-smid  { min-width: 78px; text-align: center; flex-shrink: 0; }
#bgp-quinella-app .bgp-score { font-size: 15px; font-weight: 700; color: #222; }
#bgp-quinella-app .bgp-time-pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  color: #5b6b80;
  background: #eef2f7;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
}
#bgp-quinella-app .bgp-live  {
  font-size: 11px;
  font-weight: 700;
  background: #fac775;
  color: #5c3a06;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: .03em;
}

#bgp-quinella-app .bgp-grp {
  font-size: 10px;
  font-weight: 600;
  color: #aaa;
  background: #f3f3f3;
  padding: 3px 8px;
  border-radius: 99px;
  flex-shrink: 0;
  white-space: nowrap;
}
#bgp-quinella-app .bgp-srow--live .bgp-grp { background: #fde9c6; color: #8a5a0a; }
#bgp-quinella-app .bgp-schedule-note { font-size: 11px; color: #bbb; text-align: center; margin-top: 14px; }

/* -- Leaderboard ----------------------------------------------------------- */
#bgp-quinella-app .bgp-lb { display: flex; flex-direction: column; gap: 8px; }
#bgp-quinella-app .bgp-lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
}
#bgp-quinella-app .bgp-lb-medal { width: 26px; text-align: center; font-size: 16px; flex-shrink: 0; }
#bgp-quinella-app .bgp-lb-info  { flex: 1; min-width: 0; }
#bgp-quinella-app .bgp-lb-name  { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bgp-quinella-app .bgp-lb-sub   { font-size: 12px; color: #888; }
#bgp-quinella-app .bgp-lb-pts   { text-align: right; flex-shrink: 0; }
#bgp-quinella-app .bgp-lb-pts-num { font-size: 16px; font-weight: 700; color: #1d9e75; }
#bgp-quinella-app .bgp-lb-credit  { font-size: 12px; color: #aaa; }

/* -- Misc -------------------------------------------------------------------- */
#bgp-quinella-app .bgp-loading,
#bgp-quinella-app .bgp-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #999;
  font-size: 14px;
  line-height: 1.8;
}

/* -- Responsive --------------------------------------------------------------- */
@media (max-width: 480px) {
  #bgp-quinella-app .bgp-pts-grid { grid-template-columns: 1fr 1fr; }
  #bgp-quinella-app .bgp-picks    { gap: 6px; }
  #bgp-quinella-app button.bgp-pick { padding: 10px 4px !important; }
  #bgp-quinella-app .bgp-pick-icon { font-size: 22px; }
  #bgp-quinella-app .bgp-header-right { flex-direction: column; align-items: flex-end; gap: 4px; }
  #bgp-quinella-app .bgp-hints { gap: 8px; }
  #bgp-quinella-app button.bgp-tab { padding: 10px 12px !important; font-size: 13.5px; }
}
