/* LottoLuma approved premium generated-line layout for all lottery studios.
   Match the existing empty card: shared top controls, full-size result surface,
   numbers kept in place, labelled special ball, compact summary. */
body[data-game] .line-card.ll-ticket-line-ready .ll-ticket-ready-stage {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,230px);
  gap:18px;align-items:stretch;position:relative;z-index:2;
  margin:18px 0 14px;padding:18px;
  border:1px solid #d2e2ed;border-radius:17px;
  background:radial-gradient(ellipse at 97% 0%,rgba(74,148,196,.13),transparent 45%),
    linear-gradient(150deg,#fcfeff 0%,#f8fbff 65%,#f0f7fb 100%);
  box-shadow:inset 0 1px 0 #fff,0 8px 24px rgba(25,73,109,.06);
  color:#102e49;min-width:0;
}
body[data-game] .ll-ticket-ready-content{min-width:0;display:flex;flex-direction:column;justify-content:center}
body[data-game] .ll-ticket-ready-heading{min-width:0;margin-bottom:18px}
body[data-game] .ll-ticket-status{display:inline-flex;align-items:center;gap:7px;padding:5px 11px;border:1px solid #bce4d9;background:#def9f0;border-radius:99px;color:#087c5c;font-weight:900;font-size:10px;letter-spacing:.075em;line-height:1.2}
body[data-game] .ll-ticket-status-dot{width:7px;height:7px;border-radius:50%;background:#0e9b70;box-shadow:0 0 0 3px rgba(14,155,112,.12)}
body[data-game] .ll-ticket-ready-heading h3{margin:9px 0 3px!important;font-size:clamp(17px,1.7vw,23px);line-height:1.18;font-weight:850;letter-spacing:-.036em;color:#092c46!important}
body[data-game] .ll-ticket-ready-heading p{color:#56708a!important;margin:0;font-size:11px;line-height:1.55}
body[data-game] .ll-ticket-ball-layout{display:flex;align-items:center;flex-wrap:wrap;gap:16px;min-width:0}
body[data-game] .ll-ticket-main-balls{display:flex;flex-wrap:wrap;gap:8px;margin:0!important;min-height:50px!important;align-items:center}
body[data-game] .ll-ticket-ball-layout .number-ball:not(.ball-placeholder){flex:0 0 48px;width:48px;height:48px;display:grid;place-items:center;border-radius:50%;font-size:16px!important;font-weight:900;line-height:1!important;color:#fff!important;letter-spacing:.01em;background:radial-gradient(circle at 27% 19%,#b9e5ff 0%,#569de8 24%,#1168bb 55%,#064077 100%)!important;border:1px solid rgba(54,115,172,.7)!important;box-shadow:inset 3px 5px 9px rgba(255,255,255,.28),inset -4px -7px 10px rgba(2,35,75,.18),0 7px 13px rgba(17,79,138,.18)!important;text-shadow:0 1px 2px rgba(0,30,67,.3)}
body[data-game] .ll-ticket-ball-layout .number-ball:not(.ball-placeholder):before{background:radial-gradient(ellipse at 40% 28%,rgba(255,255,255,.62),transparent 70%)!important}
body[data-game] .ll-ticket-ball-layout .number-ball.ball-extra{background:radial-gradient(circle at 28% 19%,#fff0b6 0%,#eab85b 24%,#b97b1b 58%,#7b4610 100%)!important;border-color:rgba(157,100,30,.5)!important;box-shadow:inset 3px 5px 9px rgba(255,255,255,.33),inset -4px -7px 10px rgba(97,48,11,.2),0 7px 15px rgba(143,89,28,.2)!important}
body[data-game] .ll-ticket-special-group{display:flex;min-height:54px;align-items:center;border-left:1px solid #cbdfec;padding-left:16px;min-width:0}
body[data-game] .ll-ticket-special-group .extra-row{display:flex!important;align-items:center;gap:11px;border:0!important;margin:0!important;padding:0!important;min-width:0}
body[data-game] .ll-ticket-special-group .extra-name{font-weight:800;font-size:11px;line-height:1.3;color:#34536d!important;white-space:nowrap;padding:0!important;min-width:0!important}
body[data-game] .ll-ticket-special-group .balls{display:flex;gap:0;margin:0!important;min-height:0!important}
body[data-game] .ll-ticket-stats{background:linear-gradient(140deg,#f3f9fe,#eaf4fb);border:1px solid #e0eef7;border-radius:16px;padding:16px;display:flex;flex-direction:column;justify-content:center;gap:17px;min-width:0}
body[data-game] .ll-ticket-stat{display:flex;align-items:center;gap:12px;min-width:0}
body[data-game] .ll-ticket-stat-icon{width:30px;height:30px;display:grid;place-items:center;flex:0 0 30px;border-radius:9px;background:#e0f0fb;border:1px solid #cae1f2;color:#0871bc!important;font-size:17px;font-weight:850;line-height:1}
body[data-game] .ll-ticket-stat div{display:flex;flex-direction:column;gap:2px;min-width:0}
body[data-game] .ll-ticket-stat strong{display:block;font-size:12px;font-weight:850;color:#102f4d!important;line-height:1.25}
body[data-game] .ll-ticket-stat div>span{font-size:10px;color:#627c96!important;line-height:1.3}
body[data-game] .ll-ticket-line-ready .line-meta.ll-ticket-no-match{display:none!important}
body[data-game] .ll-ticket-line-ready .line-meta.ll-ticket-has-match{margin-top:7px}
body[data-game] .ll-ticket-line-ready .line-bottom{padding-top:9px;border-top-color:#dce9f2}
body[data-game] .ll-ticket-line-ready .number-ball{transition:filter .18s,transform .18s}
body[data-game] .ll-ticket-line-ready:hover .number-ball{transform:none!important}
/* Use the same refined panel in night mode, with legible contrast on the contained light surface. */
html[data-theme="dark"] body[data-game] .line-card.ll-ticket-line-ready .ll-ticket-ready-stage{background:linear-gradient(145deg,#142c43 0%,#11253c 100%);border-color:#37536e;color:#eaf7ff}
html[data-theme="dark"] body[data-game] .ll-ticket-ready-heading h3,html[data-theme="dark"] body[data-game] .ll-ticket-stat strong{color:#f2fbff!important}
html[data-theme="dark"] body[data-game] .ll-ticket-ready-heading p,html[data-theme="dark"] body[data-game] .ll-ticket-stat div>span{color:#b4cce0!important}
html[data-theme="dark"] body[data-game] .ll-ticket-stats{background:linear-gradient(140deg,#193954,#162f49);border-color:#35536d}
html[data-theme="dark"] body[data-game] .ll-ticket-special-group{border-color:#3a5772}
html[data-theme="dark"] body[data-game] .ll-ticket-special-group .extra-name{color:#c3dff2!important}
html[data-theme="dark"] body[data-game] .ll-ticket-stat-icon{background:#214560;border-color:#3b6080;color:#9dd9ff!important}
@media(max-width:1130px){body[data-game] .line-card.ll-ticket-line-ready .ll-ticket-ready-stage{grid-template-columns:minmax(0,1fr)}body[data-game] .ll-ticket-stats{flex-direction:row;justify-content:space-between;gap:12px;flex-wrap:wrap}body[data-game] .ll-ticket-stat{flex:1 1 150px}}
@media(max-width:650px){body[data-game] .line-card.ll-ticket-line-ready .ll-ticket-ready-stage{padding:13px;margin:13px 0 12px;gap:13px}body[data-game] .ll-ticket-ready-heading{margin-bottom:13px}body[data-game] .ll-ticket-main-balls{gap:6px}body[data-game] .ll-ticket-ball-layout .number-ball:not(.ball-placeholder){width:41px;height:41px;flex-basis:41px;font-size:13px!important}body[data-game] .ll-ticket-special-group{padding-left:12px;min-height:43px}body[data-game] .ll-ticket-ball-layout{gap:11px}body[data-game] .ll-ticket-stats{padding:12px;gap:11px}body[data-game] .ll-ticket-stat{flex:1 1 135px}}
@media(max-width:395px){body[data-game] .ll-ticket-ball-layout{gap:10px}body[data-game] .ll-ticket-ball-layout .number-ball:not(.ball-placeholder){width:35px;height:35px;flex-basis:35px;font-size:12px!important}body[data-game] .ll-ticket-main-balls{gap:5px}body[data-game] .ll-ticket-special-group{border-left:none;border-top:1px solid #c7ddec;padding:10px 0 0;width:100%}}
@media(prefers-reduced-motion:reduce){body[data-game] .ll-ticket-line-ready .number-ball{transition:none!important}}
@media print{body[data-game] .line-card.ll-ticket-line-ready .ll-ticket-ready-stage{background:white!important;color:#152d44!important;display:block;border:1px solid #b6c9dc;box-shadow:none!important}body[data-game] .ll-ticket-stats{display:none!important}body[data-game] .ll-ticket-ready-heading h3{color:#152d44!important}body[data-game] .ll-ticket-ball-layout .number-ball{width:30px!important;height:30px!important;flex-basis:30px!important;background:#f1f7fa!important;color:#152d44!important;border:1px solid #97b5ce!important;box-shadow:none!important;text-shadow:none!important}}

/* Distinct special balls for the U.S. red-ball and UK Thunderball lottery formats. */
body[data-game="powerball"] .ll-ticket-ball-layout .number-ball.ball-extra,
body[data-game="mega-millions"] .ll-ticket-ball-layout .number-ball.ball-extra,
body[data-game="thunderball"] .ll-ticket-ball-layout .number-ball.ball-extra {
  background:radial-gradient(circle at 27% 18%,#ffbbab 0%,#f16c58 26%,#c82532 62%,#7d1329 100%)!important;
  border-color:rgba(152,34,43,.52)!important;
  box-shadow:inset 3px 5px 9px rgba(255,255,255,.26),inset -4px -7px 10px rgba(71,9,22,.22),0 7px 15px rgba(145,23,46,.20)!important;
}
/* Preserve clearly visible checked draw matches above the decorative finish. */
body[data-game] .ll-ticket-ball-layout .number-ball.hit {outline:3px solid #20b982!important;outline-offset:3px}
/* Readable stat summaries if names/labels have more words than Australian Powerball. */
body[data-game] .ll-ticket-stat strong,body[data-game] .ll-ticket-stat div>span{overflow-wrap:anywhere}
body[data-game] .ll-ticket-ball-layout .extra-name{white-space:normal;max-width:150px}
@media(max-width:480px){body[data-game] .ll-ticket-ball-layout .extra-name{max-width:none}}
/* LottoLuma Premium Generated Lines — v2 (2026-10-24)
   Approved refinement: keep all main numbers on one row, scale the balls to
   available width, and move the three supporting stats BELOW the number area.
   This deliberately affects generated cards only; empty cards are unchanged. */
body[data-game] .line-card.ll-ticket-line-ready .ll-ticket-ready-stage {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 15px;
  padding: clamp(12px, 2vw, 18px);
  align-items: stretch;
}
body[data-game] .ll-ticket-ready-content { min-width:0; width:100%; }
body[data-game] .ll-ticket-ready-heading { margin-bottom: 14px; }
body[data-game] .ll-ticket-ready-heading h3 { font-size:clamp(17px,1.45vw,22px); line-height:1.22; }
body[data-game] .ll-ticket-ball-layout {
  display:flex !important;
  flex-direction:column;
  align-items:stretch;
  gap:12px;
  width:100%;
  min-width:0;
}
/* Critical: do not wrap the generated main numbers, not even with 7+ picks.
   The 48px balls may shrink to suit the space available in each line card. */
body[data-game] .ll-ticket-ball-layout .ll-ticket-main-balls {
  display:flex!important;
  width:100%;
  max-width:100%;
  flex-wrap:nowrap!important;
  align-items:center;
  justify-content:flex-start;
  gap:clamp(3px,0.65vw,8px);
  min-height:0!important;
  overflow:visible;
}
body[data-game] .ll-ticket-main-balls .number-ball:not(.ball-placeholder) {
  flex:0 1 48px!important;
  width:48px!important;
  min-width:0!important;
  max-width:48px;
  height:auto!important;
  max-height:48px;
  aspect-ratio:1/1;
  font-size:clamp(10px,1.3vw,16px)!important;
  line-height:1!important;
  white-space:nowrap;
}
/* Keep any special draw balls labelled, but never steal space from the main row. */
body[data-game] .ll-ticket-special-group,
body[data-game] .ll-ticket-special-group .extra-row {
  min-width:0;
  width:100%;
}
body[data-game] .ll-ticket-special-group {
  border-left:0!important;
  border-top:1px solid #d3e5ef;
  padding:11px 0 0!important;
  min-height:0;
  align-items:center;
}
body[data-game] .ll-ticket-special-group .extra-row {
  gap:12px;
  flex-wrap:wrap;
}
body[data-game] .ll-ticket-special-group .balls {
  display:flex!important;
  flex-wrap:nowrap!important;
  gap:7px!important;
}
body[data-game] .ll-ticket-special-group .number-ball.ball-extra {
  flex:0 0 42px!important;
  width:42px!important;
  height:42px!important;
  font-size:14px!important;
}
/* Summary now sits below the ticket; it never compresses the ball row. */
body[data-game] .ll-ticket-stats {
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr));
  align-items:center;
  gap:10px 16px;
  padding:12px 14px;
  width:100%;
}
body[data-game] .ll-ticket-stats .ll-ticket-stat { min-width:0; flex:initial; gap:9px; }
body[data-game] .ll-ticket-stats .ll-ticket-stat-icon {
  flex:0 0 29px;
  width:29px;
  height:29px;
}
body[data-game] .ll-ticket-stats .ll-ticket-stat strong { font-size:11px; }
body[data-game] .ll-ticket-stats .ll-ticket-stat div>span { font-size:9px; }
html[data-theme="dark"] body[data-game] .ll-ticket-special-group { border-color:#37536e; }
@media(max-width:650px) {
  body[data-game] .ll-ticket-main-balls .number-ball:not(.ball-placeholder) {
    flex-basis:44px!important;
    width:44px!important;
    max-width:44px;
    max-height:44px;
    font-size:clamp(10px,3.5vw,14px)!important;
  }
  body[data-game] .ll-ticket-stats { padding:11px; gap:10px; }
  body[data-game] .ll-ticket-ready-heading { margin-bottom:12px; }
}
@media(max-width:395px) {
  body[data-game] .ll-ticket-main-balls .number-ball:not(.ball-placeholder) {
    flex-basis:40px!important;
    width:40px!important;
    max-width:40px;
    max-height:40px;
  }
}
@media print {
  body[data-game] .ll-ticket-main-balls .number-ball:not(.ball-placeholder) {
    flex:0 1 30px!important;
    width:30px!important;
    max-width:30px;
    max-height:30px;
  }
  body[data-game] .ll-ticket-stats { display:none!important; }
}
/* Specificity bridge for the site's existing theme-aware #lines rules, which
   otherwise force wrapped balls and flex:0 0 auto at mobile sizes. */
html[data-theme] body[data-game] #lines .line-card.ll-ticket-line-ready .ll-ticket-ball-layout .balls.ll-ticket-main-balls {
  display:flex!important;
  flex-wrap:nowrap!important;
  gap:clamp(3px,0.65vw,8px)!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-width:0!important;
  max-width:100%!important;
  overflow:visible!important;
}
html[data-theme] body[data-game] #lines .line-card.ll-ticket-line-ready .ll-ticket-ball-layout .ll-ticket-main-balls .number-ball:not(.ball-placeholder) {
  flex:0 1 48px!important;
  width:48px!important;
  min-width:0!important;
  max-width:48px!important;
  height:auto!important;
  max-height:48px!important;
  aspect-ratio:1/1!important;
  font-size:clamp(10px,1.3vw,16px)!important;
}
@media(max-width:650px) {
  html[data-theme] body[data-game] #lines .line-card.ll-ticket-line-ready .ll-ticket-ball-layout .ll-ticket-main-balls .number-ball:not(.ball-placeholder) {
    flex-basis:44px!important;width:44px!important;max-width:44px!important;max-height:44px!important;
    font-size:clamp(10px,3.5vw,14px)!important;
  }
}
@media(max-width:395px) {
  html[data-theme] body[data-game] #lines .line-card.ll-ticket-line-ready .ll-ticket-ball-layout .ll-ticket-main-balls .number-ball:not(.ball-placeholder) {
    flex-basis:40px!important;width:40px!important;max-width:40px!important;max-height:40px!important;
  }
}
/* Compact three-column summary for side-by-side desktop tickets. */
@media(min-width:651px) {
  body[data-game] .line-card.ll-ticket-line-ready .ll-ticket-stats {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    padding:12px 10px!important;
  }
  body[data-game] .line-card.ll-ticket-line-ready .ll-ticket-stat { gap:6px!important; }
  body[data-game] .line-card.ll-ticket-line-ready .ll-ticket-stat-icon {
    width:25px;height:25px;flex-basis:25px;font-size:14px;
  }
  body[data-game] .line-card.ll-ticket-line-ready .ll-ticket-stat strong {font-size:10px;}
}
@media print {
  html[data-theme] body[data-game] #lines .line-card.ll-ticket-line-ready .ll-ticket-main-balls .number-ball:not(.ball-placeholder) {
    flex:0 1 30px!important;width:30px!important;max-width:30px!important;
    height:30px!important;max-height:30px!important;font-size:11px!important;
    background:#f1f7fa!important;color:#152d44!important;
    border:1px solid #97b5ce!important;box-shadow:none!important;text-shadow:none!important;
  }
}
