/* webApp.css - Website-only additions to dashboard.css: the sign-in screen, the account chip, and hiding
   controls that only work inside the Chrome extension. */

/* The extension's own Settings button (the site has its Settings page) and Splash for non-premium accounts */
.web-app #btn-open-settings,
.web-app:not(.web-premium) #btn-sync-splash {
  display: none !important;
}

/* Controls that need the Chrome extension (webFeatures.js): shown dimmed with an "Extension" tag; a click explains
   why instead of doing nothing */
.web-app .web-ext-only,
.web-app .btn-quick-sync-odds,
.web-app .pick-4cx-btn,
.web-app .offer-match-best-btn {
  opacity: 0.55;
  cursor: help;
}
.web-ext-tag {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}
.source-item .web-ext-tag { margin-left: 2px; color: var(--text-muted); }

/* Settings: the website / extension table */
.ws-features { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.ws-features th { text-align: left; padding: 0 8px 6px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.ws-features td { padding: 9px 8px; border-top: 1px solid var(--border-subtle); vertical-align: top; color: var(--text-main); line-height: 1.45; }
.ws-features .ws-feature-name { font-weight: 700; }
.ws-features .ws-feature-note { color: var(--text-muted); }
.ws-feature-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; white-space: nowrap; }
.ws-feature-status[data-where="web"], .ws-feature-status[data-where="server"] { background: rgba(34, 197, 94, 0.14); color: #16a34a; }
.ws-feature-status[data-where="partial"] { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.ws-feature-status[data-where="extension"] { background: var(--surface-pill); color: var(--text-muted); }
@media (max-width: 600px) {
  .ws-features thead { display: none; }
  .ws-features tr { display: block; padding: 8px 0; border-top: 1px solid var(--border-subtle); }
  .ws-features td { display: block; border: 0; padding: 2px 0; }
}

/* Settings page (settings.html) */
.web-settings-card {
  width: 100%;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--surface-card-border);
  background: var(--surface-elevated);
  color: var(--text-main);
  box-sizing: border-box;
}
.web-settings-section {
  padding: 16px 0;
  border-top: 1px solid var(--border-subtle);
}
.web-settings-section:first-child { padding-top: 0; border-top: 0; }
.ws-source + .ws-source { margin-top: 18px; }
.ws-source .ws-handle .ws-remove { margin-left: auto; }
.web-settings-section h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}
.web-settings-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0;
  align-items: center;
}
.web-settings-facts dt { color: var(--text-muted); font-size: 0.85rem; }
.web-settings-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.web-settings-facts code { font-family: var(--font-mono); font-size: 0.82rem; }
/* The dashboard's phone layout stretches every .btn; on the page they keep their own size */
.ws-page .btn { width: auto; flex: 0 0 auto; }
.ws-copy { margin-left: 8px; padding: 2px 10px; font-size: 0.8rem; }
.ws-help, .ws-locked, .ws-empty { margin: 0 0 12px; color: var(--text-muted); line-height: 1.5; }
.ws-contest {
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-item);
}
.ws-contest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.ws-contest-name { color: var(--primary-light); font-weight: 600; overflow-wrap: anywhere; }
.ws-contest-players { display: flex; gap: 8px; }
.ws-contest-players .ws-input { flex: 1; min-width: 0; }
.ws-add { margin-top: 14px; }
.ws-handles { list-style: none; margin: 0 0 10px; padding: 0; }
.ws-handle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-item);
}
.ws-handle .ws-remove { margin-left: auto; }
.ws-handle-name { color: var(--text-muted); font-size: 0.85rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-sub { color: var(--text-dim); font-weight: 500; }
/* Game links: one checkbox per link */
.ws-checks {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.ws-checks legend { padding: 0; margin: 0 0 8px; }
.ws-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-item);
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
}
.ws-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary-light); }
.ws-check:has(input:focus-visible) { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.ws-check:has(input:not(:checked)) { color: var(--text-dim); }
.ws-add-title { font-weight: 600; margin-bottom: 8px; }
.ws-label { display: block; margin: 10px 0 4px; font-size: 0.85rem; color: var(--text-muted); }
.ws-hint { color: var(--text-dim); font-size: 0.78rem; }
.ws-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
  background: var(--surface-input);
  color: var(--text-main);
  font: inherit;
}
.ws-input:focus { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.ws-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ws-msg { margin: 12px 0 0; min-height: 1.2em; color: var(--text-muted); }
.ws-msg[data-tone="ok"] { color: #22c55e; }
.ws-msg[data-tone="warn"] { color: #f59e0b; }
.ws-msg[data-tone="error"] { color: #f87171; }

/* Dashboard sign-in screen (webApp.js): what the site does beside the sign-in card; one column on phones */
.web-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  overflow-y: auto;
  padding: 24px 16px;
  box-sizing: border-box;
  background: var(--bg-base);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  font-family: var(--font-main);
}
.web-gate[hidden] { display: none; }
html.web-gate-open, html.web-gate-open body { overflow: hidden; }
.web-gate-shell {
  margin: auto; /* centers, and scrolls instead of clipping when taller than the screen */
  width: 100%;
  max-width: 940px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 56px;
  align-items: center;
}
.web-gate-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
}
.web-gate-headline {
  margin: 28px 0 24px;
  max-width: 22ch;
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.web-gate-points {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.web-gate-points li {
  display: grid;
  gap: 2px;
  padding-left: 18px;
  border-left: 2px solid var(--border-focus);
}
.web-gate-points strong { font-size: 0.95rem; }
.web-gate-points span { color: var(--text-muted); font-size: 0.88rem; line-height: 1.45; }

.web-gate-card {
  padding: 32px 28px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-card-border);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-lg);
  box-sizing: border-box;
}
.web-gate-card h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.6rem;
}
.web-gate-sub {
  margin: 6px 0 22px;
  color: var(--text-muted);
  line-height: 1.5;
}
.web-gate-note {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-dim);
}
@media (max-width: 820px) {
  .web-gate-shell { grid-template-columns: minmax(0, 420px); justify-content: center; gap: 20px; }
  .web-gate-headline, .web-gate-points { display: none; }
  .web-gate-brand { text-align: center; }
}
@media (max-width: 480px) {
  .web-gate { padding: 16px; }
  .web-gate-card { padding: 24px 18px 20px; }
}

