/* =========================
   Ergebnisbereich
========================= */

.results {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
	gap: 18px;
	font-size: 16px;
}

/* =========================
   Optionen
========================= */

.login-options {
	display: flex;
	align-items: center;
}

.option-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.stationsLoadAuto,
.showInternalServersOption {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 999px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	font-size: 14px;
	font-weight: 600;
	transition: background .18s ease, border-color .18s ease;
	cursor: pointer;
}

/* .stationsLoadAuto:hover, */
/* .showInternalServersOption:hover { */
	/* background: #f1f5f9; */
	/* border-color: #cbd5e1; */
/* } */

/* =========================
   Cards
========================= */

.server-card {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #ffffff, #f8fafc);
	border: 1px solid rgba(229, 231, 235, .95);
	border-radius: 22px;
	padding: 18px;
	box-shadow:
		0 1px 2px rgba(0, 0, 0, .04),
		0 12px 32px rgba(15, 23, 42, .08);
	transition: box-shadow .18s ease, border-color .18s ease;
}

.server-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #dbeafe, #dcfce7);
}

/* .server-card:hover { */
	/* box-shadow: */
		/* 0 2px 4px rgba(0, 0, 0, .05), */
		/* 0 14px 34px rgba(15, 23, 42, .10); */
	/* border-color: #d5dae3; */
/* } */

.server-card.error::before {
	background: #dc3545;
}

/* =========================
   Header
========================= */

.server-card-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px 12px;
	margin-bottom: 14px;
}

.station-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #111827;
	word-break: break-word;
}

/* =========================
   Status Badge
========================= */

.server-status {
	border-radius: 999px;
	padding: 7px 12px;
	font-size: 13px;
	font-weight: 800;
	white-space: nowrap;
}

.serverstatus_serverstatus_online {
	color: #087443;
	background: #e7f8ef;
}

.serverstatus_serverstatus_partial {
	color: #946200;
	background: #fff4d6;
}

.serverstatus_serverstatus_offline {
	color: #b42318;
	background: #fde8e7;
}

.serverstatus_serverstatus_critical {
	color: #7f1d1d;
	background: #f8d7da;
}

/* =========================
   Datenblöcke
========================= */

.server-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.server-grid-item {
	flex: 1;
	min-width: 140px;
	background: rgba(248, 250, 252, .9);
	border: 1px solid rgba(226, 232, 240, .95);
	border-radius: 14px;
	padding: 10px 12px;
}

.server-meta {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #64748b;
	margin-bottom: 4px;
}

.server-value {
	font-size: 14px;
	font-weight: 700;
	color: #111827;
}

/* =========================
   Interne Server
========================= */

.internal-servers {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid #eef2f7;
}

.internal-servers-title {
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
	color: #64748b;
	margin-bottom: 10px;
	text-transform: none;
	letter-spacing: 0;
}

.internal-server-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.server-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 10px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	border: 1px solid rgba(255, 255, 255, .7);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.server-chip i {
	font-size: 12px;
}

.server-chip.online {
	color: #087443;
	background: #e7f8ef;
}

.server-chip.partial {
	color: #946200;
	background: #fff4d6;
}

.server-chip.offline {
	color: #b42318;
	background: #fde8e7;
}

.server-chip.critical {
	color: #7f1d1d;
	background: #f8d7da;
}

.server-chip.outofservice {
	color: #4b5563;
	background: #f1f5f9;
}

/* =========================
   SSL Warnungen
========================= */

.ssl_messages {
	margin-top: 12px;
}

.ssl-error {
	display: inline-block;
	padding: 8px 12px;
	border-radius: 12px;
	background: #fff4d6;
	color: #946200;
	font-weight: 700;
}

/* =========================
   Fehler
========================= */

.error-messages {
	margin-top: 14px;
	font-weight: 700;
}

.error_ul {
	list-style: none;
	padding: 0;
	margin: 8px 0 0 0;
}

.error_li {
	color: #b42318;
	font-weight: 500;
	margin-bottom: 5px;
}

.station_error,
.error-message,
.errorMessage {
	color: #b42318;
	font-weight: 700;
}

/* =========================
   Loading
========================= */

.loading {
	text-align: center;
	padding: 80px 0;
	font-size: 1.3rem;
	color: #333;
}

.fa-spinner {
	margin-right: 10px;
}

.skeleton {
	position: relative;
	overflow: hidden;
	background: #e5e7eb;
	border-radius: 10px;
}

.skeleton::after {
	content: "";

	position: absolute;
	inset: 0;

	transform: translateX(-100%);

	background: linear-gradient(
		90deg,
		transparent,
		rgba(255,255,255,.6),
		transparent
	);

	animation: skeletonLoading 1.2s infinite;
}

@keyframes skeletonLoading {
	100% {
		transform: translateX(100%);
	}
}

.skeleton-title {
	height: 24px;
	width: 60%;
	margin-bottom: 20px;
}

.skeleton-label {
	height: 12px;
	width: 70px;
	margin-bottom: 8px;
}

.skeleton-value {
	height: 18px;
	width: 100px;
}

.skeleton-text {
	height: 16px;
	width: 240px;
	margin-bottom: 12px;
}

.skeleton-chip {
	height: 30px;
	width: 90px;
	border-radius: 999px;
}

.skeleton-card {
	pointer-events: none;
}

/* =========================
   Tablet & Mobile
========================= */

@media (max-width: 768px) {

	.results {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.server-card {
		padding: 14px;
		border-radius: 18px;
	}

	.server-card-header {
		margin-bottom: 10px;
	}

	.station-title {
		font-size: 1.05rem;
	}

	.server-status {
		font-size: 12px;
		padding: 6px 10px;
	}

	.ssl_row,
	.last_update_row {
		display: none;
	}

	.server-grid {
		display: block;
	}

	.server-grid-item {
		min-width: unset;
		margin-bottom: 8px;
	}

	.internal-servers {
		margin-top: 10px;
		padding-top: 10px;
	}

	.internal-servers-title {
		display: block;
		font-size: 12px;
		margin-bottom: 8px;
	}

	.server-chip {
		font-size: 12px;
		padding: 6px 9px;
	}
}

/* =========================
   Kleine Geräte
========================= */

@media (max-width: 420px) {

	.server-card-header {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 8px 12px;
	}

	.station-title {
		flex: 1 1 auto;
		min-width: 0;

		white-space: normal;
		word-break: break-word;
		overflow-wrap: anywhere;

		font-size: 1rem;
		line-height: 1.3;
		text-align: left;
	}

	.server-status {
		flex: 0 0 auto;
		align-self: flex-start;
	}

	.option-row {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 8px;
	}

	.stationsLoadAuto,
	.showInternalServersOption {
		display: flex;
		align-items: center;
		gap: 6px;

		width: auto;
		box-sizing: border-box;

		justify-content: flex-start;
	}

	.internal-servers-title {
		font-size: 12px;
		line-height: 1.4;
	}

	.server-chip {
		font-size: 12px;
		padding: 5px 8px;
	}
}