/* Servers panel header: compact search next to Filter */
.servers-panel-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.servers-panel-title {
	font-weight: 600;
}

.servers-panel-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	float: none !important;
	margin-left: auto;
}

.servers-search {
	margin: 0;
}

.servers-search .input-group {
	width: 260px;
	max-width: 42vw;
}

/* Keep addon / input / button on one baseline (Bootstrap 3 input-group quirk) */
.servers-search .input-group-addon,
.servers-search .form-control,
.servers-search .input-group-btn > .btn {
	height: 30px;
	padding: 5px 10px;
	font-size: 12px;
	line-height: 1.5;
	box-sizing: border-box;
	margin: 0;
	vertical-align: middle;
}

.servers-search .input-group-addon {
	padding-left: 8px;
	padding-right: 8px;
}

.servers-search .input-group-btn {
	width: 1%;
	white-space: nowrap;
	vertical-align: middle;
	font-size: 0;
}

.servers-search .btn-servers-search {
	font-weight: 600;
	color: #222;
	border: 1px solid #d4892a;
	border-radius: 0 3px 3px 0;
	background-image: linear-gradient(to bottom, #f0a85c 0%, #e08a35 100%);
	background-color: #e8953d;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.servers-search .btn-servers-search:hover,
.servers-search .btn-servers-search:focus {
	color: #111;
	border-color: #c47a22;
	background-image: linear-gradient(to bottom, #f5b56e 0%, #e8953d 100%);
	background-color: #f0a85c;
	outline: 0;
}

.servers-search .btn-servers-search:active {
	background-image: linear-gradient(to bottom, #e08a35 0%, #d4892a 100%);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.servers-filter-toggle {
	white-space: nowrap;
	line-height: 30px;
}

@media (max-width: 480px) {
	.servers-search .input-group {
		width: 180px;
	}
}

/* Highlighted (promoted) server rows — rounded “pill” look.
   border-collapse:separate is required for border-radius on cells. */
#servers.table {
	border-collapse: separate;
	border-spacing: 0 3px;
	border: none;
}

#servers.table > thead > tr > th {
	border-bottom-width: 1px;
}

#servers.table > tbody > tr > td {
	border-top: none;
	vertical-align: middle;
}

/* Keep player counts on one line so highlight pills stay short on mobile */
#servers.table > thead > tr > th:nth-child(4),
#servers.table > tbody > tr > td.servers-players {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* Hostname + name: single line with ellipsis (stops tall pills) */
#servers.table > tbody > tr > td.servers-hostname {
	max-width: 16em;
}

#servers.table > tbody > tr > td.servers-hostname .servers-hostname-inner {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	white-space: nowrap;
}

#servers.table > tbody > tr > td.servers-hostname .servers-hostname-link {
	display: block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#servers.table > tbody > tr > td.servers-hostname .servers-hostname-action {
	flex: 0 0 auto;
	float: none !important;
}

#servers.table > thead > tr > th:nth-child(3),
#servers.table > tbody > tr > td.servers-name {
	max-width: 14em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#servers.table > thead > tr > th:nth-child(5),
#servers.table > thead > tr > th:nth-child(6),
#servers.table > thead > tr > th:nth-child(7),
#servers.table > thead > tr > th:nth-child(8),
#servers.table > tbody > tr > td:nth-child(5),
#servers.table > tbody > tr > td:nth-child(6),
#servers.table > tbody > tr > td:nth-child(7),
#servers.table > tbody > tr > td:nth-child(8) {
	white-space: nowrap;
}

@media (max-width: 767px) {
	#servers.table {
		font-size: 12px;
	}

	#servers.table > tbody > tr > td.servers-hostname {
		max-width: 11em;
	}

	#servers.table > tbody > tr > td.servers-name {
		max-width: 9em;
	}

	#servers.table > tbody > tr > td,
	#servers.table > thead > tr > th {
		padding-top: 4px;
		padding-bottom: 4px;
	}

	#servers.table > tbody > tr.warning > td:first-child,
	#servers.table > tbody > tr.warning > th:first-child {
		padding-left: 8px;
	}

	#servers.table > tbody > tr.warning > td:last-child,
	#servers.table > tbody > tr.warning > th:last-child {
		padding-right: 8px;
	}
}

#servers.table > tbody > tr.warning > td,
#servers.table > tbody > tr.warning > th {
	background-color: #f0c040 !important;
	color: #222 !important;
	border-color: transparent !important;
	border-top: none !important;
	box-shadow: none;
}

