/* Online Gym, CI 8.1: clear settings, set controls and row rhythm. Screen only. */
@media screen {
  html:root #onlinePlanDialog .gym-structured-layout { display:grid; gap:12px; min-width:0; }
  #onlinePlanDialog .gym-structured-layout :is(section,fieldset,details,label) { min-width:0; }
  #onlinePlanDialog .online-gym-block label>span,#onlinePlanDialog .gym-structured-layout :is(h4,small) { overflow-wrap:anywhere; white-space:normal; }
  #onlinePlanDialog .gym-structured-layout .gym-section-title { margin:0; font:600 15px/1.45 var(--fliq81-font); }
  #onlinePlanDialog .gym-structured-layout .gym-exercise-settings { display:grid; gap:12px; }
  html:root #onlinePlanDialog .gym-structured-layout .gym-simple-top { grid-template-columns:minmax(0,240px) minmax(0,144px); gap:12px; align-items:start; }
  #onlinePlanDialog .gym-structured-layout .gym-sets-section { border-top:1px solid var(--fliq8-divider); padding-top:12px; }
  #onlinePlanDialog .gym-structured-layout .gym-sets-toolbar { display:flex; flex-wrap:wrap; align-items:flex-start; gap:8px 12px; margin-bottom:8px; max-width:640px; }
  #onlinePlanDialog .gym-structured-layout .gym-sets-toolbar>h4 { flex:1 1 160px; display:flex; align-items:center; min-height:44px; }
  #onlinePlanDialog .gym-structured-layout .gym-count-field { display:grid; grid-template-columns:auto 64px; gap:4px 8px; align-items:center; }
  #onlinePlanDialog .gym-structured-layout .gym-count-field>small { grid-column:1/-1; color:var(--fliq8-secondary); font-size:12px; }
  #onlinePlanDialog .gym-structured-layout .gym-count-label { font-weight:500; }
  html:root #onlinePlanDialog .gym-structured-layout :is(input:not([type=hidden]),select,textarea) { width:100%!important; min-width:0!important; max-width:100%!important; box-sizing:border-box; }
  #onlinePlanDialog .gym-structured-layout .gym-exercise-summary { flex:1 1 100%; min-height:0; justify-content:flex-start; padding:0; font-weight:400; white-space:normal; color:var(--fliq8-secondary); }
  html:root #onlinePlanDialog .gym-structured-layout :is(.gym-set-table-header,.gym-set-row) { grid-template-columns:44px minmax(64px,1fr) minmax(80px,1fr) minmax(56px,.7fr) minmax(72px,.9fr) 44px; gap:8px; }
  html:root #onlinePlanDialog .gym-structured-layout .gym-set-table-header { padding:4px 8px; font-size:12px; text-transform:none; letter-spacing:normal; font-weight:500; }
  #onlinePlanDialog .gym-structured-layout :is(.gym-set-table-header,.gym-set-list) { width:100%; max-width:640px; box-sizing:border-box; }
  #onlinePlanDialog .gym-structured-layout .gym-set-list { gap:0; border-radius:8px; background:var(--fliq8-surface); }
  html:root #onlinePlanDialog .gym-structured-layout .gym-set-row { padding:4px 8px; }
  html:root #onlinePlanDialog .gym-structured-layout :is(input:not([type=hidden]),select) { min-height:44px!important; padding:4px 8px!important; }
  html:root #onlinePlanDialog .gym-structured-layout [data-add-gym-set] { height:44px; min-height:44px; margin:0; align-self:flex-start; }
  #onlinePlanDialog .gym-structured-layout .gym-set-row:nth-child(even) { background:var(--fliq8-muted); }
  #onlinePlanDialog .gym-structured-layout .gym-set-row>strong { font-weight:500; color:var(--fliq8-secondary); font-variant-numeric:tabular-nums; }
  #onlinePlanDialog .gym-structured-layout .gym-notes-group { border-top:1px solid var(--fliq8-divider); padding-top:4px; }
  #onlinePlanDialog .gym-structured-layout .gym-notes-group>summary { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:8px 0; min-height:44px; cursor:pointer; }
  #onlinePlanDialog .gym-structured-layout .gym-notes-group>summary::before { content:""; width:16px; height:16px; flex:0 0 16px; background:currentColor; mask:url('ci-8.1/icons/chevron-right.svg') center/16px 16px no-repeat; }
  #onlinePlanDialog .gym-structured-layout .gym-notes-group[open]>summary::before { transform:rotate(90deg); }
  #onlinePlanDialog .gym-structured-layout .gym-notes-group small { color:var(--fliq8-secondary); font-size:12px; }
  #onlinePlanDialog .gym-structured-layout .gym-simple-bottom { margin-top:8px; }
  #onlinePlanDialog .gym-structured-layout .gym-simple-bottom { max-width:720px; }
  #onlinePlanDialog .gym-structured-layout .gym-simple-bottom textarea { min-height:56px; }
  #onlinePlanDialog .builder-super-exercise .gym-structured-layout :is(.gym-sets-toolbar,.gym-section-title) { display:none!important; }
  html:root #onlinePlanDialog .builder-super-exercise .gym-structured-layout .gym-set-row { grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr)); }
  @container (max-width:620px) {
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-table-header { display:none; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row { grid-template-columns:44px minmax(0,1fr) minmax(0,1fr) 44px; grid-template-rows:auto auto; gap:8px; padding:12px 8px; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row>strong { grid-column:1; grid-row:1/3; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row>label:nth-of-type(1) { grid-column:2; grid-row:1; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row>label:nth-of-type(2) { grid-column:3; grid-row:1; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row>label:nth-of-type(3) { grid-column:2; grid-row:2; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row>label:nth-of-type(4) { grid-column:3; grid-row:2; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-remove-set { grid-column:4; grid-row:1/3; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row>label>span { position:static; width:auto; height:auto; overflow:visible; clip:auto; white-space:normal; overflow-wrap:anywhere; }
  }
  @container (max-width:360px) {
    html:root #onlinePlanDialog .gym-structured-layout .gym-simple-top { grid-template-columns:minmax(0,1fr); }
    html:root #onlinePlanDialog .gym-structured-layout .gym-exercise-field { grid-column:auto; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row { grid-template-columns:44px minmax(0,1fr); grid-template-rows:auto; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row>strong { grid-column:1; grid-row:1; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row>label:nth-of-type(n) { grid-column:2; grid-row:auto; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-remove-set { grid-column:1; grid-row:2; }
    #onlinePlanDialog .gym-structured-layout .gym-count-field { grid-template-columns:minmax(0,1fr); }
    #onlinePlanDialog .gym-structured-layout .gym-count-field>small { grid-column:auto; }
  }
  @container (max-width:180px) {
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row { grid-template-columns:minmax(0,1fr); }
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row>strong,
    html:root #onlinePlanDialog .gym-structured-layout .gym-set-row>label:nth-of-type(n),
    html:root #onlinePlanDialog .gym-structured-layout .gym-remove-set { grid-column:1; grid-row:auto; }
    html:root #onlinePlanDialog .gym-structured-layout .gym-remove-set { width:44px; }
  }
}
