:root {
	--status-green: #28a745;
	--status-green-bg: #e0f7e0;
	--status-yellow: #ffc107;
	--status-yellow-text: #d39e00;
	--status-yellow-bg: #fff3cd;
	--status-red: #dc3545;
	--status-red-dark: #721c24;
	--status-red-bg: #f8d7da;
	--status-critical-bg: #f5c6cb;
	--status-gray: #6c757d;
	--status-gray-light: #adb5bd;
	--status-gray-bg: #e9ecef;
	--status-unknown-bg: #dee2e6;

	--text-main: #333;
	--text-muted: #777;
	--border-soft: #afafaf;
	--surface: #fff;
	--surface-soft: #f8f9fa;

	--radius: 8px;
	--radius-lg: 10px;
	--shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
	--shadow-strong: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.statuspage-day-timeline {
	display: block;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--border-soft);
}

.statuspage-day-timeline-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	font-size: 0.9rem;
	margin-bottom: 8px;
	color: var(--text-main);
}

.statuspage-day-timeline-header span {
	color: var(--text-muted);
	font-size: 0.85rem;
}

.statuspage-day-timeline-bars {
	display: grid;
	grid-template-columns: repeat(96, 1fr);
	gap: 2px;
	height: 28px;
}

.statuspage-timeline-slot {
	border-radius: 2px;
	min-width: 2px;
	cursor: pointer;
}

.statuspage-day-timeline-footer {
	position: relative;
	height: 18px;
	margin-top: 6px;
	font-size: 0.75rem;
	color: var(--text-muted);
}

.statuspage-day-timeline-footer span {
	position: absolute;
	top: 0;
	transform: translateX(-50%);
	white-space: nowrap;
}

.statuspage-day-timeline-footer span:nth-child(1) {
	left: 0;
	transform: translateX(0);
}

.statuspage-day-timeline-footer span:nth-child(2) {
	left: 25%;
}

.statuspage-day-timeline-footer span:nth-child(3) {
	left: 50%;
}

.statuspage-day-timeline-footer span:nth-child(4) {
	left: 75%;
}

.statuspage-day-timeline-footer span:nth-child(5) {
	left: 100%;
	transform: translateX(-100%);
}

.statuspage-day-timeline-footer span:last-child {
	text-align: right;
}

@media (max-width: 768px) {
	.statuspage-day-timeline-bars {
		gap: 1px;
		height: 24px;
	}

	.statuspage-day-timeline-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* =========================================================
   Basis
   ========================================================= */

.statuspage-overview,
.statuspage-details,
.serverstatus_server-liste {
	width: 100%;
}

.statuspage-overview {
	margin-top: 25px;
}

.statuspage-details {
	margin-top: 28px;
}

.statuspage-group {
	margin-bottom: 28px;
	background-color: var(--surface);
	border: 1px solid #e2e2e2;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	overflow: hidden;
}

.statuspage-group-content {
	display: block;
}


/* =========================================================
   Globaler Status
   ========================================================= */

.statuspage-banner {
	padding: 18px 22px;
	border-radius: var(--radius);
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 10px;
	color: #fff;
	box-shadow: var(--shadow);
}

.statuspage-banner-online {
	background-color: var(--status-green);
}

.statuspage-banner-partial {
	background-color: var(--status-yellow);
	color: var(--text-main);
}

.statuspage-banner-critical {
	background-color: var(--status-red);
}

.statuspage-banner-unknown {
	background-color: var(--status-gray);
}

.statuspage-last-update {
	color: var(--text-muted);
	font-size: 0.9rem;
	margin: 0 0 18px 2px;
}


/* =========================================================
   Legende
   ========================================================= */

.statuspage-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
	background-color: var(--surface);
	border-radius: var(--radius);
	padding: 12px 15px;
	margin-bottom: 24px;
	box-shadow: var(--shadow);
	font-size: 0.9rem;
	color: #555;
}

.legend-separator {
	color: #c7ccd1;
	font-weight: 300;
	user-select: none;
}

.statuspage-legend span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.legend-dot,
.status-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
	flex: 0 0 10px;
}

.legend-online,
.status-dot-online {
	background-color: var(--status-green);
}

.legend-partial,
.status-dot-partial {
	background-color: var(--status-yellow);
}

.legend-critical,
.status-dot-critical,
.status-dot-offline {
	background-color: var(--status-red);
}

.legend-unknown,
.status-dot-unknown,
.status-dot-outofservice {
	background-color: var(--status-gray-light);
}


/* =========================================================
   Ausklappbare Gruppen
   ========================================================= */

.statuspage-group-toggle {
	width: 100%;
	border: none;
	background-color: var(--surface-soft);
	color: var(--text-main);
	padding: 16px 18px;
	text-align: left;
	font-size: 1.25rem;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid var(--border-soft);
}

