/* v49 — fixture fit, custom league flags, preseason viewer, final screen polish */

/* Real flag picker replaces the unreliable native Windows select rendering. */
#leagueSelect.v49NativeLeagueSelect{
  position:absolute!important;
  width:1px!important;height:1px!important;
  opacity:0!important;pointer-events:none!important;
  margin:0!important;padding:0!important;
}
.v49LeaguePicker{position:relative;width:100%;z-index:15}
.v49LeagueButton{width:100%;height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 13px;border:1px solid #bed4e6;border-radius:12px;background:#fff;color:#173653;box-shadow:none;font-size:12px;font-weight:900}
.v49LeagueButton:disabled{opacity:.62;cursor:not-allowed;background:#edf3f8}
.v49LeagueCurrent{display:flex;align-items:center;min-width:0;gap:9px}
.v49LeagueCurrent svg,.v49LeagueOption svg{width:25px;height:17px;flex:0 0 25px;border-radius:2px;box-shadow:0 0 0 1px rgba(25,53,77,.16)}
.v49LeagueCurrent span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v49LeagueChevron{font-size:13px;color:#6c8498}
.v49LeagueMenu{position:absolute;left:0;right:0;top:calc(100% + 5px);display:none;padding:5px;border:1px solid #bfd3e4;border-radius:12px;background:#fff;box-shadow:0 18px 42px rgba(19,48,73,.2);z-index:2147481000}
.v49LeaguePicker.open .v49LeagueMenu{display:grid;gap:3px}
.v49LeagueOption{display:flex;align-items:center;gap:9px;width:100%;min-height:38px;padding:7px 9px;border-radius:8px;border:0;background:transparent;color:#173653;box-shadow:none;text-align:left;font-size:12px;font-weight:800}
.v49LeagueOption:hover,.v49LeagueOption.active{background:#e8f3ff;color:#0d5ea8}

/* Keep every weekly fixture visible at 100% browser zoom. */
@media(min-width:1181px){
  .compactOddsPanel #fixtures{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-rows:var(--v49FixtureRowHeight,36px)!important;
    gap:2px!important;
    height:auto!important;max-height:none!important;
    overflow:visible!important;
    align-content:start!important;
  }
  .compactOddsPanel #fixtures>.compactFixture{
    position:relative!important;
    height:var(--v49FixtureRowHeight,36px)!important;
    min-height:var(--v49FixtureRowHeight,36px)!important;
    max-height:var(--v49FixtureRowHeight,36px)!important;
    display:grid!important;
    grid-template-rows:minmax(15px,48%) minmax(15px,48%)!important;
    gap:1px!important;
    padding:1px 4px!important;
    overflow:hidden!important;
  }
  .compactFixtureMain{height:auto!important;min-height:0!important;grid-template-columns:minmax(0,1fr) 50px!important}
  .compactFixtureTeams{position:relative!important;height:auto!important;min-height:0!important;line-height:1!important;overflow:hidden!important}
  .compactFixture.hasPersonalBet .compactFixtureTeams{padding-left:13px!important}
  .compactFixtureTeams .couponStar{position:absolute!important;left:0!important;top:50%!important;transform:translateY(-50%)!important;width:11px!important;margin:0!important;font-size:9px!important;line-height:1!important;z-index:2}
  .compactFixtureTeams .matchLine{width:100%!important;min-width:0!important;overflow:hidden!important}
  .compactFixtureTeams .clubChip{min-width:0!important;overflow:hidden!important}
  .compactFixtureTeams .clubText{display:block!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:8.6px!important}
  .compactFixtureTeams .teamLogo{width:14px!important;height:14px!important;min-width:14px!important;flex:0 0 14px!important}
  .compactDetailBtn{width:50px!important;min-width:50px!important;height:15px!important;min-height:15px!important;font-size:6.6px!important;padding:0 2px!important}
  .compactOdds3{height:auto!important;min-height:0!important;gap:2px!important}
  .compactOdds3 .odd{height:15px!important;min-height:15px!important;padding:0 3px!important}
  .compactOdds3 .odd b,.compactOdds3 .odd span{font-size:6.8px!important}
}

/* Strong running lock. */
#simulateBtn.v49WeekLocked{opacity:.45!important;filter:grayscale(.2)!important;cursor:not-allowed!important;pointer-events:none!important}

/* Independent season-preseason review window. */
.v49PreseasonOverlay{position:fixed;inset:0;z-index:2147483200;display:none;align-items:center;justify-content:center;padding:16px;background:rgba(13,31,50,.68);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.v49PreseasonOverlay.show{display:flex}
.v49PreseasonDialog{width:min(950px,100%);max-height:92dvh;display:flex;flex-direction:column;overflow:hidden;border:1px solid #bed1e1;border-radius:20px;background:#f7fafc;color:#17344f;box-shadow:0 28px 85px rgba(4,26,46,.35)}
.v49PreseasonHead{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:16px 18px;border-bottom:1px solid #d4e1eb;background:linear-gradient(180deg,#fff,#edf5fa)}
.v49PreseasonHead h2{margin:0 0 5px;font-size:20px}.v49PreseasonHead p{margin:0;color:#60798e;font-size:12px;line-height:1.45}
.v49PreseasonClose{width:42px;height:42px;flex:0 0 42px;padding:0;border-radius:12px;background:#173754!important;color:#fff!important}
.v49PreseasonBody{overflow:auto;padding:14px;-webkit-overflow-scrolling:touch}
.v49PreseasonSummary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:12px}
.v49PreseasonSummary div{padding:11px;border:1px solid #cbdce9;border-radius:13px;background:#fff}.v49PreseasonSummary span{display:block;color:#71889a;font-size:10px;font-weight:800}.v49PreseasonSummary b{display:block;margin-top:4px;font-size:18px;color:#153d61}
.v49PreseasonCoupons{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.v49PreseasonCoupon{padding:12px;border:1px solid #c9dae7;border-radius:14px;background:#fff}
.v49PreseasonCouponHead{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.v49PreseasonCouponHead b{font-size:14px}.v49PreseasonCouponHead span{padding:4px 7px;border-radius:999px;background:#e7f1fa;color:#315d80;font-size:9px;font-weight:900}
.v49PreseasonPick{padding:8px 9px;margin-top:6px;border:1px solid #d9e5ee;border-radius:10px;background:#f5f9fc}.v49PreseasonPick strong{display:block;font-size:12px}.v49PreseasonPick small{display:block;margin-top:3px;color:#688095;font-size:10px;line-height:1.4}
.v49PreseasonEmpty{padding:30px;text-align:center;color:#6d8294}

/* Final result: logos, compact rows and all teams visible in the main panel. */
@media(min-width:761px){
  .v48FinalDialog{width:min(1240px,calc(100% - 28px))!important;max-height:96dvh!important}
  .v48FinalHead{padding:13px 17px!important}
  .v48FinalScroll{padding:10px 13px!important}
  .v48FinalStats{margin-bottom:8px!important}.v48FinalStat{padding:8px 10px!important}.v48FinalStat b{font-size:17px!important}
  .v48FinalGrid{grid-template-columns:minmax(0,1.28fr) minmax(310px,.72fr)!important;gap:10px!important}
  .v48FinalPanel{padding:9px!important}.v48FinalPanel h3{margin-bottom:6px!important}
  .v48FinalTableWrap{overflow:visible!important}
  .v48FinalTable{min-width:0!important;font-size:9.5px!important;table-layout:fixed!important}
  .v48FinalTable th,.v48FinalTable td{height:20px!important;padding:2px 3px!important;line-height:1.05!important}
  .v48FinalTable th:nth-child(1),.v48FinalTable td:nth-child(1){width:27px}
  .v48FinalTable th:nth-child(2),.v48FinalTable td:nth-child(2){width:190px}
  .v48FinalTeam{display:flex;align-items:center;gap:5px;min-width:0}.v48FinalTeam .teamLogo{width:16px!important;height:16px!important;min-width:16px!important;flex:0 0 16px!important;margin:0!important}.v48FinalTeam span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .v48CouponList{gap:5px!important}.v48Coupon{padding:7px 8px!important}.v48CouponTop{margin-bottom:3px!important}.v48Coupon small{font-size:9px!important;line-height:1.28!important}
  .v48Legend{margin-top:6px!important}
}

@media(max-width:760px){
  .v49LeagueButton{height:42px}
  .v49LeagueMenu{position:fixed;left:10px;right:10px;top:auto;bottom:12px;max-height:70dvh;overflow:auto}
  .v49PreseasonOverlay{padding:0;align-items:stretch}
  .v49PreseasonDialog{width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}
  .v49PreseasonHead{padding:13px 12px}.v49PreseasonHead h2{font-size:18px}.v49PreseasonHead p{font-size:10px}
  .v49PreseasonBody{padding:10px 9px calc(18px + env(safe-area-inset-bottom))}
  .v49PreseasonSummary{grid-template-columns:1fr 1fr;gap:7px}.v49PreseasonSummary div:last-child{grid-column:1/-1}
  .v49PreseasonCoupons{grid-template-columns:1fr}
  .v48FinalTable .v48FinalTeam .teamLogo{width:15px!important;height:15px!important;min-width:15px!important}
}
