/* RBS Forum R17 — live server monitor + community chat; additive R16 skin.
   All rules are scoped to existing widgets; PHP, get_servers/get_players,
   chat_send_message, Bootstrap modal targets and actual data stay unchanged. */


/* On full monitoring pages keep the original table layout and a small map preview. */
body.rbs-modern.rbs-breach.rbs-cyber16 .monitoring-table .rbs17-map-preview {
  display:flex;align-items:center;gap:8px;min-width:0;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .monitoring-table .rbs17-map-preview__image {
  width:42px;height:34px;object-fit:cover;border-radius:6px;
  border:1px solid rgba(31,225,155,.38);
}
body.rbs-modern.rbs-breach.rbs-cyber16 .monitoring-table .rbs17-map-preview__label {min-width:0;overflow-wrap:anywhere;}

/* Server card shell. */
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card {
  background:linear-gradient(155deg,rgba(1,20,20,.98),rgba(2,10,17,.98)) !important;
  border:1px solid rgba(0,239,178,.44) !important;
  box-shadow:inset 0 0 28px rgba(0,235,141,.06),0 11px 32px rgba(0,0,0,.28) !important;
  border-radius:16px !important;overflow:hidden;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card > .rbs17-servers-head {
  display:flex!important;align-items:center;gap:12px;
  padding:18px 15px 13px!important;
  background:radial-gradient(circle at 95% 15%,rgba(0,231,138,.14),transparent 40%),linear-gradient(110deg,rgba(0,44,38,.88),rgba(1,20,20,.94))!important;
  border-bottom:1px solid rgba(21,221,145,.32)!important;
  color:#eafcf8!important;
  text-shadow:none!important;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-head__icon,
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-head__icon {
  flex:0 0 43px;display:block;width:43px;height:43px;
  border:1px solid rgba(24,246,180,.70);border-radius:13px;
  box-shadow:inset 0 0 14px rgba(0,224,132,.13),0 0 13px rgba(0,224,132,.13);
  position:relative;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-head__icon::after {
  content:"";position:absolute;inset:10px;
  background:#38ffc3;mask:url('../img/rbs-icons-r14/gamepad.svg') center/contain no-repeat;
  -webkit-mask:url('../img/rbs-icons-r14/gamepad.svg') center/contain no-repeat;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-head > span:last-child {min-width:0;display:flex;flex-direction:column;gap:4px;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-head strong {font-size:16px;line-height:1.16;color:#f4fffa;font-weight:800;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-head em {font-style:normal;color:#21fba3;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-head small {
  display:block;font-size:9px;letter-spacing:.15em;line-height:1.5;
  color:#85ccb1;font-weight:650;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-server-slot {padding:12px 9px 7px;}

/* The live AJAX table becomes a vertical card list ONLY in homepage widget.
   Inline display:none from countOfServersDisplayed is intentionally respected. */
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-server-slot .monitoring-table > table > tbody > tr.rbs17-server-row {
  display:grid;grid-template-columns:58px minmax(0,1fr) minmax(66px,auto);
  grid-template-rows:auto auto auto auto;gap:7px 10px;
  padding:12px 12px 11px;margin:0 0 10px;
  border:1px solid rgba(29,202,156,.32);
  border-radius:13px;background:linear-gradient(110deg,rgba(2,24,28,.93),rgba(1,12,21,.95));
  box-shadow:inset 3px 0 0 rgba(27,224,154,.70),0 4px 14px rgba(0,0,0,.16);
  color:#e5faf0;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-server-slot .monitoring-table > table > tbody > tr.rbs17-server-row:nth-child(4n+2) {box-shadow:inset 3px 0 0 #ffb04c,0 4px 14px rgba(0,0,0,.16);}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-server-slot .monitoring-table > table > tbody > tr.rbs17-server-row:nth-child(4n+3) {box-shadow:inset 3px 0 0 #ff6675,0 4px 14px rgba(0,0,0,.16);}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-server-slot .monitoring-table > table > tbody > tr.rbs17-server-row > td {
  min-width:0;max-width:100%;padding:0!important;display:block;line-height:1.35;
  background:none!important;border:0!important;overflow:visible;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-server-slot .monitoring-table > table > tbody > tr.rbs17-server-row > td:nth-child(1) {grid-column:1/-1;grid-row:1;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-server-slot .monitoring-table > table > tbody > tr.rbs17-server-row > td:nth-child(2) {grid-column:1/3;grid-row:2;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-server-slot .monitoring-table > table > tbody > tr.rbs17-server-row > td:nth-child(3) {grid-column:3;grid-row:2;align-self:center;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-server-slot .monitoring-table > table > tbody > tr.rbs17-server-row > td:nth-child(4) {grid-column:1/-1;grid-row:3;text-align:left;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-server-slot .monitoring-table > table > tbody > tr.rbs17-server-row > td:nth-child(5) {grid-column:1/-1;grid-row:4;text-align:right;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-title {
  display:flex;align-items:center;gap:9px;min-width:0;font-size:12px;font-weight:750;color:#ecfff6;
  padding-right:22px;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-row > td:first-child {position:relative;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-row > td:first-child > .rbs17-server-manage {
  position:absolute;right:0;top:0;z-index:2;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-title > .game-icon {
  width:22px;height:22px;flex:0 0 22px;object-fit:contain;border-radius:5px;
  background:rgba(90,246,199,.10);padding:2px;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-label {
  display:block;min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;color:#f3fff9;font:inherit;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-manage {
  background:transparent;border:0;color:#65ffbf;padding:3px 4px;
  font-size:15px;cursor:pointer;flex:0 0 auto;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-manage:focus-visible {outline:2px solid #27ffbf;outline-offset:2px;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-map-preview {
  display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:9px;
  min-width:0;color:#bbd7ca;font-size:11px;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-map-preview__image {
  width:58px;height:56px;display:block;object-fit:cover;
  border-radius:8px;border:1px solid rgba(25,227,167,.42);
  background:linear-gradient(140deg,#182c29,#14202e);
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-map-preview__label {overflow-wrap:anywhere;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-row .servers-online-line {
  display:flex;align-items:center;justify-content:center;
  min-width:67px;width:100%;height:33px;margin:0;border-radius:9px;
  border:1px solid rgba(154,176,207,.38);background:#172130!important;
  position:relative;overflow:hidden;cursor:pointer;color:#fff;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-row .servers-online-line .progress-bar {
  position:absolute;inset:0 auto 0 0;height:100%;z-index:0;
  background:linear-gradient(90deg,#04b97d,#25dcb1)!important;
  box-shadow:0 0 8px rgba(8,231,167,.11);
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-row .servers-online-line .progress-bar.bg-danger,
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-row .servers-online-line .progress-bar.bg-warning {
  background:linear-gradient(90deg,#bd463e,#ef6d56)!important;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-row .servers-online-line .progress-val {
  position:relative;z-index:1;display:block;color:#fff;font:800 13px/1.1 system-ui,sans-serif;
  text-align:center;text-shadow:0 1px 3px rgba(0,0,0,.54);
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-row .rbs17-connect-link {
  display:inline-flex;align-items:center;gap:6px;font:11px/1.35 Consolas,monospace;
  color:#a3daff!important;word-break:break-all;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-row .rbs17-connect-link::before {
  content:"";width:13px;height:13px;flex:none;background:#30e7a5;
  mask:url('../img/rbs-icons-r14/server.svg') center/contain no-repeat;
  -webkit-mask:url('../img/rbs-icons-r14/server.svg') center/contain no-repeat;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-actions {display:flex;gap:7px;align-items:center;justify-content:flex-end;flex-wrap:wrap;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-action {
  width:35px;height:33px;display:inline-flex!important;align-items:center;justify-content:center;
  border:1px solid #2f91ff;border-radius:8px;background:linear-gradient(160deg,#0d4279,#061c3d);
  color:#b4e7ff!important;box-shadow:inset 0 0 11px rgba(40,142,255,.20);margin:0!important;
  transition:background-color .15s ease,border-color .15s ease;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-action:hover {filter:brightness(1.2);}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-action--bans {background:linear-gradient(145deg,#086b55,#003b3e);border-color:#00d49d;color:#8fffe2!important;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-action--stats {background:linear-gradient(145deg,#62318b,#321549);border-color:#bb56f7;color:#f3bcff!important;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-action-icon {
  display:block;width:17px;height:17px;background:currentColor;
  mask:url('../img/rbs-icons-r14/users.svg') center/contain no-repeat;
  -webkit-mask:url('../img/rbs-icons-r14/users.svg') center/contain no-repeat;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-action--bans .rbs17-server-action-icon {
  mask-image:url('../img/rbs-icons-r14/ban.svg');
  -webkit-mask-image:url('../img/rbs-icons-r14/ban.svg');
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-action--stats .rbs17-server-action-icon {
  mask-image:url('../img/rbs-icons-r14/trophy.svg');
  -webkit-mask-image:url('../img/rbs-icons-r14/trophy.svg');
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-servers-foot {padding:3px 14px 16px;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-servers-foot a {font-size:12px;border-radius:10px;border-color:#00efaf;color:#ccffe8;background:rgba(7,57,48,.23);}

/* Chat header — no absolute positioning and no font icon dependency. */
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card {
  overflow:visible;position:relative;
  border:1px solid rgba(0,235,178,.43);border-radius:16px;
  background:linear-gradient(145deg,rgba(3,28,29,.97),rgba(2,15,24,.97));
  box-shadow:inset 0 0 30px rgba(0,199,142,.06),0 9px 30px rgba(0,0,0,.22);
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card > .rbs17-chat-head {
  display:flex!important;align-items:center;gap:12px;min-height:79px;
  padding:14px 16px!important;flex-wrap:nowrap;
  background:linear-gradient(90deg,rgba(0,53,51,.70),rgba(0,21,31,.85));
  border-bottom:1px solid rgba(5,222,161,.30)!important;border-radius:15px 15px 0 0;
  color:#e7fff4!important;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-head__icon::after {
  content:"";position:absolute;inset:10px;
  background:#48ffc9;
  mask:url('../img/rbs-icons-r14/message.svg') center/contain no-repeat;
  -webkit-mask:url('../img/rbs-icons-r14/message.svg') center/contain no-repeat;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-head__label {
  display:flex;flex:1 1 auto;min-width:0;flex-direction:column;gap:4px;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-head__label strong {font-size:20px;font-weight:800;line-height:1.1;color:#fff;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-head__label small {color:#85ccb1;font-size:10px;letter-spacing:.17em;font-weight:650;line-height:1.4;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-rules {
  display:inline-flex;align-items:center;gap:8px;flex:0 0 auto;
  border:1px solid #b456ec!important;border-radius:10px;background:linear-gradient(145deg,#21133b,#15132b)!important;
  box-shadow:inset 0 0 10px rgba(191,86,255,.13);color:#e7d0ff!important;
  font-size:12px;font-weight:750;padding:10px 13px;margin-left:auto;
  position:static!important;transform:none!important;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-rules__icon {
  width:15px;height:15px;background:currentColor;display:inline-block;
  mask:url('../img/rbs-icons-r14/book.svg') center/contain no-repeat;
  -webkit-mask:url('../img/rbs-icons-r14/book.svg') center/contain no-repeat;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-collapse {
  border:1px solid rgba(117,206,183,.35);border-radius:9px;background:rgba(6,38,43,.8)!important;
  color:#aaf5d9;position:static!important;width:31px;height:33px;display:flex;align-items:center;justify-content:center;
  flex:0 0 31px;margin:0;padding:0;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-collapse__icon {
  width:14px;height:14px;display:block;background:currentColor;
  mask:url('../img/rbs-icons-r14/minus.svg') center/contain no-repeat;
  -webkit-mask:url('../img/rbs-icons-r14/minus.svg') center/contain no-repeat;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card #chat {
  padding:14px 16px 16px;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card #chat_messages {
  border:1px solid rgba(22,200,153,.25)!important;
  border-radius:11px;background:rgba(2,16,25,.72)!important;
  padding:8px;scrollbar-color:#167b63 #0b1720;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card #message_input {
  background:#0a1d26!important;border:1px solid rgba(54,174,153,.36)!important;
  color:#f1fff9!important;border-radius:9px!important;min-height:42px;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card #send_button {
  background:linear-gradient(145deg,#0c674e,#064331)!important;color:#f0fff8!important;
  border:1px solid #1bdf9d!important;border-radius:9px!important;min-height:42px;
  padding:9px 17px;font-weight:750;
}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card #chat .input-group {gap:8px;flex-wrap:nowrap;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card #chat #smile_btn {cursor:pointer;}
body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card #passive {padding:18px;color:#b2d3c5;}
body.rbs-modern.rbs-breach.rbs-cyber16 #chatrules .modal-content {border-color:rgba(65,235,177,.33);}

@media (max-width:991.98px) {
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-card .rbs16-server-slot {padding:14px 11px 7px;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-head strong {font-size:18px;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-label {font-size:13px;}
}
@media (max-width:575.98px) {
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card > .rbs17-chat-head {gap:8px;padding:12px!important;min-height:68px;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-head__icon {flex-basis:36px;width:36px;height:36px;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-head__label strong {font-size:17px;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-head__label small {font-size:8px;letter-spacing:.08em;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-rules {font-size:11px;padding:8px;gap:6px;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-rules__icon {width:13px;height:13px;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-collapse {width:29px;flex-basis:29px;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card #chat {padding:12px;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card #chat .input-group {flex-wrap:wrap!important;gap:8px;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card #chat .smile_input {flex:1 1 100%;width:100%!important;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card #chat .input-group-btn {display:block;width:100%;margin:0;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-card #chat #send_button {width:100%!important;margin:0!important;}
}
@media (max-width:359.98px) {
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-title {font-size:11px;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-servers-head small {letter-spacing:.08em;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-rules {font-size:0;gap:0;width:34px;height:34px;justify-content:center;padding:0;}
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-chat-rules__icon {width:17px;height:17px;}
}
@media (prefers-reduced-motion:reduce) {
  body.rbs-modern.rbs-breach.rbs-cyber16 .rbs17-server-action {transition:none;}
}
