/* Node Page Specific Styles */

/* Override/Specifics for Tenant Layout Context */
/* #nodes-namespace should behave like the tenant wrapper */
#nodes-namespace {
  /* The .tenant-layout class in HTML handles the flex and background */
  /* Ensure height is correct */
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* Form Controls Styling (matching tenant.css look but specific tweaks) */
.form-control {
  width: 100%;
  padding: 12px 15px;
  font-size: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.node-controls-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

/* Node Grid Layout */
.node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding-bottom: 40px;
  /* Space for scrolling */
}

/* Node Card Styling */
.node-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.node-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.node-card-header {
  background-color: #f8f9fa;
  padding: 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.node-card-title {
  font-weight: 700;
  color: #2c3e50;
  font-size: 1.1rem;
}

.node-card-body {
  padding: 15px;
  flex-grow: 1;
}

.node-info-row {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #555;
  display: flex;
}

.node-info-label {
  font-weight: 600;
  width: 80px;
  color: #7f8c8d;
  flex-shrink: 0;
}

.node-info-value {
  word-break: break-all;
}

.node-card-actions {
  padding: 15px;
  border-top: 1px solid #eee;
  background-color: #fafafa;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Action Buttons */
.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  font-weight: 600;
  transition: background-color 0.2s;
}

.btn-secondary {
  background-color: #e2e6ea;
  color: #495057;
}

.btn-secondary:hover {
  background-color: #dbe2e8;
}

.btn-view-activity {
  background-color: #3498db;
  color: white;
}

.btn-view-activity:hover {
  background-color: #2980b9;
}

.btn-remove-node {
  background-color: #fee2e2;
  color: #c53030;
}

.btn-remove-node:hover {
  background-color: #fecaca;
}

/* Activity Visualization */
.activity-visualization {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: calc(100vh - 250px);
  /* Fill remaining space */
}

.chart-container {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  flex: 1;
  /* Take up available space */
  min-height: 300px;
  position: relative;
}

.logs-container {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.logs-container h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #2c3e50;
  font-size: 1.2rem;
}

#node-logs-list {
  flex-grow: 1;
  overflow-y: auto;
}

/* Log Entries */
.log-entry-item {
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
  display: grid;
  grid-template-columns: 140px 140px 1fr;
  /* Start, End, Duration hints? */
  gap: 15px;
  align-items: center;
}

/* Ensure Logs and Info Tab containers fill height only when active */
#tab-logs.active,
#tab-info.active {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#tab-logs .logs-container,
#tab-info .node-info-container {
  flex: 1;
  min-height: 0;
  /* Allow scrolling inside flex item */
}

.log-entry-item:last-child {
  border-bottom: none;
}

.log-time-block {
  display: flex;
  flex-direction: column;
}

.log-time-label {
  font-size: 0.75rem;
  color: #aaa;
  text-transform: uppercase;
}

.log-time-val {
  color: #333;
  font-family: monospace;
}

.placeholder-text {
  color: #999;
  font-style: italic;
  padding: 20px;
  text-align: center;
}