/* Sign-in panel (webSignIn.js): Google, or an email account. Also on the Free Picks, capper and members pages. */
.wsi { display: grid; gap: 14px; text-align: left; }
.wsi [hidden] { display: none !important; }
/* 18+ confirmation, needed before Google or email sign-in */
.wsi-age {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--surface-group);
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
  cursor: pointer;
}
.wsi-age strong { color: var(--text-main); }
.wsi .wsi-age input {
  flex: none;
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--primary-light);
  cursor: pointer;
}
.wsi-age:has(input[aria-invalid="true"]) { border-color: #f87171; background: rgba(239, 68, 68, 0.08); }
.wsi-age:has(input:checked) { border-color: var(--border-focus); }
.wsi-help { margin: 0; text-align: center; font-size: 0.75rem; color: var(--text-dim); }
.wsi-help a { color: inherit; font-weight: 600; }
/* Accounts that signed in before the 18+ box: confirm once, over whatever page they're on (webSignIn.js) */
.wsi-adult {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  overflow-y: auto;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(2, 6, 16, 0.72);
  backdrop-filter: blur(6px);
  font-family: var(--font-main);
}
html.wsi-adult-open, html.wsi-adult-open body { overflow: hidden; }
.wsi-adult-card {
  margin: auto;
  width: 100%;
  max-width: 400px;
  padding: 28px 24px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-card-border);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-lg);
  box-sizing: border-box;
  color: var(--text-main);
}
.wsi-adult-card h2 { margin: 0 0 6px; font-family: var(--font-heading); font-size: 1.35rem; }
.wsi-adult-card > .wsi-hint { margin-bottom: 18px; font-size: 0.85rem; }
.wsi-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--surface-input);
  color: var(--text-main);
  font: 600 0.95rem var(--font-main);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.wsi-google:hover:not(:disabled) { border-color: var(--border-focus); background: var(--surface-input-focus); }
.wsi-g { width: 18px; height: 18px; flex: none; }
.wsi-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.78rem;
}
.wsi-or::before, .wsi-or::after { content: ''; flex: 1; height: 1px; background: var(--border-subtle); }
.wsi-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface-group);
}
.wsi-mode {
  min-height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font: 600 0.88rem var(--font-main);
  cursor: pointer;
}
.wsi-mode:hover:not(:disabled) { color: var(--text-main); }
.wsi-mode[aria-pressed="true"] { background: var(--surface-elevated); color: var(--text-main); box-shadow: var(--shadow-sm); }
.wsi-form { display: grid; gap: 14px; }
.wsi-title { margin: 0 0 4px; font-size: 1.05rem; }
.wsi-field { display: grid; gap: 6px; }
.wsi-field label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.wsi-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wsi input {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--surface-input);
  color: var(--text-main);
  font: 16px var(--font-main); /* 16px: phones don't zoom in on focus */
}
.wsi input:focus { outline: 2px solid var(--border-focus); outline-offset: 1px; border-color: var(--border-focus); }
.wsi input[aria-invalid="true"] { border-color: #f87171; }
.wsi-pass { position: relative; }
.wsi-pass input { padding-right: 68px; }
.wsi-show {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-muted);
  font: 600 0.8rem var(--font-main);
  cursor: pointer;
}
.wsi-show:hover:not(:disabled) { color: var(--text-main); background: var(--surface-pill-hover); }
.wsi-hint { margin: 0; font-size: 0.78rem; line-height: 1.45; color: var(--text-dim); }
.wsi-submit { width: 100%; min-height: 44px; font-size: 0.95rem; }
.wsi-submit:disabled, .wsi-google:disabled { opacity: 0.65; cursor: progress; transform: none; }
.wsi-link {
  justify-self: center;
  padding: 2px 0;
  border: 0;
  background: none;
  color: #a5b4fc;
  font: 600 0.8rem var(--font-main);
  cursor: pointer;
}
.wsi-link:hover:not(:disabled) { text-decoration: underline; }
.wsi-msg {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  font-size: 0.85rem;
  line-height: 1.45;
}
.wsi-msg[data-tone="ok"] { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.1); color: #6ee7b7; }
body.light-mode .wsi-link { color: #4338ca; }
body.light-mode .wsi-msg { color: #b91c1c; }
body.light-mode .wsi-msg[data-tone="ok"] { color: #047857; }
.wsi button:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }

.web-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.web-account[hidden] { display: none; }
.web-account .btn[hidden] { display: none !important; }
.web-account-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.85rem;
}
@media (max-width: 600px) {
  .web-account-name { display: none; }
}

/* No (or only old) odds from the extension for this account */
.web-odds-notice {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
  color: var(--text-main);
  font-size: 0.9rem;
  line-height: 1.5;
}
.web-odds-notice[hidden] { display: none; }
.web-odds-notice strong { color: #b45309; }
.web-app:not(.light-mode) .web-odds-notice strong { color: #f59e0b; }
