/* Status page. Built on the theme tokens; Inter throughout. */

.prosyo-status-page {
	--ps-ok: #5ee6a8;
	--ps-warn: #f5b84b;
	--ps-down: #ff5c7a;
	--ps-maint: #8c9bff;
	--ps-none: rgba(255, 255, 255, .1);
	--ps-line: var(--stoke, rgba(255, 255, 255, .1));
	--ps-card: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
	--ps-muted: var(--paragraph, #8e8c99);
	--ps-text: var(--text, #f3f3f3);
}

/* Hero banner */
.ps-hero .hero-block { align-items: center; }

.ps-banner {
	--tone: var(--ps-ok);
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 14px;
	margin-top: 28px;
	padding: 14px 22px;
	border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--tone) 10%, rgba(255, 255, 255, .02));
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	box-shadow: 0 18px 50px -24px color-mix(in srgb, var(--tone) 70%, transparent);
	font-family: Inter, sans-serif;
}

.ps-banner--degraded { --tone: var(--ps-warn); }
.ps-banner--outage { --tone: var(--ps-down); }
.ps-banner--maintenance { --tone: var(--ps-maint); }

.ps-banner__text { color: var(--ps-text); font-size: 17px; font-weight: 600; }

.ps-pulse {
	position: relative;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--tone);
}

.ps-pulse::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid var(--tone);
	opacity: 0;
	animation: ps-pulse 2.4s ease-out infinite;
}

@keyframes ps-pulse {
	0% { transform: scale(.4); opacity: .8; }
	100% { transform: scale(1.4); opacity: 0; }
}

/* Layout */
.ps-section { padding-bottom: clamp(56px, 8vw, 110px); font-family: Inter, sans-serif; color: var(--ps-text); }
.ps-wrap { display: grid; gap: clamp(40px, 6vw, 72px); max-width: 1040px; }
.ps-block { display: grid; gap: 18px; }
.ps-heading { margin: 0; font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.01em; color: var(--ps-text); }
.ps-heading-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.ps-empty, .ps-note { margin: 0; color: var(--ps-muted); font-size: 15px; }
.ps-note { font-size: 13px; }

/* Setup notice (administrators only) */
.ps-setup { display: grid; justify-items: start; gap: 14px; padding: 28px; border: 1px dashed rgba(140, 155, 255, .45); border-radius: var(--_border-radius---br-slim, 24px); background: var(--ps-card); }
.ps-setup p { margin: 0; max-width: 640px; color: var(--ps-muted); font-size: 15px; line-height: 1.6; }
.ps-setup__link { display: inline-flex; padding: 12px 18px; border-radius: 10px; background: linear-gradient(135deg, #7350ff, #b638ff); color: #fff; font-weight: 500; text-decoration: none; }
.ps-setup__link:hover { color: #fff; filter: brightness(1.1); }

/* Chips and legend */
.ps-chip {
	--tone: var(--ps-ok);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: none;
	padding: 6px 12px;
	border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--tone) 12%, transparent);
	color: var(--tone);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
}

.ps-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ps-chip--degraded { --tone: var(--ps-warn); }
.ps-chip--outage { --tone: var(--ps-down); }
.ps-chip--maintenance { --tone: var(--ps-maint); }
.ps-chip--nodata { --tone: #a5a2b8; }

/* :not(#_) outranks a plugin's site-wide `ul { flex-direction: column }`. */
.ps-legend:not(#_) { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; color: var(--ps-muted); font-size: 13px; }
.ps-legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.ps-legend li::before, .ps-legend li::marker { content: none; }
.ps-swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--ps-ok); }
.ps-swatch--degraded { background: var(--ps-warn); }
.ps-swatch--outage { background: var(--ps-down); }
.ps-swatch--maintenance { background: var(--ps-maint); }
.ps-swatch--nodata { background: var(--ps-none); }

/* Services */
.ps-services {
	border: 1px solid var(--ps-line);
	border-radius: var(--_border-radius---br-slim, 24px);
	background: var(--ps-card);
	overflow: hidden;
}

.ps-service { display: grid; gap: 14px; padding: 22px 26px; }
.ps-service + .ps-service { border-top: 1px solid var(--ps-line); }
.ps-service__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ps-service__name { margin: 0; font-size: 17px; font-weight: 600; color: var(--ps-text); }
.ps-service__desc { margin: 4px 0 0; color: var(--ps-muted); font-size: 14px; line-height: 1.5; }

.ps-bars { display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 34px; }
.ps-bar { border-radius: 2px; background: var(--ps-ok); opacity: .9; transition: opacity .2s ease, transform .2s ease; }
.ps-bar:hover { opacity: 1; transform: scaleY(1.12); }
.ps-bar--degraded { background: var(--ps-warn); }
.ps-bar--outage { background: var(--ps-down); }
.ps-bar--maintenance { background: var(--ps-maint); }
.ps-bar--nodata { background: var(--ps-none); }

.ps-bars__foot { display: flex; justify-content: space-between; gap: 12px; color: var(--ps-muted); font-size: 12px; }
.ps-bars__uptime { color: var(--ps-text); font-weight: 500; }
.ps-range-short { display: none; }

/* Events */
.ps-events { display: grid; gap: 14px; }

.ps-event {
	--tone: var(--ps-maint);
	position: relative;
	padding: 22px 26px 22px 30px;
	border: 1px solid var(--ps-line);
	border-radius: var(--_border-radius---br-fine, 16px);
	background: var(--ps-card);
	overflow: hidden;
}

.ps-event::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--tone); }
.ps-event--degraded { --tone: var(--ps-warn); }
.ps-event--outage { --tone: var(--ps-down); }
.ps-event__head { display: flex; align-items: center; gap: 12px; }
.ps-event__state { color: var(--ps-muted); font-size: 13px; }
.ps-event__title { margin: 12px 0 4px; font-size: 18px; font-weight: 600; color: var(--ps-text); }
.ps-event__meta { margin: 0; color: var(--ps-muted); font-size: 14px; }
.ps-event__body { margin: 12px 0 0; color: #cfcbe0; font-size: 15px; line-height: 1.6; }

.ps-timeline { display: grid; gap: 12px; margin: 18px 0 0; padding: 0 0 0 18px; border-left: 1px solid var(--ps-line); list-style: none; }
.ps-timeline li { position: relative; display: grid; gap: 2px; margin: 0; padding: 0; font-size: 14px; }
.ps-timeline li::marker { content: none; }
.ps-timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }
.ps-timeline__state { font-weight: 600; color: var(--ps-text); }
.ps-timeline__msg { color: #cfcbe0; line-height: 1.55; }
.ps-timeline time { color: var(--ps-muted); font-size: 12px; }

/* Calendar */
.ps-cal__nav { display: inline-flex; align-items: center; gap: 10px; }
.ps-cal__month { min-width: 150px; text-align: center; font-weight: 500; }

.ps-cal__btn {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--ps-line);
	border-radius: 10px;
	background: rgba(255, 255, 255, .03);
	color: var(--ps-text);
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease;
}

