/* Gameserver Display */
.gameserver-display {
	display: flex;
	justify-content: space-between;
	padding: 20px;
	gap: 20px;
}

.gameserver-left-panel,
.gameserver-right-panel {
	background-color: #1c1c1c;
	border: 1px solid #2a2a2a;
	border-radius: 10px;
	padding: 20px;
	flex: 1;
	min-height: 500px;
	overflow-y: auto;
}

.gameserver-left-panel {
	max-width: 40%;
}

.gameserver-right-panel {
	max-width: 60%;
}

.gameserver-left-panel h2,
.gameserver-right-panel h2 {
	margin-top: 0;
	font-size: 1.5em;
	color: #ffffff;
	border-bottom: 1px solid #333;
	padding-bottom: 10px;
}

/* All Gameserver Display */
#all-gameserver-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 10px;
}

.gameserver-entry {
	padding: 10px;
	border-bottom: 1px solid #444;
	cursor: pointer;
}

.gameserver-entry strong {
	display: block;
	font-size: 16px;
	color: #fff;
}

.gameserver-subtext {
	margin: 4px 0 0 0;
	color: #ccc;
	font-size: 13px;
}

/* Edit Gameserver Display */
.edit-server-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.edit-server-grid {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 10px 20px;
}

#update-server-form input[type="text"],
#update-server-form input[type="number"] {
	width: 100%;
	padding: 5px;
	background-color: #222;
	color: #fff;
	border: 1px solid #555;
	border-radius: 4px;
}

#edit-server-status-message {
	margin-top: 15px;
	color: #ccc;
	font-size: 14px;
}

.slider-container {
	display: flex;
	align-items: center;
	gap: 12px;
}

.slider-container input[type="range"] {
	width: 70%; /* or 200px, adjust as needed */
}

.slider-container span {
	min-width: 30px;
	text-align: right;
	font-weight: bold;
	color: #ccc; /* optional: to match a disabled style */
}

.input-disabled {
	background-color: #333 !important;
	color: #999 !important;
	font-style: italic;
	border: 1px dashed #666;
	cursor: not-allowed;
}

input[type="range"] {
	width: 100%;
	margin: 5px 0 15px;
}

label[for="edit-maxplayers"] {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* Game Server Refresh Button */
.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5em;
}

.section-header h2 {
	margin: 0;
	font-size: 1.4rem;
}

.btn-refresh {
	background-color: transparent;
	border: none;
	font-size: 1.2rem;
	cursor: pointer;
	color: #3498db;
	padding: 0.2em 0.4em;
	transition: transform 0.2s ease;
}

.btn-refresh:hover {
	transform: rotate(90deg);
	color: #2980b9;
}

/* Back to admin panel button */
.btn-backtoadminpanel {
  --btn-bg-1: hsla(210, 100%, 70%, 1);
  --btn-bg-2: hsla(210, 100%, 50%, 1);
  --btn-bg-color: #fff;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  padding: 0.5em 1em;
  min-width: 100px;
  min-height: 36px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.8s;
  background-size: 280% auto;
  background-image: linear-gradient(
    325deg,
    var(--btn-bg-2) 0%,
    var(--btn-bg-1) 55%,
    var(--btn-bg-2) 90%
  );
  border: none;
  border-radius: 0.5em;
  color: var(--btn-bg-color);
  box-shadow:
    0px 0px 20px rgba(71, 157, 255, 0.5),
    0px 5px 5px -1px rgba(58, 140, 233, 0.25),
    inset 4px 4px 8px rgba(175, 211, 255, 0.5),
    inset -4px -4px 8px rgba(19, 102, 216, 0.35);
}

.btn-backtoadminpanel:hover {
  background-position: right top;
}

.btn-backtoadminpanel:is(:focus, :focus-visible, :active) {
  outline: none;
  box-shadow:
    0 0 0 3px var(--btn-bg-color),
    0 0 0 6px var(--btn-bg-2);
}

/* Toggle Switch */
.switch {
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 3.5em;
  height: 2em;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.215, 0.610, 0.355, 1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.4em;
  width: 1.4em;
  right: 0.3em;
  bottom: 0.3em;
  transform: translateX(150%);
  background-color: #59d102;
  border-radius: inherit;
  transition: all 0.4s cubic-bezier(0.215, 0.610, 0.355, 1);
}

.slider:after {
  position: absolute;
  content: "";
  height: 1.4em;
  width: 1.4em;
  left: 0.3em;
  bottom: 0.3em;
  background-color: #cccccc;
  border-radius: inherit;
  transition: all 0.4s cubic-bezier(0.215, 0.610, 0.355, 1);
}

.switch input:focus + .slider {
  box-shadow: 0 0 1px #59d102;
}

.switch input:checked + .slider:before {
  transform: translateY(0);
}

.switch input:checked + .slider::after {
  transform: translateX(-150%);
}

.gameserver-user-access {
	margin-top: 20px;
	padding: 15px;
	background: #111;
	border-top: 1px solid #2a2a2a;
}

.user-access-content {
	display: flex;
	gap: 20px;
}

.user-access-row {
	display: grid;
	grid-template-columns: 250px 1fr;
	gap: 20px;
	margin-top: 10px;
}

.user-access-users {
	border-right: 1px solid #333;
	padding-right: 15px;
}

.user-access-entry {
	padding: 8px 10px;
	cursor: pointer;
	border-radius: 4px;
}

.user-access-entry:hover {
	background: #2a2a2a;
}

.user-access-entry.selected {
	background: #3a3a3a;
}

.user-access-controls {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.access-buttons {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}

.access-buttons .danger {
	background: #8b2c2c;
}

.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999;
}

.modal.hidden {
	display: none;
}

.modal-content {
	background: #1e1e1e;
	padding: 20px;
	border-radius: 6px;
	width: 420px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.modal-content input {
	width: 100%;
}

.modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.user-access-controls #access-server-title {
	width: 220px;
	max-width: 100%;
	padding: 6px 8px;
	font-size: 14px;
}