/* ==========================================================
   v179.9.77 — GAME INFORMATION SEAMLESS FIELD FIX
   Narrow follow-up to v179.9.76.
   - Preserve the approved More-style outer modal shell.
   - Remove legacy filled input rectangles inside Game Information.
   - Keep the approved centered label -> glyph -> value hierarchy.
   - Improve team selector fit on iPhone widths.
   ========================================================== */

@media (max-width:700px){
  /* The outer sheet from v179.9.76 is intentionally untouched. */
  #gameInfoManagerModal .v102-info-grid{
    overflow:hidden!important;
  }

  #gameInfoManagerModal .v102-info-tile{
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:16px 30px minmax(26px,auto)!important;
    align-content:center!important;
    justify-items:center!important;
    gap:4px!important;
    min-height:102px!important;
    padding:10px 8px!important;
    text-align:center!important;
  }

  #gameInfoManagerModal .v102-info-tile>small{
    grid-column:1!important;
    grid-row:1!important;
    align-self:center!important;
    justify-self:center!important;
    width:100%!important;
    text-align:center!important;
  }

  #gameInfoManagerModal .v102-info-tile>span{
    grid-column:1!important;
    grid-row:2!important;
    position:static!important;
    align-self:center!important;
    justify-self:center!important;
    margin:0!important;
  }

  /* Critical fix: legacy theme form rules were repainting these editable
     values as large input cards. In this manager the tile itself is the
     control surface, so the value must remain visually seamless. */
  #gameInfoManagerModal .v102-info-tile :is(input,textarea){
    grid-column:1!important;
    grid-row:3!important;
    -webkit-appearance:none!important;
    appearance:none!important;
    box-sizing:border-box!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:28px!important;
    min-height:28px!important;
    max-height:34px!important;
    margin:0!important;
    padding:0 5px!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    color:var(--ui-text)!important;
    -webkit-text-fill-color:var(--ui-text)!important;
    font-family:inherit!important;
    font-size:14px!important;
    font-weight:800!important;
    line-height:28px!important;
    text-align:center!important;
    text-align-last:center!important;
    resize:none!important;
    overflow:hidden!important;
  }

  #gameInfoManagerModal .v102-info-tile textarea{
    line-height:1.15!important;
    padding-top:4px!important;
  }

  #gameInfoManagerModal .v102-info-tile :is(input,textarea)::placeholder{
    color:var(--ui-muted)!important;
    -webkit-text-fill-color:var(--ui-muted)!important;
    opacity:.9!important;
  }

  /* iOS date/time controls can carry an internal painted surface. */
  #gameInfoManagerModal .v102-info-tile input[type="date"],
  #gameInfoManagerModal .v102-info-tile input[type="time"]{
    color-scheme:inherit!important;
  }
  #gameInfoManagerModal .v102-info-tile input[type="date"]::-webkit-calendar-picker-indicator,
  #gameInfoManagerModal .v102-info-tile input[type="time"]::-webkit-calendar-picker-indicator{
    display:none!important;
    opacity:0!important;
    width:0!important;
    height:0!important;
    margin:0!important;
    padding:0!important;
  }
  #gameInfoManagerModal .v102-info-tile input[type="date"]::-webkit-date-and-time-value,
  #gameInfoManagerModal .v102-info-tile input[type="time"]::-webkit-date-and-time-value{
    width:100%!important;
    text-align:center!important;
    margin:0!important;
  }

  /* Give both native selects a little more usable label width. */
  #gameInfoManagerModal .v102-team-pair{
    grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr)!important;
    gap:6px!important;
  }
  #gameInfoManagerModal .v102-team-pair select{
    min-width:0!important;
    width:100%!important;
    padding-left:10px!important;
    padding-right:25px!important;
    font-size:clamp(12.5px,3.35vw,14.5px)!important;
    font-weight:800!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  /* Wrigley keeps its own cream/yellow palette with the same geometry. */
  body[data-theme-family="wrigley"] #gameInfoManagerModal .v102-info-tile :is(input,textarea){
    color:var(--wr-cream)!important;
    -webkit-text-fill-color:var(--wr-cream)!important;
    background:transparent!important;
  }
  body[data-theme-family="wrigley"] #gameInfoManagerModal .v102-info-tile :is(input,textarea)::placeholder{
    color:var(--wr-cream-muted)!important;
    -webkit-text-fill-color:var(--wr-cream-muted)!important;
  }
}
