@import 'apps.css';

.summary {
	color: #bbb;
	margin-bottom: 1.5rem;
	line-height: 1.5;
	font-size: 0.95rem;
	white-space: pre-line;
}

/* Definition lists */
dl {
	display: grid;
	grid-template-columns: 250px 1fr;
	gap: 0.25rem 2rem;
	margin-bottom: 2rem;
	align-items: start;
	margin-top: 0;
	font-weight: 100;
}

dt {
	grid-column: 1;
	font-weight: 500;
	color: #fff;
	display: flex;
	align-items: flex-start;
	justify-content: flex-end;
	gap: 0.25rem;
	text-align: right;
	border-right: 1px solid rgba(255, 255, 255, 0.1);
	padding-right: 0.5rem;
	padding-top: 0.2rem;
	margin-bottom: 0;
	min-height: 1.5rem;
}

dd {
	grid-column: 2;
	margin-left: 0;
	color: #999;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding-left: 0;
	margin-bottom: 0;
	width: 100%;
	box-sizing: border-box;
}

dd > p {
	margin: 0;
	display: flex;
	align-items: center;
	min-height: 1.5rem;
}

.specifications,
.maintenance-log {
	margin-left: 0;
	margin-bottom: 0.25rem;
	width: 100%;
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 8px;
	padding: 0 0.75rem;
	background: rgba(255, 255, 255, 0.03);
	box-sizing: border-box;
}

.maintenance-log {
	margin-top: 1rem;
}

/* The Table inner */
table {
	width: 100%;
	border-collapse: collapse;
	border: none;
	background: transparent;
	margin: 0;
	font-size: 0.85em;
}

/* Cells */
table {
	td,
	th {
		padding: 0.25rem 0.75rem;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
		text-align: left;
		color: #ccc;
	}
}

/* Remove bottom border from last row */
table tbody tr:last-child td,
table tbody tr:last-child th {
	border-bottom: none;
}

/* Maintenance Header */
.maintenance-log::before {
	content: 'Maintenance';
	display: block;
	margin: 0 0 0.25rem 0.5rem;
	color: #aaa;
	font-size: 0.85em;
	padding: 0.25rem 0 0 0;
	font-weight: 500;
}

/* Paragraphs in cells */
table p,
table p > * {
	margin: 0;
	padding: 0;
	line-height: inherit;
}

/* Chips */
span.ok,
span.degraded,
span.unknown,
span.inoperative,
span.absent {
	color: inherit;
	display: inline-flex;
	align-items: baseline;
}

/* Common chip styles */
span.ok::before,
span.degraded::before,
span.unknown::before,
span.inoperative::before,
span.absent::before {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.75em;
	text-transform: uppercase;
	font-weight: 600;
	font-style: normal;
	letter-spacing: 0.05em;
	line-height: 1.2;
	vertical-align: middle;
	width: 120px;
	text-align: center;
	box-sizing: border-box;
	flex-shrink: 0;
	margin-right: 0.6em; /* Spacing between chip and text */
}

span.ok::before {
	content: 'OK';
	background-color: rgba(46, 204, 113, 0.2);
	color: #2ecc71;
	border: 1px solid rgba(46, 204, 113, 0.3);
}
span.degraded::before {
	content: 'Degraded';
	background-color: rgba(243, 156, 18, 0.2);
	color: #f39c12;
	border: 1px solid rgba(243, 156, 18, 0.3);
}
span.unknown::before {
	content: 'Unknown';
	background-color: rgba(149, 165, 166, 0.2);
	color: #95a5a6;
	border: 1px solid rgba(149, 165, 166, 0.3);
}
span.inoperative::before {
	content: 'Inoperative';
	background-color: rgba(231, 76, 60, 0.2);
	color: #e74c3c;
	border: 1px solid rgba(231, 76, 60, 0.3);
}
span.absent::before {
	content: 'Absent';
	background-color: rgba(231, 76, 60, 0.2);
	color: #e74c3c;
	border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Global Resets */
.paragraph {
	margin: 0;
}
.sect1,
.sect2 {
	margin-bottom: 0;
}
.sectionbody {
	margin-top: 0;
}

.summary,
.sect1 > p,
.sect2 > p,
.sect1 > .sectionbody > .paragraph > p,
.sect2 > .paragraph > p {
	color: #bbb;
	margin-bottom: 1.5rem;
	line-height: 1.5;
	font-size: 0.95rem;
	white-space: pre-line;
}

/* Filter Bar */
.filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 2rem;
	padding-bottom: 1rem;
	align-items: center;
}

.filter-label {
	color: #999;
	margin-right: 0.5rem;
	font-size: 0.9em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.filter-btn {
	background: transparent;
	border: 1px solid transparent;
	padding: 4px 10px;
	border-radius: 4px;
	color: #666;
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 500;
	transition: all 0.2s;
	opacity: 0.5;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	width: 120px;
	text-align: center;
	display: inline-flex;
	justify-content: center;
}

.filter-btn:hover {
	opacity: 0.8;
}

.filter-btn.active {
	opacity: 1;
}

/* Active styles matching the tags */
.filter-btn.active.status-ok {
	background-color: rgba(46, 204, 113, 0.2);
	color: #2ecc71;
	border-color: rgba(46, 204, 113, 0.3);
}
.filter-btn.active.status-degraded {
	background-color: rgba(243, 156, 18, 0.2);
	color: #f39c12;
	border-color: rgba(243, 156, 18, 0.3);
}
.filter-btn.active.status-unknown {
	background-color: rgba(149, 165, 166, 0.2);
	color: #95a5a6;
	border-color: rgba(149, 165, 166, 0.3);
}
.filter-btn.active.status-inoperative {
	background-color: rgba(231, 76, 60, 0.2);
	color: #e74c3c;
	border-color: rgba(231, 76, 60, 0.3);
}
.filter-btn.active.status-absent {
	background-color: rgba(231, 76, 60, 0.2);
	color: #e74c3c;
	border-color: rgba(231, 76, 60, 0.3);
}

/* Info Button */
.info-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #888;
	cursor: pointer;
	padding: 0;
	border-radius: 50%;
	width: 16px;
	height: 16px;
	opacity: 0.6;
	transition: all 0.2s;
	font-size: 10px;
	margin-left: 0.25rem;
	vertical-align: middle;
}

.info-btn:hover,
.info-btn.active {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.5);
	opacity: 1;
}

.info-btn::before {
	content: 'i';
	font-family: serif;
	font-style: italic;
	font-weight: 700;
}

.info-btn.placeholder {
	visibility: hidden;
	opacity: 0;
	cursor: default;
	pointer-events: none;
}

.details-hidden .specifications,
.details-hidden .maintenance-log,
.details-hidden table.tableblock {
	display: none;
}
