/* Cricstars squad + batting output V3 */
/* Only generated documents; no global header or form changes */

body.cs-unified-tools #output .cs-team-sheet-result,
body.cs-unified-tools #output .cs-batting-document {
  background:#101724!important;
  color:#eef2f8!important;
  border:1px solid #354052!important;
  border-radius:20px!important;
  padding:clamp(14px,2.5vw,28px)!important;
  box-shadow:0 24px 65px rgba(0,0,0,.28)!important;
  font-family:Inter,Arial,sans-serif!important;
  white-space:normal!important;
  overflow:hidden!important;
}

/* Exact original logo displayed on a contrasting dark surface */

body.cs-unified-tools #output .cs-ts-document-head,
body.cs-unified-tools #output .cs-batting-header {
  background:
    radial-gradient(ellipse at 90% 12%,
      rgba(225,36,60,.24),transparent 48%),
    linear-gradient(120deg,#090d15,#192436);
  border:1px solid #3c4658!important;
  border-bottom:3px solid #e52d45!important;
  border-radius:14px!important;
  padding:clamp(18px,3vw,28px)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px!important;
  margin-bottom:23px!important;
}

body.cs-unified-tools #output .cs-ts-document-head img,
body.cs-unified-tools #output .cs-batting-header img {
  display:block!important;
  width:min(210px,100%)!important;
  height:auto!important;
  max-height:85px!important;
  opacity:1!important;
  visibility:visible!important;
  object-fit:contain!important;
  object-position:left center!important;
  filter:drop-shadow(0 3px 12px rgba(0,0,0,.4));
}

body.cs-unified-tools #output .cs-ts-document-type strong,
body.cs-unified-tools #output .cs-batting-header h2 {
  color:#fff!important;
  font-size:clamp(18px,2vw,25px)!important;
  line-height:1.15!important;
  letter-spacing:-.025em!important;
}

body.cs-unified-tools #output .cs-ts-document-type small,
body.cs-unified-tools #output .cs-document-kicker {
  color:#e8b779!important;
}

body.cs-unified-tools #output .cs-ts-team-name,
body.cs-unified-tools #output .cs-batting-team {
  color:#fff!important;
  font-size:clamp(27px,4vw,40px)!important;
  font-weight:850!important;
  letter-spacing:-.04em!important;
  margin:8px 0!important;
}

body.cs-unified-tools #output .cs-ts-subtitle,
body.cs-unified-tools #output .cs-batting-intro {
  color:#b6c3d6!important;
}

/* TEAM SHEET — squad presentation */

body.cs-unified-tools #output .cs-ts-roles {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
  margin:23px 0!important;
}

body.cs-unified-tools #output .cs-ts-role-card {
  padding:18px!important;
  border:1px solid #566073!important;
  border-left:4px solid #e5344c!important;
  border-radius:12px!important;
  background:linear-gradient(125deg,#283345,#171f2d)!important;
}

body.cs-unified-tools #output .cs-ts-role-card:nth-child(2) {
  border-left-color:#d7aa64!important;
}

body.cs-unified-tools #output .cs-ts-role-card small {
  color:#d7b88c!important;
}

body.cs-unified-tools #output .cs-ts-role-card strong {
  color:#fff!important;
  font-size:clamp(15px,2vw,19px)!important;
}

body.cs-unified-tools #output .cs-team-sheet-result table {
  width:100%!important;
  background:#171f2c!important;
  color:#fff!important;
  border-collapse:separate!important;
  border-spacing:0 5px!important;
}

body.cs-unified-tools #output .cs-team-sheet-result th {
  background:#293447!important;
  color:#e7edf6!important;
  border:0!important;
  padding:13px!important;
}

body.cs-unified-tools #output .cs-team-sheet-result td,
body.cs-unified-tools #output .cs-team-sheet-result tr:nth-child(even) td {
  background:#202b3a!important;
  color:#f3f6fa!important;
  border-bottom:1px solid #394657!important;
  padding:12px!important;
}

body.cs-unified-tools #output .cs-team-sheet-result td:nth-child(2) {
  font-weight:750!important;
}