.ps-cal__btn:hover:not(:disabled) { border-color: rgba(182, 56, 255, .6); background: rgba(182, 56, 255, .12); }
.ps-cal__btn:disabled { opacity: .35; cursor: default; }

.ps-cal {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 20px;
	padding: 22px;
	border: 1px solid var(--ps-line);
	border-radius: var(--_border-radius---br-slim, 24px);
	background: var(--ps-card);
}

.ps-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-content: start; }
.ps-cal__dow { padding-bottom: 6px; color: var(--ps-muted); font-size: 12px; text-align: center; text-transform: uppercase; letter-spacing: .06em; }

.ps-cal__day {
	--tone: var(--ps-none);
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	border: 1px solid transparent;
	border-radius: 10px;
	background: color-mix(in srgb, var(--tone) 18%, rgba(255, 255, 255, .02));
	color: var(--ps-text);
	font: 500 14px/1 Inter, sans-serif;
	cursor: pointer;
	transition: border-color .2s ease, transform .2s ease;
}

.ps-cal__day:hover, .ps-cal__day:focus-visible { border-color: color-mix(in srgb, var(--tone) 70%, transparent); outline: none; transform: translateY(-1px); }
.ps-cal__day[aria-pressed="true"] { border-color: #b638ff; box-shadow: 0 0 0 1px #b638ff inset; }
.ps-cal__day--operational { --tone: var(--ps-ok); }
.ps-cal__day--degraded { --tone: var(--ps-warn); }
.ps-cal__day--outage { --tone: var(--ps-down); }
.ps-cal__day--maintenance { --tone: var(--ps-maint); }
.ps-cal__day--empty { visibility: hidden; }
.ps-cal__day--off { opacity: .35; cursor: default; }
.ps-cal__day--today::after { content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--ps-text); }
.ps-cal__day--event::before { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: #b638ff; box-shadow: 0 0 8px #b638ff; }

.ps-cal__detail { display: grid; align-content: start; gap: 12px; padding-left: 20px; border-left: 1px solid var(--ps-line); }
.ps-cal__date { margin: 0; font-size: 16px; font-weight: 600; }
.ps-cal__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ps-cal__list li { display: grid; gap: 3px; margin: 0; padding: 12px 14px; border: 1px solid var(--ps-line); border-radius: 12px; background: rgba(255, 255, 255, .02); font-size: 14px; }
.ps-cal__list li::marker { content: none; }
.ps-cal__list strong { font-weight: 600; }
.ps-cal__list span { color: var(--ps-muted); font-size: 13px; }

@media (max-width: 991px) {
	.ps-cal { grid-template-columns: 1fr; }
	.ps-cal__detail { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--ps-line); }
}

@media (max-width: 767px) {
	.ps-banner { border-radius: 20px; padding: 14px 18px; }
	.ps-service { padding: 18px; }
	.ps-service__head { flex-direction: column; gap: 10px; }
	.ps-bars { grid-template-columns: repeat(45, 1fr); height: 28px; }
	.ps-bar:nth-child(-n+45) { display: none; }
	.ps-range-long { display: none; }
	.ps-range-short { display: inline; }
	.ps-event { padding: 18px 18px 18px 22px; }
	.ps-cal { padding: 16px; }
	.ps-cal__grid { gap: 4px; }
	.ps-cal__day { border-radius: 8px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
	.ps-pulse::after { animation: none; }
}
