/* OS SimLab - VFS Visual Tree & Inspector Styling */

.vfs-tree-root, .tree-children {
  list-style: none;
  padding-left: 14px;
}

.vfs-tree-root {
  padding-left: 4px;
}

.tree-item {
  margin: 2px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  font-size: 12.5px;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s ease;
  user-select: none;
}

.tree-row:hover {
  background: var(--bg-tertiary);
}

.tree-row.is-current-cwd {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.18);
}

.tree-toggle {
  width: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
}

.tree-icon {
  font-size: 14px;
}

.tree-name {
  flex: 1;
  font-weight: 500;
  color: #e8f7ee;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
}

.tree-owner {
  background: #0d2115;
  color: #8eb89f;
  border: 1px solid #163623;
}

.tree-perm {
  background: #082816;
  color: #34d399;
  border: 1px solid #10b981;
}

.tree-cwd {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #041409;
  font-weight: 700;
}

/* Modální okno: Inspekce a kalkulátor oprávnění */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 10, 6, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(3px);
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  width: 520px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7), 0 0 15px rgba(16, 185, 129, 0.1);
  overflow: hidden;
}

.modal-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  background: #09180f;
  border-top: 2px solid var(--accent-red); /* Červený akcentový proužek v záhlaví */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #e8f7ee;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--accent-red); /* Červený hover detail na zavření */
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inspector-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  font-size: 12.5px;
  background: #07140c;
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: 6px;
}

.meta-row {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

.meta-value {
  color: #e8f7ee;
  font-weight: 500;
}

/* Tabulka oprávnění s checkboxy */
.perm-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: center;
}

.perm-matrix-table th, .perm-matrix-table td {
  padding: 6px;
  border: 1px solid var(--border-color);
}

.perm-matrix-table th {
  background: #132a1c;
  color: var(--text-main);
  font-weight: 600;
}

.perm-matrix-table input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--accent-primary);
  width: 15px;
  height: 15px;
}

.perm-summary-card {
  background: #07150d;
  border: 1px solid #10b981;
  box-shadow: inset 0 0 15px rgba(16, 185, 129, 0.05);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.summary-col {
  text-align: center;
}

.summary-label {
  font-size: 11px;
  color: var(--text-muted);
}

.summary-value {
  font-family: monospace;
  font-size: 16px;
  font-weight: 700;
  color: #34d399;
}

.chmod-command-display {
  background: #040a06;
  border: 1px solid #1a3826;
  border-radius: 6px;
  padding: 8px 12px;
  font-family: monospace;
  font-size: 13px;
  color: #34d399;
  text-align: center;
}

.file-preview-box {
  background: #05120a;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: monospace;
  font-size: 12px;
  color: #8eb89f;
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
}
