/**
 * Shared Test Visualizer Styles
 * Used by all HTML test visualizers in the tests/ folder
 */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  max-width: 1400px;
  margin: 20px auto;
  padding: 20px;
  background: #f5f5f5;
  line-height: 1.6;
}

h1 {
  color: #333;
  margin-bottom: 10px;
}

h2 {
  color: #555;
  margin-top: 0;
  margin-bottom: 15px;
}

/* Test Sections */
.test-section {
  background: white;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Input Controls */
textarea {
  width: 100%;
  min-height: 400px;
  padding: 10px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
}

button {
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: background 0.2s;
}

button:hover {
  background: #45a049;
}

button:active {
  transform: translateY(1px);
}

/* Test Results */
#summary {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 4px;
}

#summary.all-pass {
  color: #4CAF50;
  background: #E8F5E9;
  border-left: 4px solid #4CAF50;
}

#summary.has-fail {
  color: #F44336;
  background: #FFEBEE;
  border-left: 4px solid #F44336;
}

.test-case {
  margin: 15px 0;
  padding: 15px;
  border-left: 4px solid #ccc;
  background: #f9f9f9;
  border-radius: 4px;
}

.test-case.pass {
  border-left-color: #4CAF50;
  background: #E8F5E9;
}

.test-case.fail {
  border-left-color: #F44336;
  background: #FFEBEE;
}

.test-title {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 14px;
}

.expected,
.actual {
  margin: 5px 0;
  padding: 10px;
  background: white;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.label {
  font-weight: bold;
  color: #666;
  margin-bottom: 5px;
  font-size: 12px;
}

/* Component Display */
.component-display {
  background: white;
  padding: 20px;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.component-display h3 {
  color: #333;
  margin-top: 0;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #4CAF50;
}

.component-section {
  margin-bottom: 25px;
}

.component-section h4 {
  color: #555;
  margin-bottom: 10px;
  font-size: 16px;
}

.component-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.component-list li {
  padding: 8px 12px;
  margin: 5px 0;
  background: #f9f9f9;
  border-left: 3px solid #4CAF50;
  border-radius: 3px;
}

.component-item {
  padding: 12px;
  margin: 10px 0;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.component-item-title {
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
}

.component-property {
  margin: 5px 0;
  padding: 5px 10px;
  background: white;
  border-radius: 3px;
  font-size: 13px;
}

.component-property strong {
  color: #666;
  margin-right: 8px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  background: #4CAF50;
  color: white;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  margin-left: 5px;
}

.badge.secondary {
  background: #2196F3;
}

.badge.warning {
  background: #FF9800;
}

.badge.danger {
  background: #F44336;
}

/* Navigation */
.nav-link {
  display: inline-block;
  margin: 10px 10px 10px 0;
  padding: 8px 15px;
  background: #2196F3;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: background 0.2s;
}

.nav-link:hover {
  background: #1976D2;
}

/* Utilities */
.hidden {
  display: none;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
    margin: 10px;
  }

  .test-section,
  .component-display {
    padding: 15px;
  }

  textarea {
    min-height: 300px;
    font-size: 11px;
  }

  h1 {
    font-size: 24px;
  }
}