body.cs-unified-tools #output .cs-ts-badge {
  background:#e52d45!important;
  color:white!important;
  padding:5px 9px!important;
  border-radius:6px!important;
}

body.cs-unified-tools #output .cs-ts-badge.keeper {
  background:#d5a45f!important;
  color:#131922!important;
}

body.cs-unified-tools #output .cs-ts-reserves {
  background:#202a39!important;
  border:1px solid #3f4b5c!important;
}

body.cs-unified-tools #output .cs-ts-reserves strong {
  color:#dcb47e!important;
}

body.cs-unified-tools #output .cs-ts-reserves p {
  color:#fff!important;
}

body.cs-unified-tools #output .cs-ts-document-footer {
  color:#adbacb!important;
  border-color:#414c5c!important;
}

/* BATTING ORDER — broadcast-inspired lineup */

body.cs-unified-tools #output .cs-batting-list {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}

body.cs-unified-tools #output .cs-batting-player {
  display:flex!important;
  align-items:center!important;
  gap:13px!important;
  padding:15px!important;
  min-height:76px!important;
  background:linear-gradient(110deg,#252f40,#1b2533)!important;
  border:1px solid #3b485a!important;
  border-left:4px solid #e52d45!important;
  border-radius:12px!important;
  box-shadow:0 6px 16px rgba(0,0,0,.12);
}

body.cs-unified-tools #output .cs-batting-player:nth-child(-n+2) {
  border-left-color:#dfae66!important;
  background:linear-gradient(110deg,#343026,#222c3b)!important;
}

body.cs-unified-tools #output .cs-batting-number {
  color:#fff!important;
  background:#ce2541!important;
  min-width:44px!important;
  min-height:44px!important;
  border-radius:10px!important;
  display:grid!important;
  place-items:center!important;
  font-size:21px!important;
  font-weight:900!important;
}

body.cs-unified-tools #output .cs-batting-player:nth-child(-n+2)
.cs-batting-number {
  background:#d5a45f!important;
  color:#152033!important;
}

body.cs-unified-tools #output .cs-batting-name {
  color:#fff!important;
  font-size:clamp(14px,1.6vw,17px)!important;
  font-weight:800!important;
  overflow-wrap:anywhere;
}

body.cs-unified-tools #output .cs-batting-position {
  background:#d5a45f!important;
  color:#171e29!important;
  font-size:10px!important;
  font-weight:900!important;
}

body.cs-unified-tools #output .cs-batting-footer {
  color:#b7c3d2!important;
  border-color:#3d4858!important;
}

body.cs-unified-tools #output .cs-batting-footer strong {
  color:#efa5ac!important;
}

@media(max-width:720px) {
  body.cs-unified-tools #output .cs-batting-list {
    grid-template-columns:1fr!important;
  }
}

@media(max-width:500px) {
  body.cs-unified-tools #output .cs-ts-document-head,
  body.cs-unified-tools #output .cs-batting-header {
    flex-direction:column!important;
    align-items:flex-start!important;
  }
  body.cs-unified-tools #output .cs-ts-document-type {
    text-align:left!important;
  }
  body.cs-unified-tools #output .cs-ts-roles {
    grid-template-columns:1fr!important;
  }
  body.cs-unified-tools #output .cs-batting-player {
    min-height:62px!important;
  }
}

/* Keep colours and branding visible in PDF/print */
@media print {
  @page {size:A4 portrait;margin:12mm}

  body.cs-unified-tools #output .cs-team-sheet-result,
  body.cs-unified-tools #output .cs-batting-document {
    box-shadow:none!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    overflow:visible!important;
  }

  body.cs-unified-tools #output .cs-batting-list {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body.cs-unified-tools #output .cs-batting-player {
    min-height:54px!important;
    padding:9px!important;
  }

  body.cs-unified-tools #output .cs-team-sheet-result,
  body.cs-unified-tools #output .cs-batting-document,
  body.cs-unified-tools #output .cs-team-sheet-result *,
  body.cs-unified-tools #output .cs-batting-document * {
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
  }
}