#servers.table > tbody > tr.warning > td:first-child,
#servers.table > tbody > tr.warning > th:first-child {
	border-radius: 999px 0 0 999px;
	padding-left: 12px;
}

#servers.table > tbody > tr.warning > td:last-child,
#servers.table > tbody > tr.warning > th:last-child {
	border-radius: 0 999px 999px 0;
	padding-right: 12px;
}

#servers.table > tbody > tr.warning a {
	color: #1f5f8b !important;
}

#servers.table-hover > tbody > tr.warning:hover > td,
#servers.table-hover > tbody > tr.warning:hover > th {
	background-color: #f0a85c !important;
	color: #222 !important;
}

/* Keep the fixed top bar on one row when Management + Account are visible. */
#navbar.navbar {
	min-height: 56px;
}

#navbar .navbar-nav > li > a {
	padding-left: 10px;
	padding-right: 10px;
}

#navbar .navbar-header {
	float: left;
}

#navbar .navbar-brand {
	float: left;
	padding: 8px 12px 8px 0;
	height: 56px;
	line-height: 40px;
	max-width: 200px;
}

#navbar .navbar-logo {
	display: block;
	height: 40px !important;
	width: auto !important;
	max-width: 180px !important;
	max-height: 40px !important;
	object-fit: contain;
	object-position: left center;
}

#navbar .navbar-toggle {
	margin-top: 11px;
	margin-bottom: 11px;
}

@media (min-width: 768px) {
	#navbar .navbar-nav > li > a {
		padding-top: 18px;
		padding-bottom: 18px;
		padding-left: 8px;
		padding-right: 8px;
	}

	#navbar .navbar-right {
		margin-right: 0;
	}

	#navbar .navbar-brand {
		max-width: 220px;
	}

	#navbar .navbar-logo {
		height: 40px !important;
		max-width: 200px !important;
	}
}

@media (max-width: 767px) {
	#navbar .navbar-brand {
		max-width: 160px;
		padding-left: 8px;
	}

	#navbar .navbar-logo {
		height: 36px !important;
		max-width: 150px !important;
	}
}

/* Failed BBCode / hotlinked images (forum, blogs, descriptions). */
.bbcode-img-broken {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 180px;
	max-width: 100%;
	min-height: 110px;
	padding: 16px 18px;
	margin: 6px 0;
	border: 1px dashed rgba(128, 128, 128, 0.55);
	border-radius: 6px;
	background: rgba(128, 128, 128, 0.12);
	color: inherit;
	opacity: 0.85;
	text-align: center;
	vertical-align: middle;
	box-sizing: border-box;
	cursor: help;
}

.bbcode-img-broken-icon {
	font-size: 28px;
	line-height: 1;
	opacity: 0.7;
}

.bbcode-img-broken-label {
	font-weight: 600;
	font-size: 13px;
	line-height: 1.2;
}

.bbcode-img-broken-hint {
	font-size: 11px;
	line-height: 1.3;
	opacity: 0.75;
	max-width: 220px;
}

/* Server description (otservlist-style readability) */
.server-description-panel > .server-description-heading {
	font-weight: 700;
	letter-spacing: 0.01em;
	color: #e67e22;
	background: rgba(230, 126, 34, 0.08);
	border-color: rgba(230, 126, 34, 0.25);
	text-align: center;
}

body.theme-darkly .server-description-panel > .server-description-heading,
body.theme-cyborg .server-description-panel > .server-description-heading,
body.theme-slate .server-description-panel > .server-description-heading {
	color: #f0a35a;
	background: rgba(240, 163, 90, 0.1);
	border-color: rgba(240, 163, 90, 0.22);
}

.server-description-body {
	line-height: 1.55;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.server-description {
	font-size: 14px;
}

.server-description a {
	font-weight: 600;
}

.server-description .server-desc-heading {
	display: block;
	margin-top: 14px;
	margin-bottom: 6px;
	font-size: 14px;
	color: #e67e22;
}

body.theme-darkly .server-description .server-desc-heading,
body.theme-cyborg .server-description .server-desc-heading,
body.theme-slate .server-description .server-desc-heading {
	color: #f0a35a;
}

.server-description-hr {
	margin-top: 16px;
	margin-bottom: 10px;
	border-top-color: rgba(128, 128, 128, 0.35);
}

.server-description-claim {
	margin-bottom: 0;
	font-size: 12px;
}


