/* PocketMine — карточка сервера /servera/?server_id=N (pages/page-monitoring-single.php).
   Все правила привязаны к .server-page, чтобы не задевать другие страницы мониторинга. */

.server-page .srv-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── Шапка ─────────────────────────────────────────────────────────── */
.server-page .srv-ip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 1px 6px;
	margin-left: -6px;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.15s;
}
.server-page .srv-ip:hover { background: rgba(18, 153, 90, 0.08); }
.server-page .srv-ip i { font-size: 12px; color: #12995a; }
.server-page .srv-ip.is-copied { background: #e6f6ec; }
.server-page .srv-ip.is-copied::after { color: #0b6e41; }

.server-page .srv-rank {
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 0 9px;
	border-radius: 999px;
	background: #e6f6ec;
	color: #0b6e41;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: none;
}
.server-page .srv-rank:hover { background: #d6f0e0; color: #0b6e41; }

.server-page .srv-edition {
	display: inline-flex;
	align-items: center;
	height: 22px;
	padding: 0 8px;
	border-radius: 6px;
	background: #f1f5f2;
	color: #5f6f66;
	font-size: 11.5px;
	font-weight: 600;
}

.server-page .server-main .serverbar__btn--play {
	background: #12995a;
	color: #fff;
	box-shadow: 0 2px 8px rgba(18, 153, 90, 0.22);
}
.server-page .server-main .serverbar__btn--play:hover {
	background: #0f8a50;
	opacity: 1;
}
.server-page .server-main .serverbar__btn--ghost.is-copied { color: #0b6e41; }

.server-page .srv-lead {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.55;
	color: #3c4741;
	overflow-wrap: anywhere;
}
.server-page .srv-lead b { color: #14201a; }

/* ── Общие карточки ────────────────────────────────────────────────── */
.server-page .srv-card {
	background: #fff;
	border: 1px solid rgba(16, 38, 26, 0.08);
	border-radius: 14px;
	padding: 18px 20px;
	margin: 0 0 16px;
	box-shadow: 0 1px 2px rgba(16, 38, 26, 0.04);
}
.server-page .srv-card__title {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: #14201a;
}
.server-page .srv-card__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.server-page .srv-card__head .srv-card__title { margin: 0; }
.server-page .srv-card__link {
	font-size: 13px;
	font-weight: 500;
	color: #0b6e41;
	text-decoration: none;
	white-space: nowrap;
}
.server-page .srv-card__link:hover { text-decoration: underline; }

/* ── График: зелёная карточка, белые столбцы ───────────────────────── */
.server-page .srv-chart {
	background: #12995a;
	border: 0;
	border-radius: 14px;
	padding: 16px 18px 12px;
	margin: 0 0 16px;
	color: #fff;
	box-shadow: 0 6px 18px rgba(18, 153, 90, 0.18);
}
.server-page .srv-chart__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 4px;
}
.server-page .srv-chart__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
}
.server-page .srv-chart__sub {
	margin: 3px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.86);
}
.server-page .srv-chart__badge {
	flex: 0 0 auto;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	border: 1px solid rgba(255, 255, 255, 0.24);
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
}
.server-page .srv-chart__plot {
	position: relative;
	height: 250px;
	margin-top: 6px;
}
.server-page .srv-chart__plot canvas {
	display: block;
	width: 100%;
	height: 100%;
}
.server-page .srv-chart__empty[hidden] { display: none; }
.server-page .srv-chart__empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 20px;
	font-size: 13.5px;
	line-height: 1.5;
	text-align: center;
	color: rgba(255, 255, 255, 0.88);
}
.server-page .srv-chart__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px 14px;
	flex-wrap: wrap;
	margin-top: 8px;
	font-size: 12px;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.9);
}
.server-page .srv-chart__legend { display: inline-flex; align-items: center; gap: 6px; }
.server-page .srv-chart__legend i {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 2px;
	background: #fff;
}
.server-page .srv-chart__range { font-variant-numeric: tabular-nums; }

