/* 
 * PowerOn | Multi-Agent Service - Log Component Styles
 * Styles for execution log display
 * CSS Variables sind in styles_variables.css definiert
 */

/* Workflow Log Styles */
.log-section {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--color-primary);
}

.log-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  font-family: var(--font-family);
}

.log-actions {
  display: flex;
  gap: 0.5rem;
}

.log-content {
  flex: 1;
  padding: 1rem;
  overflow: auto;
}

/* Log Entries */
.log-entries {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.log-entry {
  padding: 0.75rem;
  background-color: var(--color-bg);
  border: 1px solid rgba(199,197,178,.15);
  border-radius: 25px;
  box-shadow: inset 0 0 0 1px rgba(199,197,178,.15), 0 0 10px rgba(0, 0, 0, 0.05);
}

.log-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.log-timestamp {
  font-size: 0.75rem;
  color: var(--color-gray);
  font-family: var(--font-family);
}

.log-level {
  padding: 0.25rem 0.5rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-family);
}

.level-info {
  background-color: var(--color-secondary-disabled);
  color: var(--color-secondary);
}

.level-warning {
  background-color: var(--color-secondary-disabled);
  color: var(--color-secondary);
}

.level-error {
  background-color: var(--color-red-disabled);
  color: var(--color-red);
}

.log-message {
  font-size: 0.875rem;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-family);
}

/* Single-line log entries */
.log-single-line {
  padding: 0.25rem 0.5rem;
  background-color: transparent;
  border: none;
  border-radius: 0;
}

.log-single-line .log-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

.log-single-line .log-content i {
  font-size: 0.75rem;
  width: 1rem;
  text-align: center;
}

.log-single-line .log-time {
  color: #64748b;
  font-family: monospace;
  font-size: 0.75rem;
}

.log-single-line .log-message {
  color: #1e293b;
  flex: 1;
}

/* Dynamic height log entries - no background, height fits content */
.log-dynamic-height {
  padding: 0.25rem 0.5rem;
  background-color: transparent;
  border: none;
  border-radius: 0;
  min-height: auto;
  height: auto;
}

.log-dynamic-height .log-content-inline {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.4;
  min-height: auto;
  height: auto;
  overflow: visible;
  max-width: 100%;
  min-width: 0;
}

.log-dynamic-height .log-content-inline i {
  font-size: 0.75rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
  margin-top: 0.1rem; /* Slight top alignment for multi-line text */
}

.log-dynamic-height .log-time {
  color: #64748b;
  font-family: monospace;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.1rem; /* Slight top alignment for multi-line text */
}

.log-dynamic-height .log-message {
  color: #1e293b;
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
  overflow: visible;
  text-overflow: unset;
  max-width: none;
  min-width: 0;
}

/* Log type specific colors for single-line */
.log-single-line.log-success .log-content {
  color: #059669;
}

.log-single-line.log-error .log-content {
  color: #dc2626;
}

.log-single-line.log-warning .log-content {
  color: #d97706;
}

.log-single-line.log-info .log-content {
  color: #0369a1;
}

/* Log type specific colors for dynamic height */
.log-dynamic-height.log-success .log-content-inline {
  color: #059669;
}

.log-dynamic-height.log-error .log-content-inline {
  color: #dc2626;
}

.log-dynamic-height.log-warning .log-content-inline {
  color: #d97706;
}

.log-dynamic-height.log-info .log-content-inline {
  color: #0369a1;
}

.log-details {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #64748b;
}

/* Log Filters */
.log-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.875rem;
  color: #4b5563;
}

.filter-select {
  padding: 0.375rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #1e293b;
  background-color: #ffffff;
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Log Actions */
.log-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.action-clear {
  background-color: #f1f5f9;
  color: #1e293b;
}

.action-clear:hover {
  background-color: #e2e8f0;
}

.action-export {
  background-color: #3b82f6;
  color: white;
}

.action-export:hover {
  background-color: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
  .log-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .log-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .log-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-select {
    flex: 1;
  }
}