.statuspage-group-toggle span {
	display: inline-flex;
	align-items: center;
	gap: 9px;
}

.statuspage-group-toggle::after {
	content: "\f078";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	transition: transform 0.2s ease;
	font-size: 0.95rem;
	color: #555;
}

.statuspage-group.open .statuspage-group-toggle::after {
	transform: rotate(180deg);
}

.statuspage-group:not(.open) .statuspage-group-toggle {
	border-bottom: none;
}


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

.statuspage-card {
	background-color: var(--surface);
	border-radius: 0;
	box-shadow: none;
	overflow: hidden;
}

.statuspage-row {
	padding: 18px 20px;
	border-bottom: 2px solid var(--border-soft);
	transition: background-color 0.15s ease;
}

.statuspage-row:last-child {
	border-bottom: none;
}

.statuspage-row.open {
	background-color: #fcfcfc;
}


.statuspage-title-text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.statuspage-row-status {
	font-size: 0.98rem;
	font-weight: 700;
	white-space: nowrap;
}

.statuspage-bars {
	display: grid;
	grid-template-columns: repeat(45, 1fr);
	gap: 3px;
	height: 34px;
}

.statuspage-bar {
	position: relative;
	border-radius: 3px;
	cursor: default;
	min-width: 4px;
	transition: transform 0.12s ease, opacity 0.12s ease;
}

body.logged-in .statuspage-bar {
	cursor: pointer;
}

body.logged-in .statuspage-bar:hover {
	transform: translateY(-2px);
	opacity: 0.85;
}

.statuspage-bar-excellent {
	background-color: #16a34a;
}

.statuspage-bar-good {
	background-color: #84cc16;
}

.statuspage-bar-minor {
	/* background-color: #84cc16; */
	background-color: #4ade80;
}

.statuspage-bar-warning {
	background-color: #facc15;
}

.statuspage-bar-major {
	background-color: #f97316;
}

.statuspage-bar-critical {
	background-color: #dc2626;
}

.statuspage-bar-unknown,
.statuspage-bar-outofservice {
	background-color: #c7ccd1;
}

.statuspage-row-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #888;
	font-size: 0.85rem;
	margin-top: 9px;
	gap: 10px;
}

.statuspage-row-details {
	display: none;
	margin-top: 14px;
	padding: 12px 14px;
	background-color: var(--surface-soft);
	border-radius: 6px;
	color: #444;
	font-size: 0.92rem;
}

