/* 2 kolonner for de to hold */
.atrg #atrg-pools{
  display:grid !important;
  grid-template-columns:1fr 1fr;
  gap:18px;
  align-items:start;
}
@media (max-width:980px){
  .atrg #atrg-pools{ grid-template-columns:1fr; }
}

/* Kampe under de to hold */
.atrg .atrg-matches{ margin-top:20px; }


/* Spillere i én række */
.atrg .atrx-players-row{
  display:flex; gap:8px; flex-wrap:nowrap; overflow:auto; padding:4px 0;
}
.atrg .atrx-players-row .atrx-input.player{
  min-width:140px; flex:0 0 auto;
}


/* --- UI polish & tablet friendliness --- */
.atrg .controls{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
}
.atrg .controls .btn{ padding:10px 16px; font-size:16px; border-radius:10px; }
.atrg .badge{
  background:#1f2937; color:#fff; padding:6px 10px; border-radius:999px; font-size:13px; line-height:1;
  border:1px solid rgba(255,255,255,.15);
}
.atrg .badge.first{ background:#065f46; } /* green-ish when 1. division */
.atrg.first-division h2::after{
  content:' – 1. Division'; font-size:.6em; font-weight:500; margin-left:6px; opacity:.9;
}
.atrg .atrx-card.box{
  border-radius:16px; box-shadow:0 8px 24px rgba(0,0,0,.25); padding:16px; border:1px solid rgba(255,255,255,.08);
}
.atrg .atrx-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:1024px){
  .atrg .atrx-row{ grid-template-columns:1fr; }
}
.atrg .atrx-input{
  background:#0b0f14; border:1px solid #2a2f36; color:#e5e7eb; padding:10px 12px; border-radius:10px; font-size:16px;
}
.atrg label{ color:#cbd5e1; font-size:13px; display:block; margin:6px 0 4px; }

.atrg table{
  width:100%; border-collapse:separate; border-spacing:0; overflow:hidden; border-radius:14px;
}
.atrg .matches table thead th{
  position:sticky; top:0; background:#111827; z-index:1;
}
.atrg .matches table tbody tr:nth-child(odd){ background:rgba(255,255,255,.02); }
.atrg .matches table td, .atrg .matches table th{ padding:10px 12px; }
.atrg .matches .btn{ padding:8px 12px; border-radius:10px; }
@media (max-width:1024px){
  .atrg .matches{ overflow:auto; -webkit-overflow-scrolling:touch; }
  .atrg .matches table{ min-width:720px; }
}

/* Player row: tighter spacing on tablet */
.atrg .atrx-players-row{ gap:10px; }
.atrg .atrx-players-row .atrx-input.player{ min-width:120px; }

/* Subtle header style */
.atrg h3{ margin:0 0 8px; font-size:20px; }

/* Emphasize lanes headings */
.atrg [name="home_lane"], .atrg [name="away_lane"]{ max-width:180px; }

/* Save buttons: easier taps on touch */
@media (max-width:1024px){
  .atrg .matches .btn.save{ width:100%; }
}


/* === Responsive fixes (multi-pools & mobile/tablet) === */
.atrg{ overflow-x:hidden; }
.atrg #atrg-pools{
  grid-template-columns:repeat(auto-fit, minmax(320px, 1fr)) !important;
}
@media (max-width:1024px){
  .atrg #atrg-pools{ grid-template-columns:1fr !important; }
}
.atrg .atrx-card.box{ max-width:100%; box-sizing:border-box; }
.atrg .atrx-row{ min-width:0; }
.atrg .atrx-players-row{ overflow-x:auto; flex-wrap:nowrap; }
.atrg .matches{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.atrg .matches table{ min-width:640px; } /* a bit narrower to avoid page overflow */
.atrg .controls select{ max-width:280px; }

/* prevent any nested element from forcing page overflow */
.atrg *{ min-width:0; }


/* Pools always stacked vertically */
.atrg #atrg-pools{ grid-template-columns:1fr !important; }

/* Two-line players grid */
.atrg .atrx-players-grid{ display:grid; grid-template-columns:1fr; gap:8px; }
.atrg .atrx-players-grid .row{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
@media (max-width:640px){
  .atrg .atrx-players-grid .row{ grid-template-columns:1fr; }
}

/* Subcontrols inside each card */
.atrg .atrx-subcontrols{ display:flex; align-items:center; gap:10px; margin-bottom:8px; flex-wrap:wrap; }
.atrg .atrx-subcontrols label{ font-size:12px; opacity:.85; }