/* ── Голосование ───────────────────────────────────────────────────── */
.server-page .srv-vote__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 6px;
}
.server-page .srv-vote__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: #14201a;
}
.server-page .srv-vote__count {
	padding: 4px 10px;
	border-radius: 999px;
	background: #e6f6ec;
	color: #0b6e41;
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
}
.server-page .mc-vote__form input[name="nick"] {
	border: 1px solid rgba(16, 38, 26, 0.14);
	border-radius: 9px;
	padding: 0 12px;
	background: #f7faf8;
	font-size: 14px;
	color: #14201a;
}
.server-page .mc-vote__form input[name="nick"]:focus {
	outline: none;
	border-color: #12995a;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(18, 153, 90, 0.12);
}
.server-page .mc-vote__form button {
	border: 0;
	border-radius: 9px;
	background: #12995a;
	color: #fff;
	font-weight: 600;
}
.server-page .mc-vote__form button:hover { background: #0f8a50; }
.server-page .mc-vote__form button:disabled { opacity: 0.65; cursor: progress; }
.server-page .srv-vote__msg {
	min-height: 18px;
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.4;
}
.server-page .srv-vote__msg.is-ok { color: #0b6e41; }
.server-page .srv-vote__msg.is-err { color: #c0392b; }
.server-page .mc-vote__meta { margin-top: 4px; font-size: 12.5px; }

/* ── Характеристики ────────────────────────────────────────────────── */
.server-page .srv-specs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}
.server-page .srv-spec {
	min-width: 0;
	padding: 11px 13px;
	border-radius: 10px;
	background: #f6faf7;
	border: 1px solid rgba(18, 153, 90, 0.12);
}
.server-page .srv-spec__k {
	display: block;
	margin-bottom: 3px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #6a7a71;
}
.server-page .srv-spec__v {
	display: block;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	color: #14201a;
	overflow-wrap: anywhere;
}
.server-page .srv-spec__v--small { font-size: 13.5px; font-weight: 600; }
.server-page .srv-spec__v--score { color: #0b6e41; }
.server-page .srv-spec__v--motd {
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.5;
	color: #3c4741;
}
.server-page .srv-spec--wide { grid-column: 1 / -1; }
.server-page .srv-on { color: #0b6e41; }
.server-page .srv-off { color: #6a7a71; }
.server-page .srv-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
}
.server-page .srv-status i {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #9aa7a0;
}
.server-page .srv-status.is-on { color: #0b6e41; }
.server-page .srv-status.is-on i { background: #12995a; box-shadow: 0 0 0 3px rgba(18, 153, 90, 0.15); }
.server-page .srv-status.is-off { color: #6a7a71; }
.server-page .srv-status.is-pending { color: #a16207; }
.server-page .srv-status.is-pending i { background: #d9a514; }

/* ── Описание и теги ───────────────────────────────────────────────── */
.server-page .srv-desc__body {
	font-size: 14.5px;
	line-height: 1.6;
	color: #3c4741;
	overflow-wrap: anywhere;
}
.server-page .srv-tags .tag-item { padding: 0; background: #f2f7f4; border-color: rgba(18, 153, 90, 0.16); }
.server-page .srv-tags .tag-item a {
	display: inline-block;
	padding: 6px 13px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	color: #0b6e41;
	text-decoration: none;
}
.server-page .srv-tags .tag-item:hover { background: #12995a; border-color: #12995a; }
.server-page .srv-tags .tag-item:hover a { color: #fff; }

/* ── Похожие серверы (строки как в списке) ─────────────────────────── */
.server-page .srv-rel-list .list-body { padding: 0; gap: 8px; }
.server-page .srv-rel-list .list-body .server-item {
	background: #f8fbf9;
	border-color: rgba(16, 38, 26, 0.08);
	padding: 10px 12px;
}
.server-page .srv-rel-list .list-body .server-item:hover {
	transform: none;
	background: #f0f7f3;
	border-color: rgba(18, 153, 90, 0.25);
}
.server-page .srv-rel-list .list-body .server-item .col .main-row {
	grid-template-rows: auto auto auto;
	gap: 2px;
}
.server-page .srv-letter {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	background: #e6f6ec;
	color: #0b6e41;
	font-size: 22px;
	font-weight: 800;
}
.server-page .srv-rel-list .tag-list { min-width: 0; }
.server-page .srv-rel-list .server-item .col.col-ip i { margin-right: 5px; color: #12995a; }

/* ── Правая колонка ────────────────────────────────────────────────── */
.server-page .srv-preview .map-img {
	height: 210px;
	background: #0b6e41 center / cover no-repeat;
}
.server-page .srv-preview .map-img.srv-preview__logo-wrap,
.server-page .srv-preview .map-img.srv-preview__fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 50% 32%, #1fae6b 0%, #0b6e41 68%);
	-webkit-filter: none;
	filter: none;
	-webkit-mask: none;
	mask: none;
	background-size: auto;
}
.server-page .srv-preview__logo {
	width: 96px;
	height: 96px;
	border-radius: 18px;
	object-fit: cover;
	background: #fff;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.server-page .srv-preview__tile {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 96px;
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.16);
	border: 1px solid rgba(255, 255, 255, 0.24);
	font-size: 44px;
	font-weight: 800;
	line-height: 1;
	color: #fff;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
.server-page .server-preview-v2.srv-preview .online-box .online-bar {
	border-color: rgba(18, 153, 90, 0.28);
	background: #eef6f1;
}
.server-page .server-preview-v2.srv-preview .online-box .online-bar .current {
	background: linear-gradient(90deg, #12995a 0%, #34c07c 100%);
}
.server-page .srv-preview .about-list-table .row-about .td a {
	color: #0b6e41;
	font-weight: 600;
	text-decoration: none;
}
.server-page .srv-preview .about-list-table .row-about .td a:hover { text-decoration: underline; }

/* Зелёная карточка: логотип + ключевые статы, белый текст на брендовом фоне. */
.server-page .srv-side {
	background: #12995a !important;
	border: 0;
	padding: 16px 18px !important;
	color: #fff;
	box-shadow: 0 8px 24px rgba(18, 153, 90, 0.22);
}
.server-page .srv-side__brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	margin-bottom: 14px;
}
.server-page .srv-side__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	font-size: 20px;
	font-weight: 800;
}
.server-page .srv-side__logo img { width: 100%; height: 100%; object-fit: cover; }
.server-page .srv-side__about { min-width: 0; }
.server-page .srv-side__name {
	display: block;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
	overflow-wrap: anywhere;
}
.server-page .srv-side__meta {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.9);
	overflow-wrap: anywhere;
}
.server-page .srv-side__stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 14px;
}
.server-page .srv-side__stats > div {
	min-width: 0;
	padding: 8px 10px;
	border-radius: 9px;
	background: rgba(0, 0, 0, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.18);
}
.server-page .srv-side__stats span {
	display: block;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.92);
}
.server-page .srv-side__stats b {
	display: block;
	font-size: 15px;
	line-height: 1.3;
	color: #fff;
	overflow-wrap: anywhere;
}
.server-page .srv-side__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	height: 38px;
	border-radius: 9px;
	background: #fff;
	color: #0b6e41;
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.15s;
}
.server-page .srv-side__cta:hover { background: #eafaf1; color: #0b6e41; }

/* «Это ваш сервер?» — в брендовом зелёном, а не в синем. */
.server-page .srv-access .access-card {
	background: #f0faf4;
	border-color: rgba(18, 153, 90, 0.22);
	border-radius: 12px;
}
.server-page .srv-access .access-icon { color: #12995a; background: rgba(18, 153, 90, 0.12); }
.server-page .srv-access .access-title { color: #0b6e41; }
.server-page .srv-access .access-btn { background: #12995a; box-shadow: none; }
.server-page .srv-access .access-btn:hover { background: #0f8a50; opacity: 1; }

/* Виджет. */
.server-page .srv-widget .widget-promo-header { margin-bottom: 10px; }
.server-page .srv-widget .widget-promo-header i { color: #12995a; font-size: 15px; }
.server-page .srv-widget .widget-promo-header .title { margin: 0; font-size: 14px; font-weight: 700; color: #14201a; }
.server-page .srv-widget .widget-preview {
	margin-bottom: 10px;
	border-radius: 10px;
	border: 1px solid rgba(16, 38, 26, 0.1);
	background: #101a15;
}
.server-page .srv-widget__card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	min-width: 0;
	color: #fff;
}
.server-page .srv-widget__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 9px;
	overflow: hidden;
	background: #12995a;
	color: #fff;
	font-size: 17px;
	font-weight: 800;
}
.server-page .srv-widget__logo img { width: 100%; height: 100%; object-fit: cover; }
.server-page .srv-widget__txt { flex: 1 1 auto; min-width: 0; }
.server-page .srv-widget__txt b {
	display: block;
	font-size: 13px;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.server-page .srv-widget__txt span {
	display: block;
	margin-top: 2px;
	font-size: 11.5px;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.7);
}
.server-page .srv-widget__play {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #12995a;
	color: #fff;
	font-size: 10px;
}
.server-page .srv-widget .widget-code {
	min-height: 64px;
	padding: 10px 38px 10px 10px;
	background: #f6faf7;
	border-color: rgba(16, 38, 26, 0.14);
	color: #33413a;
	font-size: 10.5px;
	line-height: 1.5;
	word-break: break-all;
	overflow-wrap: anywhere;
}
.server-page .srv-widget .widget-code:focus {
	border-color: #12995a;
	box-shadow: 0 0 0 3px rgba(18, 153, 90, 0.12);
}
.server-page .srv-widget .widget-copy-btn {
	background: #fff;
	border-color: rgba(18, 153, 90, 0.2);
	color: #12995a;
}
.server-page .srv-widget .widget-copy-btn:hover,
.server-page .srv-widget .widget-copy-btn.copied { background: #12995a; border-color: #12995a; color: #fff; }
.server-page .srv-widget .widget-hint { margin: 8px 0 0; font-size: 11.5px; line-height: 1.45; color: #718077; }

/* ── Тост ──────────────────────────────────────────────────────────── */
.srv-toast {
	position: fixed;
	left: 50%;
	bottom: 22px;
	z-index: 9999;
	max-width: calc(100vw - 32px);
	padding: 10px 16px;
	border-radius: 10px;
	background: #0d2a1d;
	color: #fff;
	font-size: 13px;
	line-height: 1.4;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 12px);
	transition: opacity 0.18s ease, transform 0.18s ease;
}
.srv-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── Адаптив ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
	.server-page .srv-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Планшеты: боковая колонка 420px душит основную — одна колонка, превью под шапкой. */
@media (min-width: 768px) and (max-width: 1100px) {
	.server-page .grid-inner {
		display: flex;
		flex-direction: column;
		gap: 14px;
	}
	.server-page .grid-inner > .server-sidebar { display: contents; }
	.server-page .grid-inner > .server-main-header { order: 1; width: 100%; }
	.server-page .server-sidebar > .server-preview-v2 { order: 2; width: 100%; }
	.server-page .grid-inner > .server-main:not(.server-main-header) { order: 3; width: 100%; }
	.server-page .server-sidebar > .server-bar {
		order: 4;
		display: flex;
		flex-direction: column;
		gap: 12px;
		width: 100%;
		min-width: 0;
	}
	.server-page .srv-preview .map-img { height: 190px; }
}

@media (max-width: 767px) {
	.server-page .srv-lead { font-size: 14px; margin-bottom: 14px; }
	.server-page .srv-card { padding: 15px 14px; border-radius: 12px; margin-bottom: 14px; }
	.server-page .srv-chart { padding: 14px 14px 10px; border-radius: 12px; margin-bottom: 14px; }
	.server-page .srv-chart__plot { height: 200px; }
	.server-page .srv-chart__title,
	.server-page .srv-card__title,
	.server-page .srv-vote__title { font-size: 15px; }
	.server-page .srv-chart__foot { font-size: 11.5px; }
	.server-page .srv-preview .map-img { height: 168px; }
	.server-page .srv-rel-list .list-body { padding: 0; }
	.server-page .srv-rel-list .list-body .server-item { padding: 10px 12px; }
	.server-page .srv-specs { gap: 8px; }
	.server-page .server-main .title h1 { font-size: 23px; overflow-wrap: anywhere; }
	.server-page .server-main .title .more { flex-wrap: wrap; }
	.server-page .server-main .serverbar__btn--ghost .serverbar__label { display: inline; }
	.server-page .srv-side__stats b { font-size: 14px; }
}

@media (max-width: 420px) {
	.server-page .srv-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.server-page .srv-chart__plot { height: 182px; }
	.server-page .srv-chart__badge { font-size: 11.5px; padding: 4px 9px; }
	.server-page .mc-vote__form { flex-direction: column; }
	.server-page .mc-vote__form button { width: 100%; }
	.server-page .srv-side__stats { gap: 7px; }
	.server-page .srv-side { padding: 14px 14px !important; }
}
