/* Compact Interface Styling - Windows 98 Theme */

/* Compact Control Panel */
.compact-controls {
  background: var(--win98-face);
  border: 2px solid;
  border-color: var(--win98-highlight) var(--win98-shadow) var(--win98-shadow) var(--win98-highlight);
  margin: var(--space-sm) 0;
  padding: var(--space-sm);
}

.control-row {
  display: flex;
  gap: var(--space-sm);  
  align-items: flex-start;
  flex-wrap: nowrap; /* Default: keep everything inline */
  min-width: 0;
}

/* Parameter Controls */
.param-controls {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-shrink: 0; /* Keep controls at natural size */
  white-space: nowrap; /* Prevent internal wrapping */
}

.param-label {
  font-family: var(--font-family);
  font-size: var(--font-xs);
  font-weight: bold;
  color: var(--win98-text);
  white-space: nowrap;
  margin: 0;
}

.param-slider {
  width: 60px;
  height: 16px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--win98-face);
  border: 1px solid;
  border-color: var(--win98-shadow) var(--win98-highlight) var(--win98-highlight) var(--win98-shadow);
  cursor: pointer;
}

.param-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 14px;
  background: var(--win98-face);
  border: 1px solid;
  border-color: var(--win98-highlight) var(--win98-shadow) var(--win98-shadow) var(--win98-highlight);
  cursor: pointer;
}

.param-slider::-moz-range-thumb {
  width: 12px;
  height: 14px;
  background: var(--win98-face);
  border: 1px solid;
  border-color: var(--win98-highlight) var(--win98-shadow) var(--win98-shadow) var(--win98-highlight);
  cursor: pointer;
  border-radius: 0;
}

/* Compact Select */
.select-wrapper {
  position: relative;
  flex-shrink: 0;
  width: 180px;
  min-width: 150px; /* Minimum usable width */
}

.compact-select {
  width: 100%;
  background: white;
  border: 2px solid;
  border-color: var(--win98-shadow) var(--win98-highlight) var(--win98-highlight) var(--win98-shadow);
  padding: 6px 24px 6px 8px;
  font-family: var(--font-family);
  font-size: var(--font-base);
  color: var(--win98-text);
  appearance: none;
  cursor: pointer;
}

.compact-select:focus {
  outline: none;
  background: #FFFACD;
}

.select-arrow {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 10px;
  color: #666;
}

/* Compact Textarea */
.compact-textarea {
  flex: 1;
  max-width: 300px; /* Reasonable max width for readability */
  min-width: 200px; /* Ensure it's not too cramped */
  background: white;
  border: 2px solid;
  border-color: var(--win98-shadow) var(--win98-highlight) var(--win98-highlight) var(--win98-shadow);
  padding: 8px 10px;
  font-family: var(--font-family);
  font-size: var(--font-base);
  color: var(--win98-text);
  resize: none;
  min-height: 50px;
}

.compact-textarea:focus {
  outline: none;
  background: #FFFACD;
}

/* Compact Execute Button */
.compact-execute-button {
  background: var(--win98-face);
  border: 2px solid;
  border-color: var(--win98-highlight) var(--win98-shadow) var(--win98-shadow) var(--win98-highlight);
  padding: 4px 12px;
  font-family: var(--font-family);
  font-size: var(--font-sm);
  font-weight: bold;
  color: var(--win98-text);
  cursor: pointer;
  transition: all 0.1s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.compact-execute-button:hover {
  background: #E0E0E0;
}

.compact-execute-button:active {
  border-color: var(--win98-shadow) var(--win98-highlight) var(--win98-highlight) var(--win98-shadow);
  background: #D0D0D0;
}

.compact-execute-button:disabled {
  background: #C0C0C0;
  color: #808080;
  cursor: not-allowed;
}

/* Button Group */
.button-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0; /* Don't allow buttons to shrink */
  flex-wrap: nowrap; /* Keep buttons on same line */
}

/* Compact Stop Button */
.compact-stop-button {
  background: var(--status-error);
  border: 2px solid;
  border-color: var(--win98-highlight) var(--win98-shadow) var(--win98-shadow) var(--win98-highlight);
  padding: 4px 12px;
  font-family: var(--font-family);
  font-size: var(--font-sm);
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: all 0.1s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.compact-stop-button:hover {
  background: #CC0000;
}

.compact-stop-button:active {
  border-color: var(--win98-shadow) var(--win98-highlight) var(--win98-highlight) var(--win98-shadow);
  background: #AA0000;
}

.compact-stop-button:disabled {
  background: #C0C0C0;
  color: #808080;
  cursor: not-allowed;
}

/* Results Header Styling */
.results-header {
  background: var(--win98-face);
  border: 2px solid;
  border-color: var(--win98-highlight) var(--win98-shadow) var(--win98-shadow) var(--win98-highlight);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  text-align: center;
}

.results-title {
  font-size: var(--font-lg);
  font-weight: bold;
  margin: 0 0 var(--space-xs) 0;
  color: var(--win98-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.results-description {
  font-size: var(--font-sm);
  color: #666;
  margin: 0;
}

.result-status {
  background: #E0E0E0;
  border: 1px solid var(--win98-shadow);
  padding: 2px 6px;
  font-size: var(--font-xs);
  border-radius: 2px;
}

/* Result Sections */
.result-section {
  background: #111;
  border: 1px solid #333;
  padding: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.result-section h4 {
  background: none;
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 2px 0;
  margin: -var(--space-sm) -var(--space-sm) var(--space-sm) -var(--space-sm);
  font-size: 10px;
  font-weight: bold;
  color: #000;
  text-transform: uppercase;
  font-family: "Courier New", monospace;
  letter-spacing: 1px;
}

/* Analysis Log */
.analysis-log {
  background: #000;
  border: 2px solid;
  border-color: var(--win98-shadow) var(--win98-highlight) var(--win98-highlight) var(--win98-shadow);
  padding: var(--space-sm);
  min-height: 120px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: #fff;
  overflow-y: auto;
  max-height: 300px;
}

/* Responsive Design */
@media (max-width: 900px) {
  .control-row {
    flex-wrap: wrap;
  }
  
  .param-controls {
    flex-basis: 100%; /* Move to next line on smaller screens */
    justify-content: flex-start;
    margin-top: var(--space-sm);
  }
  
  .button-group {
    margin-top: var(--space-sm);
  }
}

@media (max-width: 768px) {
  .control-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .select-wrapper {
    width: 140px;
    min-width: 120px;
  }
  
  .compact-textarea {
    min-height: 40px;
  }
  
  .step-number {
    margin-bottom: var(--space-xs);
  }
  
  .unified-execute-button {
    font-size: var(--font-sm);
    padding: var(--space-xs) var(--space-md);
  }
}