/* Cluster Tester Styles */

.cluster-tester-container {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	padding: 20px;
	background: #f8f9fa;
	border-radius: 8px;
}

.cluster-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid #dee2e6;
	flex-wrap: wrap;
	gap: 16px;
}

.cluster-header h2 {
	margin: 0;
	color: #343a40;
	font-size: 1.5rem;
	font-weight: 600;
}

.auto-refresh-control {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.auto-refresh-control label {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 0.9rem;
	color: #495057;
}

.auto-refresh-control select {
	padding: 4px 8px;
	border: 1px solid #ced4da;
	border-radius: 4px;
	font-size: 0.9rem;
}

.request-counter {
	font-size: 0.85rem;
	color: #6c757d;
	background: #e9ecef;
	padding: 4px 10px;
	border-radius: 12px;
}

/* Card Grid */
.cluster-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 20px;
	margin-bottom: 24px;
}

/* Card Base Styles */
.cluster-card {
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.cluster-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.cluster-card .card-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.cluster-card .card-icon {
	font-size: 1.2rem;
}

.cluster-card .card-title {
	font-weight: 600;
	font-size: 1rem;
	flex-grow: 1;
}

.cluster-card .card-body {
	padding: 16px 18px;
}

/* Card specific colors */
.node-identity .card-header {
	background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.server-time .card-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cluster-status-card .card-header {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.jvm-info .card-header {
	background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.memory-info .card-header {
	background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.liferay-info .card-header {
	background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
	color: #333;
}

/* Info Row Styles */
.info-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid #f1f3f5;
}

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

.info-row.highlight {
	background: #f8f9fa;
	margin: 0 -18px;
	padding: 10px 18px;
	border-radius: 4px;
}

.info-row .label {
	color: #6c757d;
	font-size: 0.85rem;
	font-weight: 500;
}

.info-row .value {
	color: #212529;
	font-size: 0.9rem;
	font-weight: 600;
	text-align: right;
	max-width: 60%;
	word-break: break-all;
}

.info-row .value.hostname {
	color: #11998e;
	font-size: 1.1rem;
}

.info-row .value.node-id {
	font-family: "Courier New", Courier, monospace;
	font-size: 0.8rem;
	background: #e9ecef;
	padding: 2px 6px;
	border-radius: 4px;
}

/* Status Badge */
.cluster-status {
	font-size: 0.7rem;
	padding: 4px 10px;
	border-radius: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.cluster-status.status-active {
	background: rgba(255, 255, 255, 0.9);
	color: #28a745;
}

.cluster-status.status-inactive {
	background: rgba(255, 255, 255, 0.9);
	color: #ffc107;
}

/* Text Colors */
.text-success {
	color: #28a745 !important;
}

.text-warning {
	color: #fd7e14 !important;
}

/* Memory Bar */
.memory-bar-container {
	position: relative;
	height: 24px;
	background: #e9ecef;
	border-radius: 12px;
	margin-bottom: 16px;
	overflow: hidden;
}

.memory-bar {
	height: 100%;
	background: linear-gradient(90deg, #28a745 0%, #ffc107 50%, #dc3545 100%);
	border-radius: 12px;
	transition: width 0.3s ease;
}

.memory-percent {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 0.8rem;
	font-weight: 600;
	color: #333;
	text-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

/* Request History */
.request-history {
	background: white;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.request-history h4 {
	margin: 0 0 16px 0;
	color: #343a40;
	font-size: 1.1rem;
	font-weight: 600;
}

.history-table-container {
	overflow-x: auto;
}

.request-history .table {
	margin: 0;
	font-size: 0.85rem;
}

.request-history .table thead th {
	background: #f8f9fa;
	border-bottom: 2px solid #dee2e6;
	color: #495057;
	font-weight: 600;
	padding: 10px 12px;
}

.request-history .table tbody td {
	padding: 10px 12px;
	vertical-align: middle;
	border-bottom: 1px solid #f1f3f5;
}

.request-history .table tbody tr.current-request {
	background: #d4edda;
	font-weight: 600;
}

.request-history .table tbody tr:hover:not(.current-request) {
	background: #f8f9fa;
}

/* Button Styles */
.btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	color: white;
	padding: 6px 14px;
	border-radius: 4px;
	font-size: 0.85rem;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.btn-primary:hover {
	opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
	.cluster-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.auto-refresh-control {
		width: 100%;
		justify-content: flex-start;
	}

	.cluster-cards {
		grid-template-columns: 1fr;
	}

	.info-row .value {
		max-width: 50%;
	}
}
