/* Regex Tester specific styles */

.regex-input-section {
  margin-bottom: 24px;
}

.regex-row {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
}

.regex-slash {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
}

.regex-field {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--color-text);
}

.regex-field:focus {
  outline: none;
}

.flags-field {
  width: 60px;
  padding: 8px;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--color-text-secondary);
  text-align: center;
}

.flags-field:focus {
  outline: none;
}

.error-message {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fef2f2;
  border-radius: var(--radius-sm);
  color: #dc2626;
  font-size: 0.8125rem;
  display: none;
}

.error-message.visible {
  display: block;
}

.input-group {
  margin-bottom: 24px;
}

.input-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.test-string-wrapper {
  position: relative;
}

.textarea {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  line-height: 1.6;
  resize: vertical;
  background: var(--color-surface);
  color: var(--color-text);
}

.textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.highlighted-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  pointer-events: none;
  color: transparent;
  overflow: hidden;
}

.highlighted-text mark {
  background-color: transparent;
  color: transparent;
  border-bottom: 2px solid #2563eb;
  border-radius: 0;
}

.matches-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

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

.matches-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.matches-count {
  background: var(--color-accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
}

.matches-list {
  padding: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.match-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.match-item:last-child {
  margin-bottom: 0;
}

.match-index {
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  min-width: 30px;
}

.match-value {
  flex: 1;
  color: var(--color-text);
  word-break: break-all;
}

.no-matches {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  text-align: center;
  padding: 16px;
}

.presets-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}

.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-text);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.preset-btn {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.preset-btn:hover {
  background: var(--color-bg);
  border-color: var(--color-accent);
}
