/* Betting Tips UI voting variant: all selectors are scoped; original shortcode is untouched. */
.btp-wrap-voting .btp-tip {
  flex-direction: column;
  gap: 4px;
  padding-top: 5px;
  padding-bottom: 5px;
}
.btp-wrap-voting .btp-vote { box-sizing: border-box; color: #283542; }
.btp-wrap-voting .btp-vote *, .btp-wrap-voting .btp-vote *::before { box-sizing: border-box; }
.btp-wrap-voting .btp-vote-actions { display: flex; align-items: center; justify-content: center; gap: 6px; }
.btp-wrap-voting .btp-vote-button {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; justify-content: center; align-items: center; gap: 5px;
  margin: 0; font-family: inherit; line-height: 1.2;
  cursor: pointer; transition: background-color .15s, border-color .15s;
  border: 2px solid transparent; color: #4f5b66; background: #fff;
}
.btp-wrap-voting .btp-vote-button svg { display: block; width: 15px; height: 15px; flex: 0 0 auto; }
.btp-wrap-voting .btp-vote-button b { font: inherit; font-weight: 800; font-variant-numeric: tabular-nums; }
/* v1.4.3: Keep both choices clearly colour-coded before and after voting. */
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="agree"] {
  border-color: #078249;
  color: #006b34;
}
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="disagree"] {
  border-color: #c83748;
  color: #a51e32;
}
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="agree"]:hover:not(:disabled):not(.is-selected) {
  background: #eef8f1;
  border-color: #006b34;
}
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="disagree"]:hover:not(:disabled):not(.is-selected) {
  background: #fff1f2;
  border-color: #b42336;
}
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="agree"].is-selected { background: #e1f5e8; border-color: #078249; color: #005f34; box-shadow: inset 0 0 0 1px #078249; }
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="disagree"].is-selected { background: #fdebed; border-color: #c83748; color: #a51e32; box-shadow: inset 0 0 0 1px #c83748; }
.btp-wrap-voting .btp-vote-button:focus-visible { outline: 2px solid #007b45; outline-offset: 2px; }
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="disagree"]:focus-visible { outline-color: #c83748; }
.btp-wrap-voting .btp-vote-button:disabled { cursor: default; opacity: .65; }
.btp-wrap-voting .btp-vote-desktop .btp-vote-button {
  min-width: 38px; height: 24px; border-radius: 6px; padding: 2px 5px;
  font-size: 11px; font-weight: 800;
}
.btp-wrap-voting .btp-vote-desktop .btp-vote-status { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btp-wrap-voting .btp-vote-mobile {
  margin-top: 12px; padding: 12px 5px 2px;
  border-top: 1px solid #e5ebe7;
}
.btp-wrap-voting .btp-vote-heading { font-size: 12px; line-height: 1.3; font-weight: 800; margin-bottom: 9px; color: #283542; }
.btp-wrap-voting .btp-vote-mobile .btp-vote-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.btp-wrap-voting .btp-vote-mobile .btp-vote-button {
  width: 100%; min-height: 36px; padding: 7px 8px; border-radius: 9px;
  font-size: 12px; font-weight: 750;
}
.btp-wrap-voting .btp-vote-summary { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; color: #687482; }
.btp-wrap-voting .btp-vote-summary small { font-size: 10px; line-height: 1.4; }
.btp-wrap-voting .btp-vote-progress { height: 4px; border-radius: 99px; overflow: hidden; background: #d7dce0; margin-top: 4px; }
.btp-wrap-voting .btp-vote-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: #008250; transition: width .2s; }
.btp-wrap-voting .btp-vote-mobile .btp-vote-status { min-height: 0; font-size: 10px; color: #52645a; margin-top: 5px; line-height: 1.3; }
.btp-wrap-voting .btp-vote-mobile .btp-vote-status:empty { display: none; }
@media (max-width: 820px) {
  .btp-wrap-voting .btp-vote-mobile { width: 100%; }
  .btp-wrap-voting .btp-vote-desktop { display: none; }
}
@media (max-width: 370px) {
  .btp-wrap-voting .btp-vote-mobile { padding-left: 0; padding-right: 0; }
  .btp-wrap-voting .btp-vote-mobile .btp-vote-button { font-size: 11px; }
}

/* v1.4.1: extra community filters, scoped to voting shortcode only. */
.btp-wrap-voting .btp-community-filter-pill { min-width: 124px; }
.btp-wrap-voting .btp-community-filter-icon { width: 16px; height: 16px; }
.btp-wrap-voting .btp-community-filter-pill.is-active .btp-community-filter-icon { color: #fff; }
.btp-wrap-voting .btp-community-status {
  border-radius: 10px; padding: 9px 12px; background: #f1f7f3;
  color: #425849; font-size: 12px; font-weight: 650; line-height: 1.4;
}
.btp-wrap-voting .btp-community-status[hidden] { display: none !important; }
@media (max-width: 820px) {
  .btp-wrap-voting .btp-confidence-filter-row {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px; overflow: visible; padding-right: 0 !important;
  }
  .btp-wrap-voting .btp-confidence-filter-row .btp-filter-pill,
  .btp-wrap-voting .btp-confidence-filter-row .btp-filter-pill-all {
    width: 100%; min-width: 0; min-height: 48px;
    padding: 6px 4px; border-radius: 11px; gap: 3px;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.06);
  }
  .btp-wrap-voting .btp-confidence-filter-row .btp-filter-text { gap: 2px; min-width: 0; }
  .btp-wrap-voting .btp-confidence-filter-row .btp-filter-text strong {
    font-size: 11px; line-height: 1.13; white-space: normal;
  }
  .btp-wrap-voting .btp-confidence-filter-row .btp-filter-text small {
    font-size: 10px; line-height: 1.1; white-space: normal;
  }
  .btp-wrap-voting .btp-community-filter-icon { width: 13px; height: 13px; }
  .btp-wrap-voting .btp-community-filter-pill { gap: 3px; }
  .btp-wrap-voting .btp-confidence-filter-row .btp-filter-pill.is-active::after { display: none; }
}

/* v1.4.2: Only the voting shortcode's offscreen mobile cards are deferred.
   The native desktop table and both HTML layouts are preserved unchanged. */
@supports (content-visibility: auto) {
  @media (max-width: 560px) {
    .btp-wrap-voting .btp-mobile-event[data-btp-event]:not([hidden]) {
      content-visibility: auto;
      contain-intrinsic-block-size: auto 330px;
    }
  }
  @media (min-width: 561px) and (max-width: 820px) {
    .btp-wrap-voting .btp-mobile-event[data-btp-event]:not([hidden]) {
      content-visibility: auto;
      contain-intrinsic-block-size: auto 350px;
    }
  }
}

/* v1.5.0 experimental progressive loading: no changes to cards/table. */
.btp-wrap-async .btp-async-progress {
  font-size: 12px;
  color: #5f6875;
  margin: 12px 0 4px;
}
.btp-wrap-async .btp-async-retry {
  display: inline-block;
  margin: 8px 0;
  padding: 7px 13px;
  border: 2px solid #006b34;
  border-radius: 8px;
  background: #fff;
  color: #006b34;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.btp-wrap-async .btp-async-retry[hidden],
.btp-wrap-async .btp-async-progress[hidden] { display: none !important; }

/* v1.5.4: tactile vote feedback; no card movement, only the tapped control. */
.btp-wrap-voting .btp-vote-button:not(:disabled) {
  transition:background-color .15s, border-color .15s, transform .14s ease-out;
}
.btp-wrap-voting .btp-vote-button:active:not(:disabled) {transform:scale(.98);}
@media (max-width:820px) {
  .btp-wrap-voting .btp-vote-mobile .btp-vote-button:active:not(:disabled) {transform:scale(.97);}
}
@keyframes btpVoteConfirmPop {
  0% {transform:scale(1);}
  36% {transform:scale(1.055);}
  68% {transform:scale(.987);}
  100% {transform:scale(1);}
}
@keyframes btpVoteConfirmGlow {
  0% {opacity:.65; transform:scale(1);}
  100% {opacity:0; transform:scale(1.11);}
}
@keyframes btpVoteConfirmCount {
  0% {transform:scale(1);}
  45% {transform:scale(1.24);}
  100% {transform:scale(1);}
}
.btp-wrap-voting .btp-vote-button.btp-vote-confirmed {
  position:relative; isolation:isolate; animation:btpVoteConfirmPop 300ms ease-out;
}
.btp-wrap-voting .btp-vote-button.btp-vote-confirmed::after {
  content:""; position:absolute; inset:-4px; border:2px solid currentColor;
  border-radius:inherit; pointer-events:none; animation:btpVoteConfirmGlow 390ms ease-out forwards;
}
.btp-wrap-voting .btp-vote-button.btp-vote-confirmed b {
  display:inline-block; animation:btpVoteConfirmCount 290ms ease-out;
}
@media (max-width:820px) {
  .btp-wrap-voting .btp-vote-mobile .btp-vote-button.btp-vote-confirmed {animation-duration:340ms;}
  .btp-wrap-voting .btp-vote-mobile .btp-vote-button.btp-vote-confirmed svg {
    animation:btpVoteConfirmCount 320ms ease-out;
  }
}
@media (prefers-reduced-motion:reduce) {
  .btp-wrap-voting .btp-vote-button.btp-vote-confirmed,
  .btp-wrap-voting .btp-vote-button.btp-vote-confirmed::after,
  .btp-wrap-voting .btp-vote-button.btp-vote-confirmed b,
  .btp-wrap-voting .btp-vote-button.btp-vote-confirmed svg {animation:none !important;}
  .btp-wrap-voting .btp-vote-button:active:not(:disabled) {transform:none !important;}
}

/* v1.5.5: Preserve the vivid selection while a vote is being saved. */
.btp-wrap-voting .btp-vote-button.is-vote-pending:disabled {
  opacity: 1;
  cursor: progress;
}

/* v1.5.10: Vote-count-based visual prominence (each side is independent).
 * The 0-vote appearance, dimensions, optimistic voting and animation code
 * remain unchanged. Theme hover/selected rules must not override a tier. */
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="agree"][data-btp-vote-tier="1"] {
  --btp-tier-bg: #f2faf5;
  --btp-tier-border: #2c9c64;
  --btp-tier-color: #006b34;
}
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="agree"][data-btp-vote-tier="3"] {
  --btp-tier-bg: #e7f5ec;
  --btp-tier-border: #078c50;
  --btp-tier-color: #006433;
}
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="agree"][data-btp-vote-tier="5"] {
  --btp-tier-bg: #d0edda;
  --btp-tier-border: #087f49;
  --btp-tier-color: #005a30;
}
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="agree"][data-btp-vote-tier="8"] {
  --btp-tier-bg: #00824c;
  --btp-tier-border: #00693c;
  --btp-tier-color: #fff;
  --btp-tier-shadow: inset 0 1px 0 rgba(255,255,255,.13);
}
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="disagree"][data-btp-vote-tier="1"] {
  --btp-tier-bg: #fff5f6;
  --btp-tier-border: #db5864;
  --btp-tier-color: #a51e32;
}
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="disagree"][data-btp-vote-tier="3"] {
  --btp-tier-bg: #ffebee;
  --btp-tier-border: #ce3448;
  --btp-tier-color: #a51e32;
}
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="disagree"][data-btp-vote-tier="5"] {
  --btp-tier-bg: #ffd9df;
  --btp-tier-border: #c72c42;
  --btp-tier-color: #9d1830;
}
.btp-wrap-voting .btp-vote-button[data-btp-vote-choice="disagree"][data-btp-vote-tier="8"] {
  --btp-tier-bg: #d62840;
  --btp-tier-border: #b51c33;
  --btp-tier-color: #fff;
  --btp-tier-shadow: inset 0 1px 0 rgba(255,255,255,.13);
}
/* Gold is earned separately by each choice, at 10 and at 20 votes. */
.btp-wrap-voting .btp-vote-button[data-btp-vote-tier="10"] {
  --btp-tier-bg: linear-gradient(135deg, #fff0b3 0%, #f8d16b 42%, #ecb52e 100%);
  --btp-tier-border: #d99a10;
  --btp-tier-color: #573800;
  --btp-tier-shadow: inset 0 1px 0 rgba(255,255,255,.73), 0 1px 3px rgba(154,105,0,.12);
}
.btp-wrap-voting .btp-vote-button[data-btp-vote-tier="20"] {
  --btp-tier-bg: linear-gradient(135deg, #ffefa0 0%, #f7ce58 37%, #d89a09 100%);
  --btp-tier-border: #b77a00;
  --btp-tier-color: #472b00;
  --btp-tier-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 1px 5px rgba(154,105,0,.20);
}
/* High specificity keeps the tier visible on hover and while selected. */
.btp-wrap-voting .btp-vote .btp-vote-button[data-btp-vote-choice][data-btp-vote-tier]:not([data-btp-vote-tier="0"]) {
  background: var(--btp-tier-bg);
  border-color: var(--btp-tier-border);
  color: var(--btp-tier-color);
  box-shadow: var(--btp-tier-shadow, none);
}
/* Selection indicates this visitor's choice, not a popularity milestone. */
.btp-wrap-voting .btp-vote .btp-vote-button.is-selected[data-btp-vote-choice][data-btp-vote-tier]:not([data-btp-vote-tier="0"]) {
  box-shadow: inset 0 0 0 1px currentColor, var(--btp-tier-shadow, none);
}
.btp-wrap-voting .btp-vote .btp-vote-button.is-selected[data-btp-vote-choice="agree"][data-btp-vote-tier="10"],
.btp-wrap-voting .btp-vote .btp-vote-button.is-selected[data-btp-vote-choice="agree"][data-btp-vote-tier="20"] {
  box-shadow: inset 0 0 0 2px #09653a, var(--btp-tier-shadow);
}
.btp-wrap-voting .btp-vote .btp-vote-button.is-selected[data-btp-vote-choice="disagree"][data-btp-vote-tier="10"],
.btp-wrap-voting .btp-vote .btp-vote-button.is-selected[data-btp-vote-choice="disagree"][data-btp-vote-tier="20"] {
  box-shadow: inset 0 0 0 2px #a92b3b, var(--btp-tier-shadow);
}
/* Gold shadow is slightly stronger on mobile, but never changes layout. */
@media (max-width:820px) {
  .btp-wrap-voting .btp-vote-mobile .btp-vote-button[data-btp-vote-tier="10"] {
    --btp-tier-shadow: inset 0 1px 0 rgba(255,255,255,.73), 0 2px 6px rgba(154,105,0,.16);
  }
  .btp-wrap-voting .btp-vote-mobile .btp-vote-button[data-btp-vote-tier="20"] {
    --btp-tier-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 2px 8px rgba(154,105,0,.22);
  }
}