.statuspage-row-detail-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.statuspage-row-detail-grid div {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.statuspage-row-detail-grid strong {
	color: var(--text-main);
	font-size: 0.85rem;
}

.statuspage-row-detail-grid span {
	color: #666;
	overflow-wrap: anywhere;
}

.statuspage-row-toggle-icon::before {
	content: "\f078";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	color: #232323;
	font-size: 0.9rem;
	display: inline-block;
	transition: transform 0.2s ease;
}

.statuspage-row.open .statuspage-row-toggle-icon::before {
	transform: rotate(180deg);
}

.statuspage-row-header {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	grid-template-areas: "title status toggle";
	align-items: center;
	margin-bottom: 8px;
	column-gap: 12px;
	cursor: pointer;
}

.statuspage-title {
	grid-area: title;
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	font-size: 1rem;
	font-weight: 700;
	color: var(--text-main);
}

.statuspage-row-status-wrap {
	display: contents;
}

.statuspage-row-status {
	grid-area: status;
}

.statuspage-row-toggle-icon {
	grid-area: toggle;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

body:not(.logged-in) .statuspage-row-header {
	cursor: default;
}

body:not(.logged-in) .statuspage-row-toggle-icon {
	display: none;
}


/* =========================================================
   Statusfarben
   ========================================================= */

.statuspage-text-online {
	color: var(--status-green);
}

.statuspage-text-partial {
	color: var(--status-yellow-text);
}

.statuspage-text-critical,
.statuspage-text-offline {
	color: var(--status-red);
}

.statuspage-text-outofservice,
.statuspage-text-unknown {
	color: var(--status-gray);
}


/* =========================================================
   Tooltip
   ========================================================= */

.statuspage-tooltip {
	position: absolute;
	z-index: 9999;
	background-color: #222;
	color: #fff;
	border-radius: var(--radius);
	padding: 10px 12px;
	font-size: 0.85rem;
	line-height: 1.45;
	min-width: 220px;
	max-width: 280px;
	box-shadow: var(--shadow-strong);
	display: none;
	pointer-events: none;
}

.statuspage-tooltip.visible {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.statuspage-tooltip strong {
	font-size: 0.9rem;
	margin-bottom: 2px;
}

.statuspage-tooltip hr {
	width: 100%;
	border: none;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	margin: 5px 0;
}


/* =========================================================
   Server-Details
   ========================================================= */

.serverstatus_server-liste {
	margin-top: 12px;
}

.serverstatus_server {
	background-color: var(--surface);
	padding: 20px;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	margin-top: 10px;
}

.serverstatus_server h2 {
	font-size: 1.5rem;
	color: var(--text-main);
	margin: 0 0 15px 0;
}

.status-section,
.ssl-section,
.setup-section,
.error-section,
.update-section {
	margin-bottom: 15px;
}

.update-section {
	margin-bottom: 0;
}

.status-section h3,
.ssl-section h3,
.setup-section h3,
.error-section h3,
.update-section h3 {
	font-size: 1.1rem;
	color: var(--text-main);
	margin: 0 0 8px 0;
}

.status-section p,
.ssl-section p,
.serverstatus_setup p,
.update-section p,
.serverstatus_errors {
	padding-left: 10px;
	margin: 6px 0;
}

.serverstatus_setup p {
	font-size: 1rem;
}

.serverstatus_setup strong,
.ssl-section strong {
	color: var(--text-main);
}


/* =========================================================
   Badges
   ========================================================= */

.serverstatus-badge,
.ssl-status {
	font-weight: 700;
	padding: 5px 7px;
	border-radius: 4px;
	display: inline-block;
}

.serverstatus-badge-online,
.ssl-status.valid {
	color: var(--status-green);
	background-color: var(--status-green-bg);
}

.serverstatus-badge-partial,
.ssl-status.warning {
	color: var(--status-yellow-text);
	background-color: var(--status-yellow-bg);
}

.serverstatus-badge-offline,
.ssl-status.expired {
	color: var(--status-red);
	background-color: var(--status-red-bg);
}

.serverstatus-badge-critical {
	color: var(--status-red-dark);
	background-color: var(--status-critical-bg);
	text-transform: uppercase;
	letter-spacing: 1px;
}

.serverstatus-badge-outofservice,
.serverstatus-badge-unknown,
.ssl-status.unknown {
	color: var(--status-gray);
	background-color: var(--status-gray-bg);
}

.serverstatus-badge-offline,
.serverstatus-badge-partial {
	text-transform: uppercase;
	letter-spacing: 1px;
}


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

.serverstatus_errors ul {
	list-style-type: none;
	padding-left: 0;
	margin: 0;
}

.serverstatus_errors li {
	color: var(--status-red);
	font-size: 1rem;
	margin-bottom: 4px;
}


/* =========================================================
   Loader
   ========================================================= */

#loader-container {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 30px 0;
}


/* =========================================================
   Mobile Ansicht
   ========================================================= */
@media (max-width: 768px) {
	.statuspage-banner {
		font-size: 1rem;
		padding: 15px 17px;
		text-align: center;
	}

	.statuspage-last-update {
		font-size: 0.9rem;
		text-align: center;
	}

	.statuspage-legend {
		font-size: 0.82rem;
		gap: 9px 12px;
	}

	.legend-separator {
		display: none;
	}

	.statuspage-group-toggle {
		font-size: 1.15rem;
		padding: 14px 15px;
	}

	.statuspage-row {
		padding: 15px;
	}

	.statuspage-title {
		grid-area: title;
		min-width: 0;
		width: 100%;
	}

	.statuspage-title-text {
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.statuspage-row-header {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"title toggle"
			"status status";
		row-gap: 4px;
		column-gap: 10px;
		align-items: center;
	}

	.statuspage-title {
		grid-area: title;
		min-width: 0;
		width: 100%;
	}

	.statuspage-row-status-wrap {
		display: contents;
	}

	.statuspage-row-status {
		grid-area: status;
		padding-left: 18px;
		white-space: normal;
	}

	.statuspage-row-toggle-icon {
		grid-area: toggle;
		justify-self: end;
		align-self: center;
	}

	body:not(.logged-in) .statuspage-row-toggle-icon {
		display: none;
	}

	.statuspage-bars {
		gap: 2px;
		height: 28px;
	}

	.statuspage-row-footer {
		font-size: 0.75rem;
	}

	.statuspage-row-detail-grid {
		grid-template-columns: 1fr;
	}

	.statuspage-tooltip {
		display: none !important;
	}

	.statuspage-bar {
		cursor: default;
	}

	body.logged-in .statuspage-bar:hover {
		transform: none;
		opacity: 1;
	}

	.serverstatus_server {
		padding: 16px;
	}

	.serverstatus_server h2 {
		font-size: 1.3rem;
	}

	.status-section h3,
	.ssl-section h3,
	.setup-section h3,
	.error-section h3,
	.update-section h3 {
		font-size: 1rem;
	}
	.statuspage-day-timeline {
		display: none !important;
	}	
}
