
/* SURGE Worlds Groups & Roll Log - minimal styling */
.swg-wrap { max-width: 1000px; margin: 0 auto; }
.swg-row { margin: 18px 0; }
.swg-card { background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: 10px; padding: 14px 16px; }
.swg-form { display: grid; gap: 10px; max-width: 540px; }
.swg-form input[type="text"] { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.15); }
.swg-small { font-size: 12px; opacity: 0.8; margin-top: 6px; }
.swg-box { padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.12); background: #fff; }
.swg-error { border-color: rgba(220,38,38,0.35); }
.swg-success { border-color: rgba(34,197,94,0.35); }
.swg-topbar { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.swg-title { margin: 0; }
.swg-role { text-align: right; }

/* Roll log */
.swg-roll-log { border: 1px solid rgba(0,0,0,0.10); border-radius: 10px; padding: 10px; height: 520px; min-height: 520px; max-height: 520px; overflow: auto; background: rgba(0,0,0,0.02); }
.swg-roll-entry { padding: 8px 10px; border-bottom: 1px solid rgba(0,0,0,0.07); }
.swg-roll-entry:last-child { border-bottom: none; }
.swg-roll-head { display: flex; justify-content: space-between; gap: 12px; }
.swg-roll-who { font-weight: 600; }
.swg-roll-total { font-weight: 700; }
.swg-roll-sub { font-size: 12px; opacity: 0.75; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.swg-inline{grid-template-columns: 1fr auto; align-items:center;}
.swg-form select{width:100%; padding:10px; border-radius:8px; border:1px solid rgba(0,0,0,0.15);}

.swg-roll-sub a{ text-decoration: underline; }

/* --- SURGE Groups theming tweaks --- */
.swg-card{background:#000 !important; border:1px solid #b58a1f !important; color:#eee !important;}
.swg-card h3, .swg-card h2{color:#fff !important;}
.swg-card .swg-small, .swg-card .swg-roll-sub{color:#cfcfcf !important;}
.swg-card input, .swg-card select{background:#111 !important; color:#fff !important; border:1px solid #333 !important;}
.swg-card .button{border-color:#b58a1f !important;}
.swg-roll-entry{background:#050505 !important; border:1px solid #333 !important;}
.swg-roll-sub a{color:#e5c067 !important;}


/* --- Roll log layout: left details, right total --- */
.swg-roll-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  width:100%;
}
.swg-roll-left{
  min-width:0;
  flex:1 1 auto;
}
.swg-roll-title{
  font-weight:600;
  margin-bottom:4px;
}
.swg-roll-math{
  opacity:0.92;
  white-space:normal;
  overflow-wrap:anywhere;
}
.swg-roll-right{
  flex:0 0 auto;
  text-align:right;
  font-weight:700;
  white-space:nowrap;
}
/* On narrow screens, keep total bottom-right */
@media (max-width: 720px){
  .swg-roll-row{flex-direction:column;}
  .swg-roll-right{align-self:flex-end;}
}
